diff --git a/pyasic/config/__init__.py b/pyasic/config/__init__.py index 7cc18038..79eac9f5 100644 --- a/pyasic/config/__init__.py +++ b/pyasic/config/__init__.py @@ -36,6 +36,12 @@ class MinerConfig: default_factory=PowerScalingConfig.default ) + def __getitem__(self, item): + try: + return getattr(self, item) + except AttributeError: + raise KeyError + def as_dict(self) -> dict: """Converts the MinerConfig object to a dictionary.""" return asdict(self) diff --git a/pyasic/config/base.py b/pyasic/config/base.py index d4bbd68b..d26500d8 100644 --- a/pyasic/config/base.py +++ b/pyasic/config/base.py @@ -67,6 +67,13 @@ class MinerConfigOption(Enum): def default(cls): pass + def __getitem__(self, item): + try: + return getattr(self, item) + except AttributeError: + raise KeyError + + @dataclass class MinerConfigValue: @@ -112,3 +119,9 @@ class MinerConfigValue: def as_mara(self) -> dict: return {} + + def __getitem__(self, item): + try: + return getattr(self, item) + except AttributeError: + raise KeyError diff --git a/pyasic/data/__init__.py b/pyasic/data/__init__.py index 6499ede1..00ff9188 100644 --- a/pyasic/data/__init__.py +++ b/pyasic/data/__init__.py @@ -25,8 +25,10 @@ from pyasic.config import MinerConfig from pyasic.config.mining import MiningModePowerTune from .boards import HashBoard +from .device import DeviceInfo from .error_codes import BraiinsOSError, InnosiliconError, WhatsminerError, X19Error from .fans import Fan +from .hashrate import AlgoHashRate, HashUnit @dataclass @@ -38,8 +40,11 @@ class MinerData: datetime: The time and date this data was generated. uptime: The uptime of the miner in seconds. mac: The MAC address of the miner as a str. + device_info: Info about the device, such as model, make, and firmware. model: The model of the miner as a str. make: The make of the miner as a str. + firmware: The firmware on the miner as a str. + algo: The mining algorithm of the miner as a str. api_ver: The current api version on the miner as a str. fw_ver: The current firmware version on the miner as a str. hostname: The network hostname of the miner as a str. @@ -53,6 +58,7 @@ class MinerData: voltage: Current output voltage of the PSU as an float. wattage_limit: Power limit of the miner as an int. fans: A list of fans on the miner with their speeds. + expected_fans: The number of fans expected on a miner. fan_psu: The speed of the PSU on the fan if the miner collects it. total_chips: The total number of chips on all boards. Calculated automatically. expected_chips: The expected number of chips in the miner as an int. @@ -67,35 +73,62 @@ class MinerData: is_mining: Whether the miner is mining. """ + # general ip: str - datetime: datetime = None - uptime: int = None + _datetime: datetime = field(repr=False, default=None) + datetime: str = field(init=False) + timestamp: int = field(init=False) + + # about + device_info: DeviceInfo = None + make: str = field(init=False) + model: str = field(init=False) + firmware: str = field(init=False) + algo: str = field(init=False) mac: str = None - model: str = None - make: str = None api_ver: str = None fw_ver: str = None hostname: str = None - hashrate: float = field(init=False) - _hashrate: float = field(repr=False, default=None) + + # hashrate + hashrate: AlgoHashRate = field(init=False) + _hashrate: AlgoHashRate = field(repr=False, default=None) + + # expected expected_hashrate: float = None - hashboards: List[HashBoard] = field(default_factory=list) expected_hashboards: int = None + expected_chips: int = None + expected_fans: int = None + + # % expected + percent_expected_chips: float = field(init=False) + percent_expected_hashrate: float = field(init=False) + percent_expected_wattage: float = field(init=False) + + # temperature temperature_avg: int = field(init=False) env_temp: float = None + + # power wattage: int = None wattage_limit: int = field(init=False) voltage: float = None _wattage_limit: int = field(repr=False, default=None) + + # fans fans: List[Fan] = field(default_factory=list) fan_psu: int = None + + # boards + hashboards: List[HashBoard] = field(default_factory=list) total_chips: int = field(init=False) - expected_chips: int = None - percent_expected_chips: float = field(init=False) - percent_expected_hashrate: float = field(init=False) - percent_expected_wattage: float = field(init=False) nominal: bool = field(init=False) + + # config config: MinerConfig = None + fault_light: Union[bool, None] = None + + # errors errors: List[ Union[ WhatsminerError, @@ -104,9 +137,11 @@ class MinerData: InnosiliconError, ] ] = field(default_factory=list) - fault_light: Union[bool, None] = None - efficiency: int = field(init=False) + + # mining state is_mining: bool = True + uptime: int = None + efficiency: int = field(init=False) @classmethod def fields(cls): @@ -117,7 +152,7 @@ class MinerData: return {k: v for (k, v) in x if not k.startswith("_")} def __post_init__(self): - self.datetime = datetime.now(timezone.utc).astimezone() + self._datetime = datetime.now(timezone.utc).astimezone() def get(self, __key: str, default: Any = None): try: @@ -185,7 +220,7 @@ class MinerData: if item.hashrate is not None: hr_data.append(item.hashrate) if len(hr_data) > 0: - return round(sum(hr_data), 2) + return sum(hr_data, start=type(hr_data[0])(0)) return self._hashrate @hashrate.setter @@ -244,9 +279,10 @@ class MinerData: def percent_expected_hashrate(self): # noqa - Skip PyCharm inspection if self.hashrate is None or self.expected_hashrate is None: return None - if self.hashrate == 0 or self.expected_hashrate == 0: + try: + return round((self.hashrate / self.expected_hashrate) * 100) + except ZeroDivisionError: return 0 - return round((self.hashrate / self.expected_hashrate) * 100) @percent_expected_hashrate.setter def percent_expected_hashrate(self, val): @@ -256,9 +292,10 @@ class MinerData: def percent_expected_wattage(self): # noqa - Skip PyCharm inspection if self.wattage_limit is None or self.wattage is None: return None - if self.wattage_limit == 0 or self.wattage == 0: + try: + return round((self.wattage / self.wattage_limit) * 100) + except ZeroDivisionError: return 0 - return round((self.wattage / self.wattage_limit) * 100) @percent_expected_wattage.setter def percent_expected_wattage(self, val): @@ -284,14 +321,70 @@ class MinerData: def efficiency(self): # noqa - Skip PyCharm inspection if self.hashrate is None or self.wattage is None: return None - if self.hashrate == 0 or self.wattage == 0: + try: + return round(self.wattage / float(self.hashrate)) + except ZeroDivisionError: return 0 - return round(self.wattage / self.hashrate) @efficiency.setter def efficiency(self, val): pass + @property + def datetime(self): # noqa - Skip PyCharm inspection + return self._datetime.isoformat() + + @datetime.setter + def datetime(self, val): + pass + + @property + def timestamp(self): # noqa - Skip PyCharm inspection + return int(time.mktime(self._datetime.timetuple())) + + @timestamp.setter + def timestamp(self, val): + pass + + @property + def make(self): # noqa - Skip PyCharm inspection + if self.device_info.make is not None: + return str(self.device_info.make) + + @make.setter + def make(self, val): + pass + + @property + def model(self): # noqa - Skip PyCharm inspection + if self.device_info.model is not None: + return str(self.device_info.model) + + @model.setter + def model(self, val): + pass + + @property + def firmware(self): # noqa - Skip PyCharm inspection + if self.device_info.firmware is not None: + return str(self.device_info.firmware) + + @firmware.setter + def firmware(self, val): + pass + + @property + def algo(self): # noqa - Skip PyCharm inspection + if self.device_info.algo is not None: + return str(self.device_info.algo) + + @algo.setter + def algo(self, val): + pass + + def keys(self) -> list: + return [f.name for f in fields(self)] + def asdict(self) -> dict: return asdict(self, dict_factory=self.dict_factory) @@ -309,9 +402,7 @@ class MinerData: Returns: A JSON version of this class. """ - data = self.asdict() - data["datetime"] = str(int(time.mktime(data["datetime"].timetuple()))) - return json.dumps(data) + return json.dumps(self.as_dict()) def as_csv(self) -> str: """Get this dataclass as CSV. @@ -320,7 +411,6 @@ class MinerData: A CSV version of this class with no headers. """ data = self.asdict() - data["datetime"] = str(int(time.mktime(data["datetime"].timetuple()))) errs = [] for error in data["errors"]: errs.append(error["error_message"]) @@ -385,6 +475,6 @@ class MinerData: tags_str = ",".join(tag_data) field_str = ",".join(field_data) - timestamp = str(int(time.mktime(self.datetime.timetuple()) * 1e9)) + timestamp = str(self.timestamp * 1e9) return " ".join([tags_str, field_str, timestamp]) diff --git a/pyasic/data/boards.py b/pyasic/data/boards.py index d4f37dd6..b501e16e 100644 --- a/pyasic/data/boards.py +++ b/pyasic/data/boards.py @@ -17,6 +17,8 @@ from dataclasses import dataclass from typing import Any +from .hashrate import AlgoHashRate + @dataclass class HashBoard: @@ -34,7 +36,7 @@ class HashBoard: """ slot: int = 0 - hashrate: float = None + hashrate: AlgoHashRate = None temp: int = None chip_temp: int = None chips: int = None diff --git a/pyasic/data/device.py b/pyasic/data/device.py new file mode 100644 index 00000000..3a1edb90 --- /dev/null +++ b/pyasic/data/device.py @@ -0,0 +1,14 @@ +from dataclasses import dataclass + +from pyasic.device.algorithm import MinerAlgo +from pyasic.device.firmware import MinerFirmware +from pyasic.device.makes import MinerMake +from pyasic.device.models import MinerModel + + +@dataclass +class DeviceInfo: + make: MinerMake = None + model: MinerModel = None + firmware: MinerFirmware = None + algo: MinerAlgo = None diff --git a/pyasic/data/hashrate/__init__.py b/pyasic/data/hashrate/__init__.py new file mode 100644 index 00000000..5a8f2e12 --- /dev/null +++ b/pyasic/data/hashrate/__init__.py @@ -0,0 +1,15 @@ +from enum import Enum + +from pyasic.data.hashrate.sha256 import SHA256HashRate +from pyasic.device.algorithm.sha256 import SHA256Unit + + +class AlgoHashRate(Enum): + SHA256 = SHA256HashRate + + def __call__(self, *args, **kwargs): + return self.value(*args, **kwargs) + + +class HashUnit: + SHA256 = SHA256Unit diff --git a/pyasic/data/hashrate/sha256.py b/pyasic/data/hashrate/sha256.py new file mode 100644 index 00000000..722b222e --- /dev/null +++ b/pyasic/data/hashrate/sha256.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from dataclasses import dataclass + +from pyasic.device.algorithm import MinerAlgo +from pyasic.device.algorithm.sha256 import SHA256Unit + + +@dataclass +class SHA256HashRate: + rate: float + unit: SHA256Unit = MinerAlgo.SHA256.unit.default + + def __float__(self): + return float(self.rate) + + def __int__(self): + return int(self.rate) + + def __repr__(self): + return f"{self.rate} {str(self.unit)}" + + def __round__(self, n: int = None): + return round(self.rate, n) + + def __add__(self, other: SHA256HashRate | int | float) -> SHA256HashRate: + if isinstance(other, SHA256HashRate): + return SHA256HashRate(self.rate + other.into(self.unit).rate, self.unit) + return SHA256HashRate(self.rate + other, self.unit) + + def __sub__(self, other: SHA256HashRate | int | float) -> SHA256HashRate: + if isinstance(other, SHA256HashRate): + return SHA256HashRate(self.rate - other.into(self.unit).rate, self.unit) + return SHA256HashRate(self.rate - other, self.unit) + + def __truediv__(self, other: SHA256HashRate | int | float): + if isinstance(other, SHA256HashRate): + return SHA256HashRate(self.rate / other.into(self.unit).rate, self.unit) + return SHA256HashRate(self.rate / other, self.unit) + + def __floordiv__(self, other: SHA256HashRate | int | float): + if isinstance(other, SHA256HashRate): + return SHA256HashRate(self.rate // other.into(self.unit).rate, self.unit) + return SHA256HashRate(self.rate // other, self.unit) + + def __mul__(self, other: SHA256HashRate | int | float): + if isinstance(other, SHA256HashRate): + return SHA256HashRate(self.rate * other.into(self.unit).rate, self.unit) + return SHA256HashRate(self.rate * other, self.unit) + + def into(self, other: SHA256Unit) -> SHA256HashRate: + return SHA256HashRate( + rate=self.rate / (other.value / self.unit.value), unit=other + ) diff --git a/pyasic/device/__init__.py b/pyasic/device/__init__.py new file mode 100644 index 00000000..86ba4f32 --- /dev/null +++ b/pyasic/device/__init__.py @@ -0,0 +1,4 @@ +from .algorithm import MinerAlgo +from .firmware import MinerFirmware +from .makes import MinerMake +from .models import MinerModel diff --git a/pyasic/device/algorithm/__init__.py b/pyasic/device/algorithm/__init__.py new file mode 100644 index 00000000..d9c85521 --- /dev/null +++ b/pyasic/device/algorithm/__init__.py @@ -0,0 +1,5 @@ +from pyasic.device.algorithm.sha256 import SHA256Algo + + +class MinerAlgo: + SHA256 = SHA256Algo diff --git a/pyasic/device/algorithm/sha256.py b/pyasic/device/algorithm/sha256.py new file mode 100644 index 00000000..5bb3614d --- /dev/null +++ b/pyasic/device/algorithm/sha256.py @@ -0,0 +1,68 @@ +from __future__ import annotations + +from enum import IntEnum + + +class SHA256Unit(IntEnum): + H = 1 + KH = int(H) * 1000 + MH = int(KH) * 1000 + GH = int(MH) * 1000 + TH = int(GH) * 1000 + PH = int(TH) * 1000 + EH = int(PH) * 1000 + ZH = int(EH) * 1000 + + default = TH + + def __str__(self): + if self.value == self.H: + return "H/s" + if self.value == self.KH: + return "KH/s" + if self.value == self.MH: + return "MH/s" + if self.value == self.GH: + return "GH/s" + if self.value == self.TH: + return "TH/s" + if self.value == self.PH: + return "PH/s" + if self.value == self.EH: + return "EH/s" + if self.value == self.ZH: + return "ZH/s" + + @classmethod + def from_str(cls, value: str): + if value == "H": + return cls.H + elif value == "KH": + return cls.KH + elif value == "MH": + return cls.MH + elif value == "GH": + return cls.GH + elif value == "TH": + return cls.TH + elif value == "PH": + return cls.PH + elif value == "EH": + return cls.EH + elif value == "ZH": + return cls.ZH + return cls.default + + def __repr__(self): + return str(self) + + +# make this json serializable +class _SHA256Algo(str): + unit = SHA256Unit + + def __repr__(self): + return "SHA256Algo" + + +SHA256Algo = _SHA256Algo("SHA256") diff --git a/pyasic/device/firmware.py b/pyasic/device/firmware.py new file mode 100644 index 00000000..a489c499 --- /dev/null +++ b/pyasic/device/firmware.py @@ -0,0 +1,27 @@ +# ------------------------------------------------------------------------------ +# Copyright 2022 Upstream Data Inc - +# - +# Licensed under the Apache License, Version 2.0 (the "License"); - +# you may not use this file except in compliance with the License. - +# You may obtain a copy of the License at - +# - +# http://www.apache.org/licenses/LICENSE-2.0 - +# - +# Unless required by applicable law or agreed to in writing, software - +# distributed under the License is distributed on an "AS IS" BASIS, - +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - +# See the License for the specific language governing permissions and - +# limitations under the License. - +# ------------------------------------------------------------------------------ + +from enum import StrEnum + + +class MinerFirmware(StrEnum): + STOCK = "Stock" + BRAIINS_OS = "BOS+" + VNISH = "VNish" + EPIC = "ePIC" + HIVEON = "Hive" + LUXOS = "LuxOS" + MARATHON = "MaraFW" diff --git a/pyasic/device/makes.py b/pyasic/device/makes.py new file mode 100644 index 00000000..c8e298b3 --- /dev/null +++ b/pyasic/device/makes.py @@ -0,0 +1,27 @@ +# ------------------------------------------------------------------------------ +# Copyright 2022 Upstream Data Inc - +# - +# Licensed under the Apache License, Version 2.0 (the "License"); - +# you may not use this file except in compliance with the License. - +# You may obtain a copy of the License at - +# - +# http://www.apache.org/licenses/LICENSE-2.0 - +# - +# Unless required by applicable law or agreed to in writing, software - +# distributed under the License is distributed on an "AS IS" BASIS, - +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - +# See the License for the specific language governing permissions and - +# limitations under the License. - +# ------------------------------------------------------------------------------ + +from enum import StrEnum + + +class MinerMake(StrEnum): + WHATSMINER = "WhatsMiner" + ANTMINER = "AntMiner" + AVALONMINER = "AvalonMiner" + INNOSILICON = "Innosilicon" + GOLDSHELL = "Goldshell" + AURADINE = "Auradine" + EPIC = "ePIC" diff --git a/pyasic/device/models.py b/pyasic/device/models.py new file mode 100644 index 00000000..de32614a --- /dev/null +++ b/pyasic/device/models.py @@ -0,0 +1,318 @@ +from enum import StrEnum + + +class AntminerModels(StrEnum): + D3 = "D3" + HS3 = "HS3" + L3Plus = "L3+" + DR5 = "DR5" + L7 = "L7" + E9Pro = "E9Pro" + S9 = "S9" + S9i = "S9i" + S9j = "S9j" + T9 = "T9" + Z15 = "Z15" + S17 = "S17" + S17Plus = "S17+" + S17Pro = "S17 Pro" + S17e = "S17e" + T17 = "T17" + T17Plus = "T17+" + T17e = "T17e" + S19 = "S19" + S19NoPIC = "S19 No PIC" + S19L = "S19L" + S19Pro = "S19 Pro" + S19j = "S19j" + S19i = "S19i" + S19Plus = "S19+" + S19jNoPIC = "S19j No PIC" + S19ProPlus = "S19 Pro+" + S19jPro = "S19j Pro" + S19jProNoPIC = "S19j Pro No PIC" + S19jProPlus = "S19j Pro+" + S19jProPlusNoPIC = "S19j Pro+ No PIC" + S19XP = "S19 XP" + S19a = "S19a" + S19aPro = "S19a Pro" + S19Hydro = "S19 Hydro" + S19ProHydro = "S19 Pro Hydro" + S19ProPlusHydro = "S19 Pro+ Hydro" + S19KPro = "S19K Pro" + S19kPro = "S19k Pro" + S19kProNoPIC = "S19k Pro No PIC" + T19 = "T19" + S21 = "S21" + T21 = "T21" + + +class WhatsminerModels(StrEnum): + M20V10 = "M20 V10" + M20SV10 = "M20S V10" + M20SV20 = "M20S V20" + M20SV30 = "M20S V30" + M20PV10 = "M20P V10" + M20PV30 = "M20P V30" + M20SPlusV30 = "M20S+ V30" + M21V10 = "M21 V10" + M21SV20 = "M21S V20" + M21SV60 = "M21S V60" + M21SV70 = "M21S V70" + M21SPlusV20 = "M21S+ V20" + M29V10 = "M29 V10" + M30V10 = "M30 V10" + M30V20 = "M30 V20" + M30KV10 = "M30K V10" + M30LV10 = "M30L V10" + M30SV10 = "M30S V10" + M30SV20 = "M30S V20" + M30SV30 = "M30S V30" + M30SV40 = "M30S V40" + M30SV50 = "M30S V50" + M30SV60 = "M30S V60" + M30SV70 = "M30S V70" + M30SV80 = "M30S V80" + M30SVE10 = "M30S VE10" + M30SVE20 = "M30S VE20" + M30SVE30 = "M30S VE30" + M30SVE40 = "M30S VE40" + M30SVE50 = "M30S VE50" + M30SVE60 = "M30S VE60" + M30SVE70 = "M30S VE70" + M30SVF10 = "M30S VF10" + M30SVF20 = "M30S VF20" + M30SVF30 = "M30S VF30" + M30SVG10 = "M30S VG10" + M30SVG20 = "M30S VG20" + M30SVG30 = "M30S VG30" + M30SVG40 = "M30S VG40" + M30SVH10 = "M30S VH10" + M30SVH20 = "M30S VH20" + M30SVH30 = "M30S VH30" + M30SVH40 = "M30S VH40" + M30SVH50 = "M30S VH50" + M30SVH60 = "M30S VH60" + M30SVI20 = "M30S VI20" + M30SPlusV10 = "M30S+ V10" + M30SPlusV20 = "M30S+ V20" + M30SPlusV30 = "M30S+ V30" + M30SPlusV40 = "M30S+ V40" + M30SPlusV50 = "M30S+ V50" + M30SPlusV60 = "M30S+ V60" + M30SPlusV70 = "M30S+ V70" + M30SPlusV80 = "M30S+ V80" + M30SPlusV90 = "M30S+ V90" + M30SPlusV100 = "M30S+ V100" + M30SPlusVE30 = "M30S+ VE30" + M30SPlusVE40 = "M30S+ VE40" + M30SPlusVE50 = "M30S+ VE50" + M30SPlusVE60 = "M30S+ VE60" + M30SPlusVE70 = "M30S+ VE70" + M30SPlusVE80 = "M30S+ VE80" + M30SPlusVE90 = "M30S+ VE90" + M30SPlusVE100 = "M30S+ VE100" + M30SPlusVF20 = "M30S+ VF20" + M30SPlusVF30 = "M30S+ VF30" + M30SPlusVG20 = "M30S+ VG20" + M30SPlusVG30 = "M30S+ VG30" + M30SPlusVG40 = "M30S+ VG40" + M30SPlusVG50 = "M30S+ VG50" + M30SPlusVG60 = "M30S+ VG60" + M30SPlusVH10 = "M30S+ VH10" + M30SPlusVH20 = "M30S+ VH20" + M30SPlusVH30 = "M30S+ VH30" + M30SPlusVH40 = "M30S+ VH40" + M30SPlusVH50 = "M30S+ VH50" + M30SPlusVH60 = "M30S+ VH60" + M30SPlusPlusV10 = "M30S++ V10" + M30SPlusPlusV20 = "M30S++ V20" + M30SPlusPlusVE30 = "M30S++ VE30" + M30SPlusPlusVE40 = "M30S++ VE40" + M30SPlusPlusVE50 = "M30S++ VE50" + M30SPlusPlusVF40 = "M30S++ VF40" + M30SPlusPlusVG30 = "M30S++ VG30" + M30SPlusPlusVG40 = "M30S++ VG40" + M30SPlusPlusVG50 = "M30S++ VG50" + M30SPlusPlusVH10 = "M30S++ VH10" + M30SPlusPlusVH20 = "M30S++ VH20" + M30SPlusPlusVH30 = "M30S++ VH30" + M30SPlusPlusVH40 = "M30S++ VH40" + M30SPlusPlusVH50 = "M30S++ VH50" + M30SPlusPlusVH60 = "M30S++ VH60" + M30SPlusPlusVH70 = "M30S++ VH70" + M30SPlusPlusVH80 = "M30S++ VH80" + M30SPlusPlusVH90 = "M30S++ VH90" + M30SPlusPlusVH100 = "M30S++ VH100" + M30SPlusPlusVJ20 = "M30S++ VJ20" + M30SPlusPlusVJ30 = "M30S++ VJ30" + M31V10 = "M31 V10" + M31V20 = "M31 V20" + M31HV10 = "M31H V10" + M31HV40 = "M31H V40" + M31LV10 = "M30L V10" + M31SV10 = "M31S V10" + M31SV20 = "M31S V20" + M31SV30 = "M31S V30" + M31SV40 = "M31S V40" + M31SV50 = "M31S V50" + M31SV60 = "M31S V60" + M31SV70 = "M31S V70" + M31SV80 = "M31S V80" + M31SV90 = "M31S V90" + M31SVE10 = "M31S VE10" + M31SVE20 = "M31S VE20" + M31SVE30 = "M31S VE30" + M31SEV10 = "M31SE V10" + M31SEV20 = "M31SE V20" + M31SEV30 = "M31SE V30" + M31SPlusV10 = "M31S+ V10" + M31SPlusV20 = "M31S+ V20" + M31SPlusV30 = "M31S+ V30" + M31SPlusV40 = "M31S+ V40" + M31SPlusV50 = "M31S+ V50" + M31SPlusV60 = "M31S+ V60" + M31SPlusV80 = "M31S+ V80" + M31SPlusV90 = "M31S+ V90" + M31SPlusV100 = "M31S+ V100" + M31SPlusVE10 = "M31S+ VE10" + M31SPlusVE20 = "M31S+ VE20" + M31SPlusVE30 = "M31S+ VE30" + M31SPlusVE40 = "M31S+ VE40" + M31SPlusVE50 = "M31S+ VE50" + M31SPlusVE60 = "M31S+ VE60" + M31SPlusVE80 = "M31S+ VE80" + M31SPlusVF20 = "M31S+ VF20" + M31SPlusVF30 = "M31S+ VF30" + M31SPlusVG20 = "M31S+ VG20" + M31SPlusVG30 = "M31S+ VG30" + M32V10 = "M32 V10" + M32V20 = "M32 V20" + M32S = "M32S" + M33V10 = "M33 V10" + M33V20 = "M33 V20" + M33V30 = "M33 V30" + M33SVG30 = "M33S VG30" + M33SPlusVG20 = "M33S+ VG20" + M33SPlusVH20 = "M33S+ VH20" + M33SPlusVH30 = "M33S+ VH30" + M33SPlusPlusVH20 = "M33S++ VH20" + M33SPlusPlusVH30 = "M33S++ VH30" + M33SPlusPlusVG40 = "M33S++ VG40" + M34SPlusVE10 = "M34S+ VE10" + M36SVE10 = "M36S VE10" + M36SPlusVG30 = "M36S+ VG30" + M36SPlusPlusVH30 = "M36S++ VH30" + M39V10 = "M39 V10" + M39V20 = "M39 V20" + M39V30 = "M39 V30" + M50VE30 = "M50 VE30" + M50VG30 = "M50 VG30" + M50VH10 = "M50 VH10" + M50VH20 = "M50 VH20" + M50VH30 = "M50 VH30" + M50VH40 = "M50 VH40" + M50VH50 = "M50 VH50" + M50VH60 = "M50 VH60" + M50VH70 = "M50 VH70" + M50VH80 = "M50 VH80" + M50VJ10 = "M50 VJ10" + M50VJ20 = "M50 VJ20" + M50VJ30 = "M50 VJ30" + M50SVJ10 = "M50S VJ10" + M50SVJ20 = "M50S VJ20" + M50SVJ30 = "M50S VJ30" + M50SVH10 = "M50S VH10" + M50SVH20 = "M50S VH20" + M50SVH30 = "M50S VH30" + M50SVH40 = "M50S VH40" + M50SVH50 = "M50S VH50" + M50SPlusVH30 = "M50S+ VH30" + M50SPlusVH40 = "M50S+ VH40" + M50SPlusVJ30 = "M50S+ VJ30" + M50SPlusVK20 = "M50S+ VK20" + M50SPlusPlusVK10 = "M50S++ VK10" + M50SPlusPlusVK20 = "M50S++ VK20" + M50SPlusPlusVK30 = "M50S++ VK30" + M53VH30 = "M53 VH30" + M53SVH30 = "M53S VH30" + M53SVJ40 = "M53S VJ40" + M53SPlusVJ30 = "M53S+ VJ30" + M53SPlusPlusVK10 = "M53S++ VK10" + M56VH30 = "M56 VH30" + M56SVH30 = "M56S VH30" + M56SPlusVJ30 = "M56S+ VJ30" + M59VH30 = "M59 VH30" + M60VK10 = "M60 VK10" + M60VK20 = "M60 VK20" + M60VK30 = "M60 VK30" + M60VK40 = "M60 VK40" + M60SVK10 = "M60S VK10" + M60SVK20 = "M60S VK20" + M60SVK30 = "M60S VK30" + M60SVK40 = "M60S VK40" + M63VK10 = "M63 VK10" + M63VK20 = "M63 VK20" + M63VK30 = "M63 VK30" + M63SVK10 = "M63S VK10" + M63SVK20 = "M63S VK20" + M63SVK30 = "M63S VK30" + M66VK20 = "M66 VK20" + M66VK30 = "M66 VK30" + M66SVK20 = "M66S VK20" + M66SVK30 = "M66S VK30" + M66SVK40 = "M66S VK40" + + +class AvalonminerModels(StrEnum): + Avalon721 = "Avalon 721" + Avalon741 = "Avalon 741" + Avalon761 = "Avalon 761" + Avalon821 = "Avalon 821" + Avalon841 = "Avalon 841" + Avalon851 = "Avalon 851" + Avalon921 = "Avalon 921" + Avalon1026 = "Avalon 1026" + Avalon1047 = "Avalon 1047" + Avalon1066 = "Avalon 1066" + Avalon1166Pro = "Avalon 1166 Pro" + Avalon1246 = "Avalon 1246" + + +class InnosiliconModels(StrEnum): + T3HPlus = "T3H+" + A10X = "A10X" + + +class GoldshellModels(StrEnum): + CK5 = "CK5" + HS5 = "HS5" + KD5 = "KD5" + KDMax = "KD Max" + KDBoxII = "KD Box II" + KDBoxPro = "KD Box Pro" + + +class ePICModels(StrEnum): + BM520i = "BlockMiner 520i" + BM720i = "BlockMiner 720i" + + +class AuradineModels(StrEnum): + AT1500 = "AT1500" + AT2860 = "AT2860" + AT2880 = "AT2880" + AI2500 = "AI2500" + AI3680 = "AI3680" + AD2500 = "AD2500" + AD3500 = "AD3500" + + +class MinerModel: + ANTMINER = AntminerModels + WHATSMINER = WhatsminerModels + AVALONMINER = AvalonminerModels + INNOSILICON = InnosiliconModels + GOLDSHELL = GoldshellModels + AURADINE = AuradineModels + EPIC = ePICModels diff --git a/pyasic/load/__init__.py b/pyasic/load/__init__.py index 19922cb5..2c8b3967 100644 --- a/pyasic/load/__init__.py +++ b/pyasic/load/__init__.py @@ -20,7 +20,16 @@ from typing import List, Union from pyasic.errors import APIError from pyasic.miners import AnyMiner from pyasic.miners.backends import AntminerModern, BOSMiner, BTMiner -from pyasic.miners.models import S9, S17, T17, S17e, S17Plus, S17Pro, T17e, T17Plus +from pyasic.miners.device.models import ( + S9, + S17, + T17, + S17e, + S17Plus, + S17Pro, + T17e, + T17Plus, +) FAN_USAGE = 50 # 50 W per fan diff --git a/pyasic/miners/antminer/bmminer/X17/S17.py b/pyasic/miners/antminer/bmminer/X17/S17.py index cb49b832..08edb002 100644 --- a/pyasic/miners/antminer/bmminer/X17/S17.py +++ b/pyasic/miners/antminer/bmminer/X17/S17.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerOld -from pyasic.miners.models import S17, S17e, S17Plus, S17Pro +from pyasic.miners.device.models import S17, S17e, S17Plus, S17Pro class BMMinerS17(AntminerOld, S17): diff --git a/pyasic/miners/antminer/bmminer/X17/T17.py b/pyasic/miners/antminer/bmminer/X17/T17.py index 7fee7fc8..0f6f7c09 100644 --- a/pyasic/miners/antminer/bmminer/X17/T17.py +++ b/pyasic/miners/antminer/bmminer/X17/T17.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerOld -from pyasic.miners.models import T17, T17e, T17Plus +from pyasic.miners.device.models import T17, T17e, T17Plus class BMMinerT17(AntminerOld, T17): diff --git a/pyasic/miners/antminer/bmminer/X19/S19.py b/pyasic/miners/antminer/bmminer/X19/S19.py index ac96fe12..b2773d25 100644 --- a/pyasic/miners/antminer/bmminer/X19/S19.py +++ b/pyasic/miners/antminer/bmminer/X19/S19.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerModern -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( S19, S19L, S19XP, @@ -26,12 +26,12 @@ from pyasic.miners.models import ( S19j, S19jNoPIC, S19jPro, + S19KPro, S19Plus, S19Pro, S19ProHydro, S19ProPlus, S19ProPlusHydro, - S19KPro, ) diff --git a/pyasic/miners/antminer/bmminer/X19/T19.py b/pyasic/miners/antminer/bmminer/X19/T19.py index 33960013..0f12a68f 100644 --- a/pyasic/miners/antminer/bmminer/X19/T19.py +++ b/pyasic/miners/antminer/bmminer/X19/T19.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerModern -from pyasic.miners.models import T19 +from pyasic.miners.device.models import T19 class BMMinerT19(AntminerModern, T19): diff --git a/pyasic/miners/antminer/bmminer/X21/S21.py b/pyasic/miners/antminer/bmminer/X21/S21.py index ca3764af..33b52f0e 100644 --- a/pyasic/miners/antminer/bmminer/X21/S21.py +++ b/pyasic/miners/antminer/bmminer/X21/S21.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerModern -from pyasic.miners.models import S21 +from pyasic.miners.device.models import S21 class BMMinerS21(AntminerModern, S21): diff --git a/pyasic/miners/antminer/bmminer/X21/T21.py b/pyasic/miners/antminer/bmminer/X21/T21.py index 8c79f120..ed2cbbde 100644 --- a/pyasic/miners/antminer/bmminer/X21/T21.py +++ b/pyasic/miners/antminer/bmminer/X21/T21.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerModern -from pyasic.miners.models import T21 +from pyasic.miners.device.models import T21 class BMMinerT21(AntminerModern, T21): diff --git a/pyasic/miners/antminer/bmminer/X3/HS3.py b/pyasic/miners/antminer/bmminer/X3/HS3.py index adad62d3..baf70fb2 100644 --- a/pyasic/miners/antminer/bmminer/X3/HS3.py +++ b/pyasic/miners/antminer/bmminer/X3/HS3.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerModern -from pyasic.miners.models import HS3 +from pyasic.miners.device.models import HS3 class BMMinerHS3(AntminerModern, HS3): diff --git a/pyasic/miners/antminer/bmminer/X3/L3.py b/pyasic/miners/antminer/bmminer/X3/L3.py index 985af15e..3c9d8baa 100644 --- a/pyasic/miners/antminer/bmminer/X3/L3.py +++ b/pyasic/miners/antminer/bmminer/X3/L3.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerOld -from pyasic.miners.models import L3Plus +from pyasic.miners.device.models import L3Plus class BMMinerL3Plus(AntminerOld, L3Plus): diff --git a/pyasic/miners/antminer/bmminer/X7/L7.py b/pyasic/miners/antminer/bmminer/X7/L7.py index 48530495..4a90a75d 100644 --- a/pyasic/miners/antminer/bmminer/X7/L7.py +++ b/pyasic/miners/antminer/bmminer/X7/L7.py @@ -14,7 +14,7 @@ # limitations under the License. - # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerModern -from pyasic.miners.models import L7 +from pyasic.miners.device.models import L7 class BMMinerL7(AntminerModern, L7): diff --git a/pyasic/miners/antminer/bmminer/X9/E9.py b/pyasic/miners/antminer/bmminer/X9/E9.py index 8616ef14..b3cc373a 100644 --- a/pyasic/miners/antminer/bmminer/X9/E9.py +++ b/pyasic/miners/antminer/bmminer/X9/E9.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerModern -from pyasic.miners.models import E9Pro +from pyasic.miners.device.models import E9Pro class BMMinerE9Pro(AntminerModern, E9Pro): diff --git a/pyasic/miners/antminer/bmminer/X9/S9.py b/pyasic/miners/antminer/bmminer/X9/S9.py index ca23a035..41b1861d 100644 --- a/pyasic/miners/antminer/bmminer/X9/S9.py +++ b/pyasic/miners/antminer/bmminer/X9/S9.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import BMMiner -from pyasic.miners.models import S9, S9i, S9j +from pyasic.miners.device.models import S9, S9i, S9j class BMMinerS9(BMMiner, S9): diff --git a/pyasic/miners/antminer/bmminer/X9/T9.py b/pyasic/miners/antminer/bmminer/X9/T9.py index f9543aba..eae66585 100644 --- a/pyasic/miners/antminer/bmminer/X9/T9.py +++ b/pyasic/miners/antminer/bmminer/X9/T9.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import BMMiner -from pyasic.miners.models import T9 +from pyasic.miners.device.models import T9 class BMMinerT9(BMMiner, T9): diff --git a/pyasic/miners/antminer/bosminer/X17/S17.py b/pyasic/miners/antminer/bosminer/X17/S17.py index 381fa145..e6efe9d1 100644 --- a/pyasic/miners/antminer/bosminer/X17/S17.py +++ b/pyasic/miners/antminer/bosminer/X17/S17.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import BOSMiner -from pyasic.miners.models import S17, S17e, S17Plus, S17Pro +from pyasic.miners.device.models import S17, S17e, S17Plus, S17Pro class BOSMinerS17(BOSMiner, S17): diff --git a/pyasic/miners/antminer/bosminer/X17/T17.py b/pyasic/miners/antminer/bosminer/X17/T17.py index 1145a608..7802d61a 100644 --- a/pyasic/miners/antminer/bosminer/X17/T17.py +++ b/pyasic/miners/antminer/bosminer/X17/T17.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import BOSMiner -from pyasic.miners.models import T17, T17e, T17Plus +from pyasic.miners.device.models import T17, T17e, T17Plus class BOSMinerT17(BOSMiner, T17): diff --git a/pyasic/miners/antminer/bosminer/X19/S19.py b/pyasic/miners/antminer/bosminer/X19/S19.py index 0b044df4..8167be4d 100644 --- a/pyasic/miners/antminer/bosminer/X19/S19.py +++ b/pyasic/miners/antminer/bosminer/X19/S19.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import BOSer -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( S19, S19XP, S19a, diff --git a/pyasic/miners/antminer/bosminer/X19/T19.py b/pyasic/miners/antminer/bosminer/X19/T19.py index 3d3fe7df..60658187 100644 --- a/pyasic/miners/antminer/bosminer/X19/T19.py +++ b/pyasic/miners/antminer/bosminer/X19/T19.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import BOSer -from pyasic.miners.models import T19 +from pyasic.miners.device.models import T19 class BOSMinerT19(BOSer, T19): diff --git a/pyasic/miners/antminer/bosminer/X21/S21.py b/pyasic/miners/antminer/bosminer/X21/S21.py index 4ea9d620..b0dde8f1 100644 --- a/pyasic/miners/antminer/bosminer/X21/S21.py +++ b/pyasic/miners/antminer/bosminer/X21/S21.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import BOSer -from pyasic.miners.models import S21 +from pyasic.miners.device.models import S21 class BOSMinerS21(BOSer, S21): diff --git a/pyasic/miners/antminer/bosminer/X9/S9.py b/pyasic/miners/antminer/bosminer/X9/S9.py index ae718fab..14b07e80 100644 --- a/pyasic/miners/antminer/bosminer/X9/S9.py +++ b/pyasic/miners/antminer/bosminer/X9/S9.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import BOSMiner -from pyasic.miners.models import S9 +from pyasic.miners.device.models import S9 class BOSMinerS9(BOSMiner, S9): diff --git a/pyasic/miners/antminer/cgminer/X15/Z15.py b/pyasic/miners/antminer/cgminer/X15/Z15.py index da98b94a..b2fe1165 100644 --- a/pyasic/miners/antminer/cgminer/X15/Z15.py +++ b/pyasic/miners/antminer/cgminer/X15/Z15.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerOld -from pyasic.miners.models import Z15 +from pyasic.miners.device.models import Z15 class CGMinerZ15(AntminerOld, Z15): diff --git a/pyasic/miners/antminer/cgminer/X3/D3.py b/pyasic/miners/antminer/cgminer/X3/D3.py index 1b485d8f..6ecab5ae 100644 --- a/pyasic/miners/antminer/cgminer/X3/D3.py +++ b/pyasic/miners/antminer/cgminer/X3/D3.py @@ -14,7 +14,7 @@ # limitations under the License. - # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerOld -from pyasic.miners.models import D3 +from pyasic.miners.device.models import D3 class CGMinerD3(AntminerOld, D3): diff --git a/pyasic/miners/antminer/cgminer/X5/DR5.py b/pyasic/miners/antminer/cgminer/X5/DR5.py index 839d74d9..f362cfe9 100644 --- a/pyasic/miners/antminer/cgminer/X5/DR5.py +++ b/pyasic/miners/antminer/cgminer/X5/DR5.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AntminerOld -from pyasic.miners.models import DR5 +from pyasic.miners.device.models import DR5 class CGMinerDR5(AntminerOld, DR5): diff --git a/pyasic/miners/antminer/epic/X19/S19.py b/pyasic/miners/antminer/epic/X19/S19.py index 3bb9d078..cced76f5 100644 --- a/pyasic/miners/antminer/epic/X19/S19.py +++ b/pyasic/miners/antminer/epic/X19/S19.py @@ -15,7 +15,15 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import ePIC -from pyasic.miners.models import S19, S19XP, S19j, S19jPro, S19jProPlus, S19kPro, S19Pro +from pyasic.miners.device.models import ( + S19, + S19XP, + S19j, + S19jPro, + S19jProPlus, + S19kPro, + S19Pro, +) class ePICS19(ePIC, S19): diff --git a/pyasic/miners/antminer/epic/X21/S21.py b/pyasic/miners/antminer/epic/X21/S21.py index 02beaa1c..1ffbec25 100644 --- a/pyasic/miners/antminer/epic/X21/S21.py +++ b/pyasic/miners/antminer/epic/X21/S21.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import ePIC -from pyasic.miners.models import S21 +from pyasic.miners.device.models import S21 class ePICS21(ePIC, S21): diff --git a/pyasic/miners/antminer/epic/X21/T21.py b/pyasic/miners/antminer/epic/X21/T21.py index 8795b8cd..02d00655 100644 --- a/pyasic/miners/antminer/epic/X21/T21.py +++ b/pyasic/miners/antminer/epic/X21/T21.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import ePIC -from pyasic.miners.models import T21 +from pyasic.miners.device.models import T21 class ePICT21(ePIC, T21): diff --git a/pyasic/miners/antminer/hiveon/X9/T9.py b/pyasic/miners/antminer/hiveon/X9/T9.py index 53a5be29..ff71f3ce 100644 --- a/pyasic/miners/antminer/hiveon/X9/T9.py +++ b/pyasic/miners/antminer/hiveon/X9/T9.py @@ -18,11 +18,11 @@ from typing import List, Optional import asyncssh -from pyasic.data import HashBoard +from pyasic.data import AlgoHashRate, HashBoard, HashUnit from pyasic.errors import APIError from pyasic.miners.backends import Hiveon from pyasic.miners.data import DataFunction, DataLocations, DataOptions, RPCAPICommand -from pyasic.miners.models import T9 +from pyasic.miners.device.models import T9 HIVEON_T9_DATA_LOC = DataLocations( **{ @@ -121,7 +121,9 @@ class HiveonT9(Hiveon, T9): chips += rpc_stats["STATS"][1][f"chain_acn{chipset}"] except (KeyError, IndexError): pass - hashboards[board].hashrate = round(hashrate / 1000, 2) + hashboards[board].hashrate = AlgoHashRate.SHA256( + hashrate, HashUnit.SHA256.GH + ).into(self.algo.unit.default) hashboards[board].chips = chips return hashboards diff --git a/pyasic/miners/antminer/luxos/X19/S19.py b/pyasic/miners/antminer/luxos/X19/S19.py index d35a32ba..420f9253 100644 --- a/pyasic/miners/antminer/luxos/X19/S19.py +++ b/pyasic/miners/antminer/luxos/X19/S19.py @@ -15,7 +15,14 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import LUXMiner -from pyasic.miners.models import S19, S19XP, S19jPro, S19jProPlus, S19kPro, S19Pro +from pyasic.miners.device.models import ( + S19, + S19XP, + S19jPro, + S19jProPlus, + S19kPro, + S19Pro, +) class LUXMinerS19(LUXMiner, S19): diff --git a/pyasic/miners/antminer/luxos/X19/T19.py b/pyasic/miners/antminer/luxos/X19/T19.py index a529e239..d06361b2 100644 --- a/pyasic/miners/antminer/luxos/X19/T19.py +++ b/pyasic/miners/antminer/luxos/X19/T19.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import LUXMiner -from pyasic.miners.models import T19 +from pyasic.miners.device.models import T19 class LUXMinerT19(LUXMiner, T19): diff --git a/pyasic/miners/antminer/luxos/X21/S21.py b/pyasic/miners/antminer/luxos/X21/S21.py index bb5a27de..92dcac93 100644 --- a/pyasic/miners/antminer/luxos/X21/S21.py +++ b/pyasic/miners/antminer/luxos/X21/S21.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import LUXMiner -from pyasic.miners.models import S21 +from pyasic.miners.device.models import S21 class LUXMinerS21(LUXMiner, S21): diff --git a/pyasic/miners/antminer/luxos/X9/S9.py b/pyasic/miners/antminer/luxos/X9/S9.py index 44828902..ca69c199 100644 --- a/pyasic/miners/antminer/luxos/X9/S9.py +++ b/pyasic/miners/antminer/luxos/X9/S9.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import LUXMiner -from pyasic.miners.models import S9 +from pyasic.miners.device.models import S9 class LUXMinerS9(LUXMiner, S9): diff --git a/pyasic/miners/antminer/marathon/X19/S19.py b/pyasic/miners/antminer/marathon/X19/S19.py index fc336fdf..1f0beebd 100644 --- a/pyasic/miners/antminer/marathon/X19/S19.py +++ b/pyasic/miners/antminer/marathon/X19/S19.py @@ -15,7 +15,15 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import MaraMiner -from pyasic.miners.models import S19, S19XP, S19j, S19jNoPIC, S19jPro, S19KPro, S19Pro +from pyasic.miners.device.models import ( + S19, + S19XP, + S19j, + S19jNoPIC, + S19jPro, + S19KPro, + S19Pro, +) class MaraS19(MaraMiner, S19): diff --git a/pyasic/miners/antminer/marathon/X21/S21.py b/pyasic/miners/antminer/marathon/X21/S21.py index ad82a17c..d65f2a72 100644 --- a/pyasic/miners/antminer/marathon/X21/S21.py +++ b/pyasic/miners/antminer/marathon/X21/S21.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import MaraMiner -from pyasic.miners.models import S21 +from pyasic.miners.device.models import S21 class MaraS21(MaraMiner, S21): diff --git a/pyasic/miners/antminer/marathon/X21/T21.py b/pyasic/miners/antminer/marathon/X21/T21.py index 206bc823..7f00a7ec 100644 --- a/pyasic/miners/antminer/marathon/X21/T21.py +++ b/pyasic/miners/antminer/marathon/X21/T21.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import MaraMiner -from pyasic.miners.models import T21 +from pyasic.miners.device.models import T21 class MaraT21(MaraMiner, T21): diff --git a/pyasic/miners/antminer/vnish/X17/S17.py b/pyasic/miners/antminer/vnish/X17/S17.py index ed412037..07c135c5 100644 --- a/pyasic/miners/antminer/vnish/X17/S17.py +++ b/pyasic/miners/antminer/vnish/X17/S17.py @@ -14,7 +14,7 @@ # limitations under the License. - # ------------------------------------------------------------------------------ from pyasic.miners.backends import VNish -from pyasic.miners.models import S17Plus, S17Pro +from pyasic.miners.device.models import S17Plus, S17Pro class VNishS17Plus(VNish, S17Plus): diff --git a/pyasic/miners/antminer/vnish/X19/S19.py b/pyasic/miners/antminer/vnish/X19/S19.py index d55d8e0e..032d5db9 100644 --- a/pyasic/miners/antminer/vnish/X19/S19.py +++ b/pyasic/miners/antminer/vnish/X19/S19.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import VNish -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( S19, S19XP, S19a, diff --git a/pyasic/miners/antminer/vnish/X19/T19.py b/pyasic/miners/antminer/vnish/X19/T19.py index 2c58f15a..a5c781a6 100644 --- a/pyasic/miners/antminer/vnish/X19/T19.py +++ b/pyasic/miners/antminer/vnish/X19/T19.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import VNish -from pyasic.miners.models import T19 +from pyasic.miners.device.models import T19 class VNishT19(VNish, T19): diff --git a/pyasic/miners/antminer/vnish/X3/L3.py b/pyasic/miners/antminer/vnish/X3/L3.py index 2e7b5cf2..f88b8336 100644 --- a/pyasic/miners/antminer/vnish/X3/L3.py +++ b/pyasic/miners/antminer/vnish/X3/L3.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import VNish -from pyasic.miners.models import L3Plus +from pyasic.miners.device.models import L3Plus class VnishL3Plus(VNish, L3Plus): diff --git a/pyasic/miners/antminer/vnish/X7/L7.py b/pyasic/miners/antminer/vnish/X7/L7.py index 6c0f1a44..dd117d9f 100644 --- a/pyasic/miners/antminer/vnish/X7/L7.py +++ b/pyasic/miners/antminer/vnish/X7/L7.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import VNish -from pyasic.miners.models import L7 +from pyasic.miners.device.models import L7 class VnishL7(VNish, L7): diff --git a/pyasic/miners/auradine/flux/AD/AT1.py b/pyasic/miners/auradine/flux/AD/AT1.py index 33e26a6c..e69aa667 100644 --- a/pyasic/miners/auradine/flux/AD/AT1.py +++ b/pyasic/miners/auradine/flux/AD/AT1.py @@ -1,5 +1,5 @@ from pyasic.miners.backends import Auradine -from pyasic.miners.models import AuradineAT1500 +from pyasic.miners.device.models import AuradineAT1500 class AuradineFluxAT1500(AuradineAT1500, Auradine): diff --git a/pyasic/miners/auradine/flux/AD/AT2.py b/pyasic/miners/auradine/flux/AD/AT2.py index 69d39af9..fc0010de 100644 --- a/pyasic/miners/auradine/flux/AD/AT2.py +++ b/pyasic/miners/auradine/flux/AD/AT2.py @@ -1,5 +1,5 @@ from pyasic.miners.backends import Auradine -from pyasic.miners.models import AuradineAT2860, AuradineAT2880 +from pyasic.miners.device.models import AuradineAT2860, AuradineAT2880 class AuradineFluxAT2860(AuradineAT2860, Auradine): diff --git a/pyasic/miners/auradine/flux/AI/AI2.py b/pyasic/miners/auradine/flux/AI/AI2.py index 4d260c67..303fe405 100644 --- a/pyasic/miners/auradine/flux/AI/AI2.py +++ b/pyasic/miners/auradine/flux/AI/AI2.py @@ -1,5 +1,5 @@ from pyasic.miners.backends import Auradine -from pyasic.miners.models import AuradineAI2500 +from pyasic.miners.device.models import AuradineAI2500 class AuradineFluxAI2500(AuradineAI2500, Auradine): diff --git a/pyasic/miners/auradine/flux/AI/AI3.py b/pyasic/miners/auradine/flux/AI/AI3.py index 8ce8c3a7..1ee2a08b 100644 --- a/pyasic/miners/auradine/flux/AI/AI3.py +++ b/pyasic/miners/auradine/flux/AI/AI3.py @@ -1,5 +1,5 @@ from pyasic.miners.backends import Auradine -from pyasic.miners.models import AuradineAI3680 +from pyasic.miners.device.models import AuradineAI3680 class AuradineFluxAI3680(AuradineAI3680, Auradine): diff --git a/pyasic/miners/auradine/flux/AT/AD2.py b/pyasic/miners/auradine/flux/AT/AD2.py index 827d1a7c..31ef88c6 100644 --- a/pyasic/miners/auradine/flux/AT/AD2.py +++ b/pyasic/miners/auradine/flux/AT/AD2.py @@ -1,5 +1,5 @@ from pyasic.miners.backends import Auradine -from pyasic.miners.models import AuradineAD2500 +from pyasic.miners.device.models import AuradineAD2500 class AuradineFluxAD2500(AuradineAD2500, Auradine): diff --git a/pyasic/miners/auradine/flux/AT/AD3.py b/pyasic/miners/auradine/flux/AT/AD3.py index 0e9d113a..80bd1aca 100644 --- a/pyasic/miners/auradine/flux/AT/AD3.py +++ b/pyasic/miners/auradine/flux/AT/AD3.py @@ -1,5 +1,5 @@ from pyasic.miners.backends import Auradine -from pyasic.miners.models import AuradineAD3500 +from pyasic.miners.device.models import AuradineAD3500 class AuradineFluxAD3500(AuradineAD3500, Auradine): diff --git a/pyasic/miners/avalonminer/cgminer/A10X/A1026.py b/pyasic/miners/avalonminer/cgminer/A10X/A1026.py index 613f8d2f..9f9f58fa 100644 --- a/pyasic/miners/avalonminer/cgminer/A10X/A1026.py +++ b/pyasic/miners/avalonminer/cgminer/A10X/A1026.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon1026 +from pyasic.miners.device.models import Avalon1026 class CGMinerAvalon1026(AvalonMiner, Avalon1026): diff --git a/pyasic/miners/avalonminer/cgminer/A10X/A1047.py b/pyasic/miners/avalonminer/cgminer/A10X/A1047.py index 77488f41..ff631bcb 100644 --- a/pyasic/miners/avalonminer/cgminer/A10X/A1047.py +++ b/pyasic/miners/avalonminer/cgminer/A10X/A1047.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon1047 +from pyasic.miners.device.models import Avalon1047 class CGMinerAvalon1047(AvalonMiner, Avalon1047): diff --git a/pyasic/miners/avalonminer/cgminer/A10X/A1066.py b/pyasic/miners/avalonminer/cgminer/A10X/A1066.py index 2591feff..80be17b7 100644 --- a/pyasic/miners/avalonminer/cgminer/A10X/A1066.py +++ b/pyasic/miners/avalonminer/cgminer/A10X/A1066.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon1066 +from pyasic.miners.device.models import Avalon1066 class CGMinerAvalon1066(AvalonMiner, Avalon1066): diff --git a/pyasic/miners/avalonminer/cgminer/A11X/A1166.py b/pyasic/miners/avalonminer/cgminer/A11X/A1166.py index 14642696..12dc5c8a 100644 --- a/pyasic/miners/avalonminer/cgminer/A11X/A1166.py +++ b/pyasic/miners/avalonminer/cgminer/A11X/A1166.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon1166Pro +from pyasic.miners.device.models import Avalon1166Pro class CGMinerAvalon1166Pro(AvalonMiner, Avalon1166Pro): diff --git a/pyasic/miners/avalonminer/cgminer/A12X/A1246.py b/pyasic/miners/avalonminer/cgminer/A12X/A1246.py index cbbe55a4..33996a22 100644 --- a/pyasic/miners/avalonminer/cgminer/A12X/A1246.py +++ b/pyasic/miners/avalonminer/cgminer/A12X/A1246.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon1246 +from pyasic.miners.device.models import Avalon1246 class CGMinerAvalon1246(AvalonMiner, Avalon1246): diff --git a/pyasic/miners/avalonminer/cgminer/A7X/A721.py b/pyasic/miners/avalonminer/cgminer/A7X/A721.py index 27d029bb..e58ae5c0 100644 --- a/pyasic/miners/avalonminer/cgminer/A7X/A721.py +++ b/pyasic/miners/avalonminer/cgminer/A7X/A721.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon721 +from pyasic.miners.device.models import Avalon721 class CGMinerAvalon721(AvalonMiner, Avalon721): diff --git a/pyasic/miners/avalonminer/cgminer/A7X/A741.py b/pyasic/miners/avalonminer/cgminer/A7X/A741.py index 7c7af22f..5f9f2ec8 100644 --- a/pyasic/miners/avalonminer/cgminer/A7X/A741.py +++ b/pyasic/miners/avalonminer/cgminer/A7X/A741.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon741 +from pyasic.miners.device.models import Avalon741 class CGMinerAvalon741(AvalonMiner, Avalon741): diff --git a/pyasic/miners/avalonminer/cgminer/A7X/A761.py b/pyasic/miners/avalonminer/cgminer/A7X/A761.py index e0eebcdb..4fd2a76e 100644 --- a/pyasic/miners/avalonminer/cgminer/A7X/A761.py +++ b/pyasic/miners/avalonminer/cgminer/A7X/A761.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon761 +from pyasic.miners.device.models import Avalon761 class CGMinerAvalon761(AvalonMiner, Avalon761): diff --git a/pyasic/miners/avalonminer/cgminer/A8X/A821.py b/pyasic/miners/avalonminer/cgminer/A8X/A821.py index c644d665..f27cd55c 100644 --- a/pyasic/miners/avalonminer/cgminer/A8X/A821.py +++ b/pyasic/miners/avalonminer/cgminer/A8X/A821.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon821 +from pyasic.miners.device.models import Avalon821 class CGMinerAvalon821(AvalonMiner, Avalon821): diff --git a/pyasic/miners/avalonminer/cgminer/A8X/A841.py b/pyasic/miners/avalonminer/cgminer/A8X/A841.py index 0293ce09..f83d8084 100644 --- a/pyasic/miners/avalonminer/cgminer/A8X/A841.py +++ b/pyasic/miners/avalonminer/cgminer/A8X/A841.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon841 +from pyasic.miners.device.models import Avalon841 class CGMinerAvalon841(AvalonMiner, Avalon841): diff --git a/pyasic/miners/avalonminer/cgminer/A8X/A851.py b/pyasic/miners/avalonminer/cgminer/A8X/A851.py index 05f7ac35..9b05ea3b 100644 --- a/pyasic/miners/avalonminer/cgminer/A8X/A851.py +++ b/pyasic/miners/avalonminer/cgminer/A8X/A851.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon851 +from pyasic.miners.device.models import Avalon851 class CGMinerAvalon851(AvalonMiner, Avalon851): diff --git a/pyasic/miners/avalonminer/cgminer/A9X/A921.py b/pyasic/miners/avalonminer/cgminer/A9X/A921.py index b513d89f..db92c030 100644 --- a/pyasic/miners/avalonminer/cgminer/A9X/A921.py +++ b/pyasic/miners/avalonminer/cgminer/A9X/A921.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import AvalonMiner -from pyasic.miners.models import Avalon921 +from pyasic.miners.device.models import Avalon921 class CGMinerAvalon921(AvalonMiner, Avalon921): diff --git a/pyasic/miners/backends/antminer.py b/pyasic/miners/backends/antminer.py index b9164c9c..7e072e32 100644 --- a/pyasic/miners/backends/antminer.py +++ b/pyasic/miners/backends/antminer.py @@ -17,12 +17,11 @@ from typing import List, Optional, Union from pyasic.config import MinerConfig, MiningModeConfig -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.data.error_codes import MinerErrorData, X19Error from pyasic.errors import APIError from pyasic.miners.backends.bmminer import BMMiner from pyasic.miners.backends.cgminer import CGMiner -from pyasic.miners.base import BaseMiner from pyasic.miners.data import ( DataFunction, DataLocations, @@ -219,9 +218,9 @@ class AntminerModern(BMMiner): if rpc_stats is not None: try: for board in rpc_stats["STATS"][0]["chain"]: - hashboards[board["index"]].hashrate = round( - board["rate_real"] / 1000, 2 - ) + hashboards[board["index"]].hashrate = AlgoHashRate.SHA256( + board["rate_real"], HashUnit.SHA256.GH + ).into(self.algo.unit.default) hashboards[board["index"]].chips = board["asic_num"] board_temp_data = list( filter(lambda x: not x == 0, board["temp_pcb"]) @@ -274,12 +273,9 @@ class AntminerModern(BMMiner): rate_unit = rpc_stats["STATS"][1]["rate_unit"] except KeyError: rate_unit = "GH" - if rate_unit == "GH": - return round(expected_rate / 1000, 2) - if rate_unit == "MH": - return round(expected_rate / 1000000, 2) - else: - return round(expected_rate, 2) + return AlgoHashRate.SHA256( + expected_rate, HashUnit.SHA256.from_str(rate_unit) + ).int(self.algo.unit.default) except LookupError: pass @@ -553,7 +549,9 @@ class AntminerOld(CGMiner): hashrate = boards[1].get(f"chain_rate{i}") if hashrate: - hashboard.hashrate = round(float(hashrate) / 1000, 2) + hashboard.hashrate = AlgoHashRate.SHA256( + hashrate, HashUnit.SHA256.GH + ).into(self.algo.unit.default) chips = boards[1].get(f"chain_acn{i}") if chips: diff --git a/pyasic/miners/backends/auradine.py b/pyasic/miners/backends/auradine.py index 793e9c82..37290048 100644 --- a/pyasic/miners/backends/auradine.py +++ b/pyasic/miners/backends/auradine.py @@ -18,9 +18,8 @@ from enum import Enum from typing import List, Optional from pyasic.config import MinerConfig -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.errors import APIError -from pyasic.miners.base import BaseMiner from pyasic.miners.data import ( DataFunction, DataLocations, @@ -28,6 +27,7 @@ from pyasic.miners.data import ( RPCAPICommand, WebAPICommand, ) +from pyasic.miners.device.firmware import StockFirmware from pyasic.rpc.gcminer import GCMinerRPCAPI from pyasic.web.auradine import AuradineWebAPI @@ -113,7 +113,7 @@ class AuradineLEDCodes(Enum): return self.value -class Auradine(BaseMiner): +class Auradine(StockFirmware): """Base handler for Auradine miners""" _rpc_cls = GCMinerRPCAPI @@ -245,9 +245,9 @@ class Auradine(BaseMiner): if rpc_summary is not None: try: - return round( - float(float(rpc_summary["SUMMARY"][0]["MHS 5s"]) / 1000000), 2 - ) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["MHS 5s"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) except (LookupError, ValueError, TypeError): pass @@ -274,9 +274,9 @@ class Auradine(BaseMiner): try: for board in rpc_devs["DEVS"]: b_id = board["ID"] - 1 - hashboards[b_id].hashrate = round( - float(float(board["MHS 5s"]) / 1000000), 2 - ) + hashboards[b_id].hashrate = AlgoHashRate.SHA256( + board["MHS 5s"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) hashboards[b_id].temp = round(float(float(board["Temperature"])), 2) hashboards[b_id].missing = False except LookupError: diff --git a/pyasic/miners/backends/avalonminer.py b/pyasic/miners/backends/avalonminer.py index 58e11acf..2a1b9b99 100644 --- a/pyasic/miners/backends/avalonminer.py +++ b/pyasic/miners/backends/avalonminer.py @@ -17,7 +17,7 @@ import re from typing import List, Optional -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.errors import APIError from pyasic.miners.backends.cgminer import CGMiner from pyasic.miners.data import DataFunction, DataLocations, DataOptions, RPCAPICommand @@ -182,7 +182,9 @@ class AvalonMiner(CGMiner): if rpc_devs is not None: try: - return round(float(rpc_devs["DEVS"][0]["MHS 1m"] / 1000000), 2) + return AlgoHashRate.SHA256( + rpc_devs["DEVS"][0]["MHS 1m"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) except (KeyError, IndexError, ValueError, TypeError): pass @@ -213,7 +215,9 @@ class AvalonMiner(CGMiner): try: board_hr = parsed_stats["MGHS"][board] - hashboards[board].hashrate = round(float(board_hr) / 1000, 2) + hashboards[board].hashrate = AlgoHashRate.SHA256( + board_hr, HashUnit.SHA256.GH + ).into(self.algo.unit.default) except LookupError: pass @@ -245,7 +249,9 @@ class AvalonMiner(CGMiner): try: unparsed_stats = rpc_stats["STATS"][0]["MM ID0"] parsed_stats = self.parse_stats(unparsed_stats) - return round(float(parsed_stats["GHSmm"]) / 1000, 2) + return AlgoHashRate.SHA256( + parsed_stats["GHSmm"], HashUnit.SHA256.GH + ).int(self.algo.unit.default) except (IndexError, KeyError, ValueError, TypeError): pass diff --git a/pyasic/miners/backends/bfgminer.py b/pyasic/miners/backends/bfgminer.py index 250031a2..9b1975b0 100644 --- a/pyasic/miners/backends/bfgminer.py +++ b/pyasic/miners/backends/bfgminer.py @@ -17,10 +17,10 @@ from typing import List, Optional from pyasic.config import MinerConfig -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.errors import APIError -from pyasic.miners.base import BaseMiner from pyasic.miners.data import DataFunction, DataLocations, DataOptions, RPCAPICommand +from pyasic.miners.device.firmware import StockFirmware from pyasic.rpc.bfgminer import BFGMinerRPCAPI BFGMINER_DATA_LOC = DataLocations( @@ -53,7 +53,7 @@ BFGMINER_DATA_LOC = DataLocations( ) -class BFGMiner(BaseMiner): +class BFGMiner(StockFirmware): """Base handler for BFGMiner based miners.""" _rpc_cls = BFGMinerRPCAPI @@ -115,7 +115,9 @@ class BFGMiner(BaseMiner): if rpc_summary is not None: try: - return round(float(rpc_summary["SUMMARY"][0]["MHS 20s"] / 1000000), 2) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["MHS 20s"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) except (LookupError, ValueError, TypeError): pass @@ -159,7 +161,9 @@ class BFGMiner(BaseMiner): hashrate = boards[1].get(f"chain_rate{i}") if hashrate: - hashboard.hashrate = round(float(hashrate) / 1000, 2) + hashboard.hashrate = AlgoHashRate.SHA256( + hashrate, HashUnit.SHA256.GH + ).into(self.algo.unit.default) chips = boards[1].get(f"chain_acn{i}") if chips: @@ -218,11 +222,8 @@ class BFGMiner(BaseMiner): rate_unit = rpc_stats["STATS"][1]["rate_unit"] except KeyError: rate_unit = "GH" - if rate_unit == "GH": - return round(expected_rate / 1000, 2) - if rate_unit == "MH": - return round(expected_rate / 1000000, 2) - else: - return round(expected_rate, 2) + return AlgoHashRate.SHA256( + expected_rate, HashUnit.SHA256.from_str(rate_unit) + ).int(self.algo.unit.default) except LookupError: pass diff --git a/pyasic/miners/backends/bmminer.py b/pyasic/miners/backends/bmminer.py index ce2a6a49..6501051e 100644 --- a/pyasic/miners/backends/bmminer.py +++ b/pyasic/miners/backends/bmminer.py @@ -17,10 +17,10 @@ from typing import List, Optional from pyasic.config import MinerConfig -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.errors import APIError -from pyasic.miners.base import BaseMiner from pyasic.miners.data import DataFunction, DataLocations, DataOptions, RPCAPICommand +from pyasic.miners.device.firmware import StockFirmware from pyasic.rpc.bmminer import BMMinerRPCAPI BMMINER_DATA_LOC = DataLocations( @@ -57,7 +57,7 @@ BMMINER_DATA_LOC = DataLocations( ) -class BMMiner(BaseMiner): +class BMMiner(StockFirmware): """Base handler for BMMiner based miners.""" _rpc_cls = BMMinerRPCAPI @@ -119,7 +119,9 @@ class BMMiner(BaseMiner): if rpc_summary is not None: try: - return round(float(rpc_summary["SUMMARY"][0]["GHS 5s"] / 1000), 2) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["GHS 5s"], HashUnit.SHA256.GH + ).into(self.algo.unit.default) except (LookupError, ValueError, TypeError): pass @@ -176,7 +178,9 @@ class BMMiner(BaseMiner): hashrate = boards[1].get(f"chain_rate{i}") if hashrate: - hashboard.hashrate = round(float(hashrate) / 1000, 2) + hashboard.hashrate = AlgoHashRate.SHA256( + hashrate, HashUnit.SHA256.GH + ).into(self.algo.unit.default) chips = boards[1].get(f"chain_acn{i}") if chips: @@ -234,12 +238,9 @@ class BMMiner(BaseMiner): rate_unit = rpc_stats["STATS"][1]["rate_unit"] except KeyError: rate_unit = "GH" - if rate_unit == "GH": - return round(expected_rate / 1000, 2) - if rate_unit == "MH": - return round(expected_rate / 1000000, 2) - else: - return round(expected_rate, 2) + return AlgoHashRate.SHA256( + expected_rate, HashUnit.SHA256.from_str(rate_unit) + ).int(self.algo.unit.default) except LookupError: pass diff --git a/pyasic/miners/backends/braiins_os.py b/pyasic/miners/backends/braiins_os.py index 4d3d31ca..c2c3928d 100644 --- a/pyasic/miners/backends/braiins_os.py +++ b/pyasic/miners/backends/braiins_os.py @@ -21,10 +21,9 @@ import toml from pyasic.config import MinerConfig from pyasic.config.mining import MiningModePowerTune -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.data.error_codes import BraiinsOSError, MinerErrorData from pyasic.errors import APIError -from pyasic.miners.base import BaseMiner from pyasic.miners.data import ( DataFunction, DataLocations, @@ -32,6 +31,7 @@ from pyasic.miners.data import ( RPCAPICommand, WebAPICommand, ) +from pyasic.miners.device.firmware import BraiinsOSFirmware from pyasic.rpc.bosminer import BOSMinerRPCAPI from pyasic.ssh.braiins_os import BOSMinerSSH from pyasic.web.braiins_os import BOSerWebAPI, BOSMinerWebAPI @@ -95,7 +95,7 @@ BOSMINER_DATA_LOC = DataLocations( ) -class BOSMiner(BaseMiner): +class BOSMiner(BraiinsOSFirmware): """Handler for old versions of BraiinsOS+ (pre-gRPC)""" _rpc_cls = BOSMinerRPCAPI @@ -105,8 +105,6 @@ class BOSMiner(BaseMiner): _ssh_cls = BOSMinerSSH ssh: BOSMinerSSH - firmware = "BOS+" - data_locations = BOSMINER_DATA_LOC supports_shutdown = True @@ -352,7 +350,9 @@ class BOSMiner(BaseMiner): if rpc_summary is not None: try: - return round(float(rpc_summary["SUMMARY"][0]["MHS 1m"] / 1000000), 2) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["MHS 1m"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) except (KeyError, IndexError, ValueError, TypeError): pass @@ -422,8 +422,9 @@ class BOSMiner(BaseMiner): for board in rpc_devs["DEVS"]: _id = board["ID"] - offset - hashrate = round(float(board["MHS 1m"] / 1000000), 2) - hashboards[_id].hashrate = hashrate + hashboards[_id].hashrate = AlgoHashRate.SHA256( + board["MHS 1m"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) except (IndexError, KeyError): pass @@ -531,11 +532,12 @@ class BOSMiner(BaseMiner): expected_hashrate = round(float(board["Nominal MHS"] / 1000000), 2) if expected_hashrate: hr_list.append(expected_hashrate) + if len(hr_list) == 0: - return 0 + return AlgoHashRate.SHA256(0) else: - return round( - (sum(hr_list) / len(hr_list)) * self.expected_hashboards, 2 + return AlgoHashRate.SHA256( + (sum(hr_list) / len(hr_list)) * self.expected_hashboards ) except (IndexError, KeyError): pass @@ -635,7 +637,7 @@ BOSER_DATA_LOC = DataLocations( ) -class BOSer(BaseMiner): +class BOSer(BraiinsOSFirmware): """Handler for new versions of BraiinsOS+ (post-gRPC)""" _rpc_cls = BOSMinerRPCAPI @@ -643,8 +645,6 @@ class BOSer(BaseMiner): _web_cls = BOSerWebAPI web: BOSerWebAPI - firmware = "BOS+" - data_locations = BOSER_DATA_LOC supports_autotuning = True @@ -788,7 +788,9 @@ class BOSer(BaseMiner): if rpc_summary is not None: try: - return round(float(rpc_summary["SUMMARY"][0]["MHS 1m"] / 1000000), 2) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["MHS 1m"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) except (KeyError, IndexError, ValueError, TypeError): pass @@ -803,7 +805,10 @@ class BOSer(BaseMiner): if grpc_miner_details is not None: try: - return grpc_miner_details["stickerHashrate"]["gigahashPerSecond"] / 1000 + return AlgoHashRate.SHA256( + grpc_miner_details["stickerHashrate"]["gigahashPerSecond"], + HashUnit.SHA256.GH, + ).into(self.algo.unit.default) except LookupError: pass @@ -832,13 +837,12 @@ class BOSer(BaseMiner): ] if board.get("stats") is not None: if not board["stats"]["realHashrate"]["last5S"] == {}: - hashboards[idx].hashrate = round( + hashboards[idx].hashrate = AlgoHashRate.SHA256( board["stats"]["realHashrate"]["last5S"][ "gigahashPerSecond" - ] - / 1000, - 2, - ) + ], + HashUnit.SHA256.GH, + ).into(self.algo.unit.default) hashboards[idx].missing = False return hashboards diff --git a/pyasic/miners/backends/btminer.py b/pyasic/miners/backends/btminer.py index 2ab45270..01e4ac8c 100644 --- a/pyasic/miners/backends/btminer.py +++ b/pyasic/miners/backends/btminer.py @@ -18,11 +18,11 @@ import logging from typing import List, Optional from pyasic.config import MinerConfig, MiningModeConfig -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.data.error_codes import MinerErrorData, WhatsminerError from pyasic.errors import APIError -from pyasic.miners.base import BaseMiner from pyasic.miners.data import DataFunction, DataLocations, DataOptions, RPCAPICommand +from pyasic.miners.device.firmware import StockFirmware from pyasic.rpc.btminer import BTMinerRPCAPI BTMINER_DATA_LOC = DataLocations( @@ -110,7 +110,7 @@ BTMINER_DATA_LOC = DataLocations( ) -class BTMiner(BaseMiner): +class BTMiner(StockFirmware): """Base handler for BTMiner based miners.""" _rpc_cls = BTMinerRPCAPI @@ -395,7 +395,9 @@ class BTMiner(BaseMiner): if rpc_summary is not None: try: - return round(float(rpc_summary["SUMMARY"][0]["MHS 1m"] / 1000000), 2) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["MHS 1m"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) except LookupError: pass @@ -423,9 +425,9 @@ class BTMiner(BaseMiner): self.expected_hashboards += 1 hashboards[board["ASC"]].chip_temp = round(board["Chip Temp Avg"]) hashboards[board["ASC"]].temp = round(board["Temperature"]) - hashboards[board["ASC"]].hashrate = round( - float(board["MHS 1m"] / 1000000), 2 - ) + hashboards[board["ASC"]].hashrate = AlgoHashRate.SHA256( + board["MHS 1m"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) hashboards[board["ASC"]].chips = board["Effective Chips"] hashboards[board["ASC"]].serial_number = board["PCB SN"] hashboards[board["ASC"]].missing = False @@ -571,7 +573,10 @@ class BTMiner(BaseMiner): try: expected_hashrate = rpc_summary["SUMMARY"][0]["Factory GHS"] if expected_hashrate: - return round(expected_hashrate / 1000, 2) + return AlgoHashRate.SHA256( + expected_hashrate, HashUnit.SHA256.GH + ).int(self.algo.unit.default) + except LookupError: pass diff --git a/pyasic/miners/backends/cgminer.py b/pyasic/miners/backends/cgminer.py index 95d1a9a2..53322aed 100644 --- a/pyasic/miners/backends/cgminer.py +++ b/pyasic/miners/backends/cgminer.py @@ -17,9 +17,10 @@ from typing import Optional from pyasic.config import MinerConfig +from pyasic.data import AlgoHashRate, HashUnit from pyasic.errors import APIError -from pyasic.miners.base import BaseMiner from pyasic.miners.data import DataFunction, DataLocations, DataOptions, RPCAPICommand +from pyasic.miners.device.firmware import StockFirmware from pyasic.rpc.cgminer import CGMinerRPCAPI CGMINER_DATA_LOC = DataLocations( @@ -56,7 +57,7 @@ CGMINER_DATA_LOC = DataLocations( ) -class CGMiner(BaseMiner): +class CGMiner(StockFirmware): """Base handler for CGMiner based miners""" _rpc_cls = CGMinerRPCAPI @@ -117,9 +118,9 @@ class CGMiner(BaseMiner): if rpc_summary is not None: try: - return round( - float(float(rpc_summary["SUMMARY"][0]["GHS 5s"]) / 1000), 2 - ) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["GHS 5s"], HashUnit.SHA256.GH + ).into(self.algo.unit.default) except (LookupError, ValueError, TypeError): pass diff --git a/pyasic/miners/backends/epic.py b/pyasic/miners/backends/epic.py index 94e6d800..ac537d62 100644 --- a/pyasic/miners/backends/epic.py +++ b/pyasic/miners/backends/epic.py @@ -17,12 +17,12 @@ from typing import List, Optional from pyasic.config import MinerConfig -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.data.error_codes import MinerErrorData, X19Error from pyasic.errors import APIError from pyasic.logger import logger -from pyasic.miners.base import BaseMiner from pyasic.miners.data import DataFunction, DataLocations, DataOptions, WebAPICommand +from pyasic.miners.device.firmware import ePICFirmware from pyasic.web.epic import ePICWebAPI EPIC_DATA_LOC = DataLocations( @@ -86,14 +86,12 @@ EPIC_DATA_LOC = DataLocations( ) -class ePIC(BaseMiner): +class ePIC(ePICFirmware): """Handler for miners with the ePIC board""" _web_cls = ePICWebAPI web: ePICWebAPI - firmware = "ePIC" - data_locations = EPIC_DATA_LOC supports_shutdown = True @@ -248,7 +246,9 @@ class ePIC(BaseMiner): if web_summary["HBs"] is not None: for hb in web_summary["HBs"]: hashrate += hb["Hashrate"][0] - return round(float(float(hashrate / 1000000)), 2) + return AlgoHashRate.SHA256(hashrate, HashUnit.SHA256.MH).into( + HashUnit.SHA256.TH + ) except (LookupError, ValueError, TypeError): pass @@ -270,7 +270,9 @@ class ePIC(BaseMiner): ideal = hb["Hashrate"][1] / 100 hashrate += hb["Hashrate"][0] / ideal - return round(float(float(hashrate / 1000000)), 2) + return AlgoHashRate.SHA256(hashrate, HashUnit.SHA256.GH).int( + self.algo.unit.default + ) except (LookupError, ValueError, TypeError): pass @@ -342,7 +344,9 @@ class ePIC(BaseMiner): hashrate = hb["Hashrate"][0] # Update the Hashboard object hb_list[hb["Index"]].missing = False - hb_list[hb["Index"]].hashrate = round(hashrate / 1000000, 2) + hb_list[hb["Index"]].hashrate = AlgoHashRate.SHA256( + hashrate, HashUnit.SHA256.MH + ).into(self.algo.unit.default) hb_list[hb["Index"]].chips = num_of_chips hb_list[hb["Index"]].temp = hb["Temperature"] return hb_list diff --git a/pyasic/miners/backends/goldshell.py b/pyasic/miners/backends/goldshell.py index c6159db3..8bf1553f 100644 --- a/pyasic/miners/backends/goldshell.py +++ b/pyasic/miners/backends/goldshell.py @@ -16,7 +16,7 @@ from typing import List from pyasic.config import MinerConfig, MiningModeConfig -from pyasic.data import HashBoard +from pyasic.data import AlgoHashRate, HashBoard, HashUnit from pyasic.errors import APIError from pyasic.logger import logger from pyasic.miners.backends import BFGMiner @@ -158,9 +158,9 @@ class GoldshellMiner(BFGMiner): if board.get("ID") is not None: try: b_id = board["ID"] - hashboards[b_id].hashrate = round( - board["MHS 20s"] / 1000000, 2 - ) + hashboards[b_id].hashrate = AlgoHashRate.SHA256( + board["MHS 20s"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) hashboards[b_id].temp = board["tstemp-2"] hashboards[b_id].missing = False except KeyError: diff --git a/pyasic/miners/backends/hiveon.py b/pyasic/miners/backends/hiveon.py index 8680d3b3..272214a0 100644 --- a/pyasic/miners/backends/hiveon.py +++ b/pyasic/miners/backends/hiveon.py @@ -15,7 +15,8 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import BMMiner +from pyasic.miners.device.firmware import HiveonFirmware -class Hiveon(BMMiner): - firmware = "Hive" +class Hiveon(BMMiner, HiveonFirmware): + pass diff --git a/pyasic/miners/backends/innosilicon.py b/pyasic/miners/backends/innosilicon.py index d806aa15..8efe28f2 100644 --- a/pyasic/miners/backends/innosilicon.py +++ b/pyasic/miners/backends/innosilicon.py @@ -16,7 +16,7 @@ from typing import List, Optional from pyasic.config import MinerConfig -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.data.error_codes import MinerErrorData from pyasic.data.error_codes.innosilicon import InnosiliconError from pyasic.errors import APIError @@ -182,20 +182,21 @@ class Innosilicon(CGMiner): if web_get_all is not None: try: if "Hash Rate H" in web_get_all["total_hash"].keys(): - return round( - float(web_get_all["total_hash"]["Hash Rate H"] / 1000000000000), - 2, - ) + return AlgoHashRate.SHA256( + web_get_all["total_hash"]["Hash Rate H"], HashUnit.SHA256.H + ).into(self.algo.unit.default) elif "Hash Rate" in web_get_all["total_hash"].keys(): - return round( - float(web_get_all["total_hash"]["Hash Rate"] / 1000000), 5 - ) + return AlgoHashRate.SHA256( + web_get_all["total_hash"]["Hash Rate"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) except KeyError: pass if rpc_summary is not None: try: - return round(float(rpc_summary["SUMMARY"][0]["MHS 1m"] / 1000000), 2) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["MHS 1m"], HashUnit.SHA256.MH + ).into(self.algo.unit.default) except (KeyError, IndexError): pass @@ -247,9 +248,9 @@ class Innosilicon(CGMiner): hashrate = board.get("Hash Rate H") if hashrate: - hashboards[idx].hashrate = round( - hashrate / 1000000000000, 2 - ) + hashboards[idx].hashrate = AlgoHashRate.SHA256( + hashrate, HashUnit.SHA256.H + ).into(self.algo.unit.default) chip_temp = board.get("Temp max") if chip_temp: diff --git a/pyasic/miners/backends/luxminer.py b/pyasic/miners/backends/luxminer.py index 7b6e542f..ccf00bdb 100644 --- a/pyasic/miners/backends/luxminer.py +++ b/pyasic/miners/backends/luxminer.py @@ -16,10 +16,10 @@ from typing import List, Optional from pyasic.config import MinerConfig -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.errors import APIError -from pyasic.miners.base import BaseMiner from pyasic.miners.data import DataFunction, DataLocations, DataOptions, RPCAPICommand +from pyasic.miners.device.firmware import LuxOSFirmware from pyasic.rpc.luxminer import LUXMinerRPCAPI LUXMINER_DATA_LOC = DataLocations( @@ -55,14 +55,12 @@ LUXMINER_DATA_LOC = DataLocations( ) -class LUXMiner(BaseMiner): +class LUXMiner(LuxOSFirmware): """Handler for LuxOS miners""" _rpc_cls = LUXMinerRPCAPI rpc: LUXMinerRPCAPI - firmware = "LuxOS" - data_locations = LUXMINER_DATA_LOC async def _get_session(self) -> Optional[str]: @@ -173,7 +171,9 @@ class LUXMiner(BaseMiner): if rpc_summary is not None: try: - return round(float(rpc_summary["SUMMARY"][0]["GHS 5s"] / 1000), 2) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["GHS 5s"], HashUnit.SHA256.GH + ).into(self.algo.unit.default) except (LookupError, ValueError, TypeError): pass @@ -217,7 +217,9 @@ class LUXMiner(BaseMiner): hashrate = boards[1].get(f"chain_rate{i}") if hashrate: - hashboard.hashrate = round(float(hashrate) / 1000, 2) + hashboard.hashrate = AlgoHashRate.SHA256( + hashrate, HashUnit.SHA256.GH + ).into(self.algo.unit.default) chips = boards[1].get(f"chain_acn{i}") if chips: @@ -275,12 +277,9 @@ class LUXMiner(BaseMiner): rate_unit = rpc_stats["STATS"][1]["rate_unit"] except KeyError: rate_unit = "GH" - if rate_unit == "GH": - return round(expected_rate / 1000, 2) - if rate_unit == "MH": - return round(expected_rate / 1000000, 2) - else: - return round(expected_rate, 2) + return AlgoHashRate.SHA256( + expected_rate, HashUnit.SHA256.from_str(rate_unit) + ).int(self.algo.unit.default) except LookupError: pass diff --git a/pyasic/miners/backends/marathon.py b/pyasic/miners/backends/marathon.py index 99c59a32..7fa1d913 100644 --- a/pyasic/miners/backends/marathon.py +++ b/pyasic/miners/backends/marathon.py @@ -2,10 +2,10 @@ from typing import List, Optional from pyasic import MinerConfig from pyasic.config import MiningModeConfig -from pyasic.data import Fan, HashBoard +from pyasic.data import AlgoHashRate, Fan, HashBoard, HashUnit from pyasic.errors import APIError -from pyasic.miners.base import BaseMiner from pyasic.miners.data import DataFunction, DataLocations, DataOptions, WebAPICommand +from pyasic.miners.device.firmware import MaraFirmware from pyasic.misc import merge_dicts from pyasic.web.marathon import MaraWebAPI @@ -63,14 +63,12 @@ MARA_DATA_LOC = DataLocations( ) -class MaraMiner(BaseMiner): +class MaraMiner(MaraFirmware): _web_cls = MaraWebAPI web: MaraWebAPI data_locations = MARA_DATA_LOC - firmware = "MaraFW" - async def fault_light_off(self) -> bool: res = await self.web.set_locate_miner(blinking=False) return res.get("blinking") is False @@ -172,7 +170,9 @@ class MaraMiner(BaseMiner): try: for hb in web_hashboards["hashboards"]: idx = hb["index"] - hashboards[idx].hashrate = round(hb["hashrate_average"] / 1000, 2) + hashboards[idx].hashrate = AlgoHashRate.SHA256( + hb["hashrate_average"], HashUnit.SHA256.GH + ).into(self.algo.unit.default) hashboards[idx].temp = round( sum(hb["temperature_pcb"]) / len(hb["temperature_pcb"]), 2 ) @@ -234,7 +234,9 @@ class MaraMiner(BaseMiner): if web_brief is not None: try: - return round(web_brief["hashrate_realtime"], 2) + return AlgoHashRate.SHA256( + web_brief["hashrate_realtime"], HashUnit.SHA256.TH + ).into(self.algo.unit.default) except LookupError: pass @@ -278,7 +280,9 @@ class MaraMiner(BaseMiner): if web_brief is not None: try: - return round(web_brief["hashrate_ideal"] / 1000, 2) + return AlgoHashRate.SHA256( + web_brief["hashrate_ideal"], HashUnit.SHA256.GH + ).int(self.algo.unit.default) except LookupError: pass diff --git a/pyasic/miners/backends/vnish.py b/pyasic/miners/backends/vnish.py index 15c60f41..91b3c6f0 100644 --- a/pyasic/miners/backends/vnish.py +++ b/pyasic/miners/backends/vnish.py @@ -17,6 +17,7 @@ from typing import Optional from pyasic import MinerConfig +from pyasic.data import AlgoHashRate, HashUnit from pyasic.errors import APIError from pyasic.miners.backends.bmminer import BMMiner from pyasic.miners.data import ( @@ -26,6 +27,7 @@ from pyasic.miners.data import ( RPCAPICommand, WebAPICommand, ) +from pyasic.miners.device.firmware import VNishFirmware from pyasic.web.vnish import VNishWebAPI VNISH_DATA_LOC = DataLocations( @@ -82,7 +84,7 @@ VNISH_DATA_LOC = DataLocations( ) -class VNish(BMMiner): +class VNish(BMMiner, VNishFirmware): """Handler for VNish miners""" _web_cls = VNishWebAPI @@ -90,8 +92,6 @@ class VNish(BMMiner): supports_shutdown = True - firmware = "VNish" - data_locations = VNISH_DATA_LOC async def restart_backend(self) -> bool: @@ -187,9 +187,9 @@ class VNish(BMMiner): if rpc_summary is not None: try: - return round( - float(float(rpc_summary["SUMMARY"][0]["GHS 5s"]) / 1000), 2 - ) + return AlgoHashRate.SHA256( + rpc_summary["SUMMARY"][0]["GHS 5s"], HashUnit.SHA256.GH + ).into(self.algo.unit.default) except (LookupError, ValueError, TypeError): pass diff --git a/pyasic/miners/base.py b/pyasic/miners/base.py index 82d63a33..f909d378 100644 --- a/pyasic/miners/base.py +++ b/pyasic/miners/base.py @@ -20,7 +20,12 @@ from typing import List, Optional, Protocol, Tuple, Type, TypeVar, Union from pyasic.config import MinerConfig from pyasic.data import Fan, HashBoard, MinerData +from pyasic.data.device import DeviceInfo from pyasic.data.error_codes import MinerErrorData +from pyasic.device import MinerModel +from pyasic.device.algorithm import MinerAlgo +from pyasic.device.firmware import MinerFirmware +from pyasic.device.makes import MinerMake from pyasic.errors import APIError from pyasic.logger import logger from pyasic.miners.data import DataLocations, DataOptions, RPCAPICommand, WebAPICommand @@ -36,9 +41,10 @@ class MinerProtocol(Protocol): web: _web_cls = None ssh: _ssh_cls = None - make: str = None - raw_model: str = None - firmware: str = None + make: MinerMake = None + raw_model: MinerModel = None + firmware: MinerFirmware = None + algo = MinerAlgo.SHA256 expected_hashboards: int = 3 expected_chips: int = None @@ -79,6 +85,12 @@ class MinerProtocol(Protocol): model_data.append(f"({self.firmware})") return " ".join(model_data) + @property + def device_info(self) -> DeviceInfo: + return DeviceInfo( + make=self.make, model=self.raw_model, firmware=self.firmware, algo=self.algo + ) + @property def api(self): return self.rpc @@ -183,6 +195,14 @@ class MinerProtocol(Protocol): """ return self.model + async def get_device_info(self) -> Optional[DeviceInfo]: + """Get device information, including model, make, and firmware. + + Returns: + A dataclass containing device information. + """ + return self.device_info + async def get_api_ver(self) -> Optional[str]: """Get the API version of the miner and is as a string. @@ -476,14 +496,14 @@ class MinerProtocol(Protocol): """ data = MinerData( ip=str(self.ip), - make=self.make, - model=self.model, + device_info=self.device_info, expected_chips=( self.expected_chips * self.expected_hashboards if self.expected_chips is not None else 0 ), expected_hashboards=self.expected_hashboards, + expected_fans=self.expected_fans, hashboards=[ HashBoard(slot=i, expected_chips=self.expected_chips) for i in range(self.expected_hashboards) diff --git a/pyasic/miners/blockminer/epic/blockminer/blockminer.py b/pyasic/miners/blockminer/epic/blockminer/blockminer.py index 66e21226..5fe64125 100644 --- a/pyasic/miners/blockminer/epic/blockminer/blockminer.py +++ b/pyasic/miners/blockminer/epic/blockminer/blockminer.py @@ -15,8 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import ePIC -from pyasic.miners.models import BlockMiner520i -from pyasic.miners.models import BlockMiner720i +from pyasic.miners.device.models import BlockMiner520i, BlockMiner720i class ePICBlockMiner520i(ePIC, BlockMiner520i): diff --git a/pyasic/miners/device/__init__.py b/pyasic/miners/device/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pyasic/miners/device/firmware.py b/pyasic/miners/device/firmware.py new file mode 100644 index 00000000..efd2b974 --- /dev/null +++ b/pyasic/miners/device/firmware.py @@ -0,0 +1,46 @@ +# ------------------------------------------------------------------------------ +# Copyright 2022 Upstream Data Inc - +# - +# Licensed under the Apache License, Version 2.0 (the "License"); - +# you may not use this file except in compliance with the License. - +# You may obtain a copy of the License at - +# - +# http://www.apache.org/licenses/LICENSE-2.0 - +# - +# Unless required by applicable law or agreed to in writing, software - +# distributed under the License is distributed on an "AS IS" BASIS, - +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - +# See the License for the specific language governing permissions and - +# limitations under the License. - +# ------------------------------------------------------------------------------ + +from pyasic.device.firmware import MinerFirmware +from pyasic.miners.base import BaseMiner + + +class StockFirmware(BaseMiner): + firmware = MinerFirmware.STOCK + + +class BraiinsOSFirmware(BaseMiner): + firmware = MinerFirmware.BRAIINS_OS + + +class VNishFirmware(BaseMiner): + firmware = MinerFirmware.VNISH + + +class ePICFirmware(BaseMiner): + firmware = MinerFirmware.EPIC + + +class HiveonFirmware(BaseMiner): + firmware = MinerFirmware.HIVEON + + +class LuxOSFirmware(BaseMiner): + firmware = MinerFirmware.LUXOS + + +class MaraFirmware(BaseMiner): + firmware = MinerFirmware.MARATHON diff --git a/pyasic/miners/makes/__init__.py b/pyasic/miners/device/makes.py similarity index 85% rename from pyasic/miners/makes/__init__.py rename to pyasic/miners/device/makes.py index 8cbd72c0..2d8433a4 100644 --- a/pyasic/miners/makes/__init__.py +++ b/pyasic/miners/device/makes.py @@ -14,32 +14,33 @@ # limitations under the License. - # ------------------------------------------------------------------------------ +from pyasic.device.makes import MinerMake from pyasic.miners.base import BaseMiner class WhatsMinerMake(BaseMiner): - make = "WhatsMiner" + make = MinerMake.WHATSMINER class AntMinerMake(BaseMiner): - make = "AntMiner" + make = MinerMake.ANTMINER class AvalonMinerMake(BaseMiner): - make = "AvalonMiner" + make = MinerMake.AVALONMINER class InnosiliconMake(BaseMiner): - make = "Innosilicon" + make = MinerMake.INNOSILICON class GoldshellMake(BaseMiner): - make = "Goldshell" + make = MinerMake.GOLDSHELL class AuradineMake(BaseMiner): - make = "Auradine" + make = MinerMake.AURADINE class ePICMake(BaseMiner): - make = "ePIC" + make = MinerMake.EPIC diff --git a/pyasic/miners/models/__init__.py b/pyasic/miners/device/models/__init__.py similarity index 100% rename from pyasic/miners/models/__init__.py rename to pyasic/miners/device/models/__init__.py index 00036809..a74bf0a9 100644 --- a/pyasic/miners/models/__init__.py +++ b/pyasic/miners/device/models/__init__.py @@ -17,7 +17,7 @@ from .antminer import * from .auradine import * from .avalonminer import * +from .epic import * from .goldshell import * from .innosilicon import * from .whatsminer import * -from .epic import * diff --git a/pyasic/miners/models/antminer/X15/Z15.py b/pyasic/miners/device/models/antminer/X15/Z15.py similarity index 90% rename from pyasic/miners/models/antminer/X15/Z15.py rename to pyasic/miners/device/models/antminer/X15/Z15.py index 0dbfd21a..8b22f056 100644 --- a/pyasic/miners/models/antminer/X15/Z15.py +++ b/pyasic/miners/device/models/antminer/X15/Z15.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class Z15(AntMinerMake): - raw_model = "Z15" + raw_model = MinerModel.ANTMINER.Z15 + expected_chips = 3 - expected_fans = 2 diff --git a/pyasic/miners/models/antminer/X15/__init__.py b/pyasic/miners/device/models/antminer/X15/__init__.py similarity index 100% rename from pyasic/miners/models/antminer/X15/__init__.py rename to pyasic/miners/device/models/antminer/X15/__init__.py diff --git a/pyasic/miners/models/antminer/X17/S17.py b/pyasic/miners/device/models/antminer/X17/S17.py similarity index 85% rename from pyasic/miners/models/antminer/X17/S17.py rename to pyasic/miners/device/models/antminer/X17/S17.py index f2a4dd6b..b92b72d8 100644 --- a/pyasic/miners/models/antminer/X17/S17.py +++ b/pyasic/miners/device/models/antminer/X17/S17.py @@ -13,29 +13,33 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class S17(AntMinerMake): - raw_model = "S17" + raw_model = MinerModel.ANTMINER.S17 + expected_chips = 48 expected_fans = 4 class S17Plus(AntMinerMake): - raw_model = "S17+" + raw_model = MinerModel.ANTMINER.S17Plus + expected_chips = 65 expected_fans = 4 class S17Pro(AntMinerMake): - raw_model = "S17 Pro" + raw_model = MinerModel.ANTMINER.S17Pro + expected_chips = 48 expected_fans = 4 class S17e(AntMinerMake): - raw_model = "S17e" + raw_model = MinerModel.ANTMINER.S17e + expected_chips = 135 expected_fans = 4 diff --git a/pyasic/miners/models/antminer/X17/T17.py b/pyasic/miners/device/models/antminer/X17/T17.py similarity index 86% rename from pyasic/miners/models/antminer/X17/T17.py rename to pyasic/miners/device/models/antminer/X17/T17.py index d4175abc..6953d708 100644 --- a/pyasic/miners/models/antminer/X17/T17.py +++ b/pyasic/miners/device/models/antminer/X17/T17.py @@ -13,23 +13,26 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class T17(AntMinerMake): - raw_model = "T17" + raw_model = MinerModel.ANTMINER.T17 + expected_chips = 30 expected_fans = 4 class T17Plus(AntMinerMake): - raw_model = "T17+" + raw_model = MinerModel.ANTMINER.T17Plus + expected_chips = 44 expected_fans = 4 class T17e(AntMinerMake): - raw_model = "T17e" + raw_model = MinerModel.ANTMINER.T17e + expected_chips = 78 expected_fans = 4 diff --git a/pyasic/miners/models/antminer/X17/__init__.py b/pyasic/miners/device/models/antminer/X17/__init__.py similarity index 100% rename from pyasic/miners/models/antminer/X17/__init__.py rename to pyasic/miners/device/models/antminer/X17/__init__.py diff --git a/pyasic/miners/models/antminer/X19/S19.py b/pyasic/miners/device/models/antminer/X19/S19.py similarity index 73% rename from pyasic/miners/models/antminer/X19/S19.py rename to pyasic/miners/device/models/antminer/X19/S19.py index ff17014d..495a220c 100644 --- a/pyasic/miners/models/antminer/X19/S19.py +++ b/pyasic/miners/device/models/antminer/X19/S19.py @@ -13,140 +13,162 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class S19(AntMinerMake): - raw_model = "S19" + raw_model = MinerModel.ANTMINER.S19 + expected_chips = 76 expected_fans = 4 class S19NoPIC(AntMinerMake): - raw_model = "S19 No PIC" + raw_model = MinerModel.ANTMINER.S19NoPIC + expected_chips = 88 expected_fans = 4 class S19Pro(AntMinerMake): - raw_model = "S19 Pro" + raw_model = MinerModel.ANTMINER.S19Pro + expected_chips = 114 expected_fans = 4 class S19i(AntMinerMake): - raw_model = "S19i" + raw_model = MinerModel.ANTMINER.S19i + expected_chips = 80 expected_fans = 4 class S19Plus(AntMinerMake): - raw_model = "S19+" + raw_model = MinerModel.ANTMINER.S19Plus + expected_chips = 80 expected_fans = 4 class S19ProPlus(AntMinerMake): - raw_model = "S19 Pro+" + raw_model = MinerModel.ANTMINER.S19ProPlus + expected_chips = 120 expected_fans = 4 class S19XP(AntMinerMake): - raw_model = "S19 XP" + raw_model = MinerModel.ANTMINER.S19XP + expected_chips = 110 expected_fans = 4 class S19a(AntMinerMake): - raw_model = "S19a" + raw_model = MinerModel.ANTMINER.S19a + expected_chips = 72 expected_fans = 4 class S19aPro(AntMinerMake): - raw_model = "S19a Pro" + raw_model = MinerModel.ANTMINER.S19aPro + expected_chips = 100 expected_fans = 4 class S19j(AntMinerMake): - raw_model = "S19j" + raw_model = MinerModel.ANTMINER.S19j + expected_chips = 114 expected_fans = 4 class S19jNoPIC(AntMinerMake): - raw_model = "S19j No PIC" + raw_model = MinerModel.ANTMINER.S19jNoPIC + expected_chips = 88 expected_fans = 4 class S19jPro(AntMinerMake): - raw_model = "S19j Pro" + raw_model = MinerModel.ANTMINER.S19jPro + expected_chips = 126 expected_fans = 4 class S19jProNoPIC(AntMinerMake): - raw_model = "S19j Pro No PIC" + raw_model = MinerModel.ANTMINER.S19jProNoPIC + expected_chips = 126 expected_fans = 4 class S19jProPlus(AntMinerMake): - raw_model = "S19j Pro+" + raw_model = MinerModel.ANTMINER.S19jProPlus + expected_chips = 120 expected_fans = 4 class S19jProPlusNoPIC(AntMinerMake): - raw_model = "S19j Pro+ No PIC" + raw_model = MinerModel.ANTMINER.S19jProPlusNoPIC + expected_chips = 120 expected_fans = 4 class S19kPro(AntMinerMake): - raw_model = "S19k Pro" + raw_model = MinerModel.ANTMINER.S19kPro + + expected_chips = 77 + expected_fans = 4 + + +class S19kProNoPIC(AntMinerMake): + raw_model = MinerModel.ANTMINER.S19kProNoPIC + expected_chips = 77 expected_fans = 4 class S19L(AntMinerMake): - raw_model = "S19L" + raw_model = MinerModel.ANTMINER.S19L + expected_chips = 76 expected_fans = 4 -class S19kProNoPIC(AntMinerMake): - raw_model = "S19k Pro No PIC" - expected_chips = 77 - expected_fans = 4 - - class S19Hydro(AntMinerMake): - raw_model = "S19 Hydro" + raw_model = MinerModel.ANTMINER.S19Hydro + expected_chips = 104 expected_hashboards = 4 expected_fans = 0 class S19ProHydro(AntMinerMake): - raw_model = "S19 Pro Hydro" + raw_model = MinerModel.ANTMINER.S19ProHydro + expected_chips = 180 expected_hashboards = 4 expected_fans = 0 class S19ProPlusHydro(AntMinerMake): - raw_model = "S19 Pro+ Hydro" + raw_model = MinerModel.ANTMINER.S19ProPlusHydro + expected_chips = 180 expected_hashboards = 4 expected_fans = 0 class S19KPro(AntMinerMake): - raw_model = "S19K Pro" + raw_model = MinerModel.ANTMINER.S19KPro + expected_chips = 77 expected_fans = 4 diff --git a/pyasic/miners/models/antminer/X19/T19.py b/pyasic/miners/device/models/antminer/X19/T19.py similarity index 90% rename from pyasic/miners/models/antminer/X19/T19.py rename to pyasic/miners/device/models/antminer/X19/T19.py index 5f3aea39..16be8899 100644 --- a/pyasic/miners/models/antminer/X19/T19.py +++ b/pyasic/miners/device/models/antminer/X19/T19.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class T19(AntMinerMake): - raw_model = "T19" + raw_model = MinerModel.ANTMINER.T19 + expected_chips = 76 expected_fans = 4 diff --git a/pyasic/miners/models/antminer/X19/__init__.py b/pyasic/miners/device/models/antminer/X19/__init__.py similarity index 100% rename from pyasic/miners/models/antminer/X19/__init__.py rename to pyasic/miners/device/models/antminer/X19/__init__.py diff --git a/pyasic/miners/models/antminer/X21/S21.py b/pyasic/miners/device/models/antminer/X21/S21.py similarity index 90% rename from pyasic/miners/models/antminer/X21/S21.py rename to pyasic/miners/device/models/antminer/X21/S21.py index a6c53bc2..bc0c57a7 100644 --- a/pyasic/miners/models/antminer/X21/S21.py +++ b/pyasic/miners/device/models/antminer/X21/S21.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class S21(AntMinerMake): - raw_model = "S21" + raw_model = MinerModel.ANTMINER.S21 + expected_chips = 108 expected_fans = 4 diff --git a/pyasic/miners/models/antminer/X21/T21.py b/pyasic/miners/device/models/antminer/X21/T21.py similarity index 90% rename from pyasic/miners/models/antminer/X21/T21.py rename to pyasic/miners/device/models/antminer/X21/T21.py index 698347a2..c45488aa 100644 --- a/pyasic/miners/models/antminer/X21/T21.py +++ b/pyasic/miners/device/models/antminer/X21/T21.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class T21(AntMinerMake): - raw_model = "T21" + raw_model = MinerModel.ANTMINER.T21 + expected_chips = 108 expected_fans = 4 diff --git a/pyasic/miners/models/antminer/X21/__init__.py b/pyasic/miners/device/models/antminer/X21/__init__.py similarity index 95% rename from pyasic/miners/models/antminer/X21/__init__.py rename to pyasic/miners/device/models/antminer/X21/__init__.py index 77cfc325..d9c49a2e 100644 --- a/pyasic/miners/models/antminer/X21/__init__.py +++ b/pyasic/miners/device/models/antminer/X21/__init__.py @@ -14,9 +14,5 @@ # limitations under the License. - # ------------------------------------------------------------------------------ -from .S21 import ( - S21, -) -from .T21 import ( - T21, -) +from .S21 import S21 +from .T21 import T21 diff --git a/pyasic/miners/models/antminer/X3/D3.py b/pyasic/miners/device/models/antminer/X3/D3.py similarity index 90% rename from pyasic/miners/models/antminer/X3/D3.py rename to pyasic/miners/device/models/antminer/X3/D3.py index d1ca16cc..dccf360d 100644 --- a/pyasic/miners/models/antminer/X3/D3.py +++ b/pyasic/miners/device/models/antminer/X3/D3.py @@ -13,13 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class D3(AntMinerMake): - raw_model = "D3" + raw_model = MinerModel.ANTMINER.D3 expected_chips = 60 - expected_hashboards = 3 - expected_fans = 2 diff --git a/pyasic/miners/models/antminer/X3/HS3.py b/pyasic/miners/device/models/antminer/X3/HS3.py similarity index 90% rename from pyasic/miners/models/antminer/X3/HS3.py rename to pyasic/miners/device/models/antminer/X3/HS3.py index 4086e9e5..4cb63717 100644 --- a/pyasic/miners/models/antminer/X3/HS3.py +++ b/pyasic/miners/device/models/antminer/X3/HS3.py @@ -13,13 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class HS3(AntMinerMake): - raw_model = "HS3" + raw_model = MinerModel.ANTMINER.HS3 expected_chips = 92 - expected_hashboards = 3 - expected_fans = 2 diff --git a/pyasic/miners/models/antminer/X3/L3.py b/pyasic/miners/device/models/antminer/X3/L3.py similarity index 90% rename from pyasic/miners/models/antminer/X3/L3.py rename to pyasic/miners/device/models/antminer/X3/L3.py index a8829a61..82bb7172 100644 --- a/pyasic/miners/models/antminer/X3/L3.py +++ b/pyasic/miners/device/models/antminer/X3/L3.py @@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class L3Plus(AntMinerMake): - raw_model = "L3+" + raw_model = MinerModel.ANTMINER + expected_chips = 72 - expected_fans = 2 diff --git a/pyasic/miners/models/antminer/X3/__init__.py b/pyasic/miners/device/models/antminer/X3/__init__.py similarity index 100% rename from pyasic/miners/models/antminer/X3/__init__.py rename to pyasic/miners/device/models/antminer/X3/__init__.py diff --git a/pyasic/miners/models/antminer/X5/DR5.py b/pyasic/miners/device/models/antminer/X5/DR5.py similarity index 90% rename from pyasic/miners/models/antminer/X5/DR5.py rename to pyasic/miners/device/models/antminer/X5/DR5.py index 6f51af80..18b18b5a 100644 --- a/pyasic/miners/models/antminer/X5/DR5.py +++ b/pyasic/miners/device/models/antminer/X5/DR5.py @@ -13,12 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class DR5(AntMinerMake): - raw_model = "DR5" + raw_model = MinerModel.ANTMINER.DR5 + expected_chips = 72 - expected_hashboards = 3 - expected_fans = 2 diff --git a/pyasic/miners/models/antminer/X5/__init__.py b/pyasic/miners/device/models/antminer/X5/__init__.py similarity index 100% rename from pyasic/miners/models/antminer/X5/__init__.py rename to pyasic/miners/device/models/antminer/X5/__init__.py diff --git a/pyasic/miners/models/antminer/X7/L7.py b/pyasic/miners/device/models/antminer/X7/L7.py similarity index 90% rename from pyasic/miners/models/antminer/X7/L7.py rename to pyasic/miners/device/models/antminer/X7/L7.py index 0f68626b..9049949a 100644 --- a/pyasic/miners/models/antminer/X7/L7.py +++ b/pyasic/miners/device/models/antminer/X7/L7.py @@ -13,10 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class L7(AntMinerMake): - raw_model = "L7" + raw_model = MinerModel.ANTMINER.L7 + expected_chips = 120 expected_fans = 4 diff --git a/pyasic/miners/models/antminer/X7/__init__.py b/pyasic/miners/device/models/antminer/X7/__init__.py similarity index 100% rename from pyasic/miners/models/antminer/X7/__init__.py rename to pyasic/miners/device/models/antminer/X7/__init__.py diff --git a/pyasic/miners/models/antminer/X9/E9.py b/pyasic/miners/device/models/antminer/X9/E9.py similarity index 90% rename from pyasic/miners/models/antminer/X9/E9.py rename to pyasic/miners/device/models/antminer/X9/E9.py index 5d7d5c58..d7c0e7a6 100644 --- a/pyasic/miners/models/antminer/X9/E9.py +++ b/pyasic/miners/device/models/antminer/X9/E9.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class E9Pro(AntMinerMake): - raw_model = "E9Pro" + raw_model = MinerModel.ANTMINER.E9Pro + expected_chips = 8 expected_hashboards = 2 expected_fans = 4 diff --git a/pyasic/miners/models/antminer/X9/S9.py b/pyasic/miners/device/models/antminer/X9/S9.py similarity index 86% rename from pyasic/miners/models/antminer/X9/S9.py rename to pyasic/miners/device/models/antminer/X9/S9.py index b6f75951..b26d2bad 100644 --- a/pyasic/miners/models/antminer/X9/S9.py +++ b/pyasic/miners/device/models/antminer/X9/S9.py @@ -13,23 +13,23 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class S9(AntMinerMake): - raw_model = "S9" + raw_model = MinerModel.ANTMINER.S9 + expected_chips = 63 - expected_fans = 2 class S9i(AntMinerMake): - raw_model = "S9i" + raw_model = MinerModel.ANTMINER.S9i + expected_chips = 63 - expected_fans = 2 class S9j(AntMinerMake): - raw_model = "S9j" + raw_model = MinerModel.ANTMINER.S9j + expected_chips = 63 - expected_fans = 2 diff --git a/pyasic/miners/models/antminer/X9/T9.py b/pyasic/miners/device/models/antminer/X9/T9.py similarity index 90% rename from pyasic/miners/models/antminer/X9/T9.py rename to pyasic/miners/device/models/antminer/X9/T9.py index fc56bc70..ad0c8965 100644 --- a/pyasic/miners/models/antminer/X9/T9.py +++ b/pyasic/miners/device/models/antminer/X9/T9.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AntMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AntMinerMake class T9(AntMinerMake): - raw_model = "T9" + raw_model = MinerModel.ANTMINER.T9 + expected_chips = 54 - expected_fans = 2 diff --git a/pyasic/miners/models/antminer/X9/__init__.py b/pyasic/miners/device/models/antminer/X9/__init__.py similarity index 100% rename from pyasic/miners/models/antminer/X9/__init__.py rename to pyasic/miners/device/models/antminer/X9/__init__.py diff --git a/pyasic/miners/models/antminer/__init__.py b/pyasic/miners/device/models/antminer/__init__.py similarity index 100% rename from pyasic/miners/models/antminer/__init__.py rename to pyasic/miners/device/models/antminer/__init__.py diff --git a/pyasic/miners/device/models/auradine/AD/AD2.py b/pyasic/miners/device/models/auradine/AD/AD2.py new file mode 100644 index 00000000..eedb5088 --- /dev/null +++ b/pyasic/miners/device/models/auradine/AD/AD2.py @@ -0,0 +1,8 @@ +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AuradineMake + + +class AuradineAD2500(AuradineMake): + raw_model = MinerModel.AURADINE.AD2500 + + expected_fans = 0 diff --git a/pyasic/miners/device/models/auradine/AD/AD3.py b/pyasic/miners/device/models/auradine/AD/AD3.py new file mode 100644 index 00000000..27a2e71b --- /dev/null +++ b/pyasic/miners/device/models/auradine/AD/AD3.py @@ -0,0 +1,8 @@ +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AuradineMake + + +class AuradineAD3500(AuradineMake): + raw_model = MinerModel.AURADINE.AD3500 + + expected_fans = 0 diff --git a/pyasic/miners/models/auradine/AD/__init__.py b/pyasic/miners/device/models/auradine/AD/__init__.py similarity index 100% rename from pyasic/miners/models/auradine/AD/__init__.py rename to pyasic/miners/device/models/auradine/AD/__init__.py diff --git a/pyasic/miners/device/models/auradine/AI/AI2.py b/pyasic/miners/device/models/auradine/AI/AI2.py new file mode 100644 index 00000000..d572a405 --- /dev/null +++ b/pyasic/miners/device/models/auradine/AI/AI2.py @@ -0,0 +1,8 @@ +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AuradineMake + + +class AuradineAI2500(AuradineMake): + raw_model = MinerModel.AURADINE.AI2500 + + expected_fans = 0 diff --git a/pyasic/miners/device/models/auradine/AI/AI3.py b/pyasic/miners/device/models/auradine/AI/AI3.py new file mode 100644 index 00000000..81e70a25 --- /dev/null +++ b/pyasic/miners/device/models/auradine/AI/AI3.py @@ -0,0 +1,8 @@ +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AuradineMake + + +class AuradineAI3680(AuradineMake): + raw_model = MinerModel.AURADINE.AI3680 + + expected_fans = 0 diff --git a/pyasic/miners/models/auradine/AI/__init__.py b/pyasic/miners/device/models/auradine/AI/__init__.py similarity index 100% rename from pyasic/miners/models/auradine/AI/__init__.py rename to pyasic/miners/device/models/auradine/AI/__init__.py diff --git a/pyasic/miners/device/models/auradine/AT/AT1.py b/pyasic/miners/device/models/auradine/AT/AT1.py new file mode 100644 index 00000000..fa90cb56 --- /dev/null +++ b/pyasic/miners/device/models/auradine/AT/AT1.py @@ -0,0 +1,9 @@ +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AuradineMake + + +class AuradineAT1500(AuradineMake): + raw_model = MinerModel.AURADINE.AT1500 + + expected_chips = 132 + expected_fans = 4 diff --git a/pyasic/miners/device/models/auradine/AT/AT2.py b/pyasic/miners/device/models/auradine/AT/AT2.py new file mode 100644 index 00000000..6b18949b --- /dev/null +++ b/pyasic/miners/device/models/auradine/AT/AT2.py @@ -0,0 +1,14 @@ +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AuradineMake + + +class AuradineAT2860(AuradineMake): + raw_model = MinerModel.AURADINE.AT2860 + + expected_fans = 4 + + +class AuradineAT2880(AuradineMake): + raw_model = MinerModel.AURADINE.AT2880 + + expected_fans = 4 diff --git a/pyasic/miners/models/auradine/AT/__init__.py b/pyasic/miners/device/models/auradine/AT/__init__.py similarity index 100% rename from pyasic/miners/models/auradine/AT/__init__.py rename to pyasic/miners/device/models/auradine/AT/__init__.py diff --git a/pyasic/miners/models/auradine/__init__.py b/pyasic/miners/device/models/auradine/__init__.py similarity index 100% rename from pyasic/miners/models/auradine/__init__.py rename to pyasic/miners/device/models/auradine/__init__.py diff --git a/pyasic/miners/models/avalonminer/A10X/A1026.py b/pyasic/miners/device/models/avalonminer/A10X/A1026.py similarity index 89% rename from pyasic/miners/models/avalonminer/A10X/A1026.py rename to pyasic/miners/device/models/avalonminer/A10X/A1026.py index 8404fb16..be197cd2 100644 --- a/pyasic/miners/models/avalonminer/A10X/A1026.py +++ b/pyasic/miners/device/models/avalonminer/A10X/A1026.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon1026(AvalonMinerMake): - raw_model = "Avalon 1026" + raw_model = MinerModel.AVALONMINER.Avalon1026 + expected_chips = 80 - expected_fans = 2 diff --git a/pyasic/miners/models/avalonminer/A10X/A1047.py b/pyasic/miners/device/models/avalonminer/A10X/A1047.py similarity index 89% rename from pyasic/miners/models/avalonminer/A10X/A1047.py rename to pyasic/miners/device/models/avalonminer/A10X/A1047.py index c86c3264..3a1e378a 100644 --- a/pyasic/miners/models/avalonminer/A10X/A1047.py +++ b/pyasic/miners/device/models/avalonminer/A10X/A1047.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon1047(AvalonMinerMake): - raw_model = "Avalon 1047" + raw_model = MinerModel.AVALONMINER.Avalon1047 + expected_chips = 80 - expected_fans = 2 diff --git a/pyasic/miners/models/avalonminer/A10X/A1066.py b/pyasic/miners/device/models/avalonminer/A10X/A1066.py similarity index 89% rename from pyasic/miners/models/avalonminer/A10X/A1066.py rename to pyasic/miners/device/models/avalonminer/A10X/A1066.py index 1a2daef5..8bdc8e68 100644 --- a/pyasic/miners/models/avalonminer/A10X/A1066.py +++ b/pyasic/miners/device/models/avalonminer/A10X/A1066.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon1066(AvalonMinerMake): - raw_model = "Avalon 1066" + raw_model = MinerModel.AVALONMINER.Avalon1066 expected_chips = 114 expected_fans = 4 diff --git a/pyasic/miners/models/avalonminer/A10X/__init__.py b/pyasic/miners/device/models/avalonminer/A10X/__init__.py similarity index 100% rename from pyasic/miners/models/avalonminer/A10X/__init__.py rename to pyasic/miners/device/models/avalonminer/A10X/__init__.py diff --git a/pyasic/miners/models/avalonminer/A11X/A1166.py b/pyasic/miners/device/models/avalonminer/A11X/A1166.py similarity index 89% rename from pyasic/miners/models/avalonminer/A11X/A1166.py rename to pyasic/miners/device/models/avalonminer/A11X/A1166.py index fb5117cb..9b42fbd6 100644 --- a/pyasic/miners/models/avalonminer/A11X/A1166.py +++ b/pyasic/miners/device/models/avalonminer/A11X/A1166.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon1166Pro(AvalonMinerMake): - raw_model = "Avalon 1166 Pro" + raw_model = MinerModel.AVALONMINER.Avalon1166Pro + expected_chips = 120 expected_fans = 4 diff --git a/pyasic/miners/models/avalonminer/A11X/__init__.py b/pyasic/miners/device/models/avalonminer/A11X/__init__.py similarity index 100% rename from pyasic/miners/models/avalonminer/A11X/__init__.py rename to pyasic/miners/device/models/avalonminer/A11X/__init__.py diff --git a/pyasic/miners/models/avalonminer/A12X/A1246.py b/pyasic/miners/device/models/avalonminer/A12X/A1246.py similarity index 89% rename from pyasic/miners/models/avalonminer/A12X/A1246.py rename to pyasic/miners/device/models/avalonminer/A12X/A1246.py index 30c426b9..7e1f3279 100644 --- a/pyasic/miners/models/avalonminer/A12X/A1246.py +++ b/pyasic/miners/device/models/avalonminer/A12X/A1246.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon1246(AvalonMinerMake): - raw_model = "Avalon 1246" + raw_model = MinerModel.AVALONMINER.Avalon1246 + expected_chips = 120 expected_fans = 4 diff --git a/pyasic/miners/models/avalonminer/A12X/__init__.py b/pyasic/miners/device/models/avalonminer/A12X/__init__.py similarity index 100% rename from pyasic/miners/models/avalonminer/A12X/__init__.py rename to pyasic/miners/device/models/avalonminer/A12X/__init__.py diff --git a/pyasic/miners/models/avalonminer/A7X/A721.py b/pyasic/miners/device/models/avalonminer/A7X/A721.py similarity index 89% rename from pyasic/miners/models/avalonminer/A7X/A721.py rename to pyasic/miners/device/models/avalonminer/A7X/A721.py index 5983fe77..ae60010a 100644 --- a/pyasic/miners/models/avalonminer/A7X/A721.py +++ b/pyasic/miners/device/models/avalonminer/A7X/A721.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon721(AvalonMinerMake): - raw_model = "Avalon 721" + raw_model = MinerModel.AVALONMINER.Avalon721 + expected_hashboards = 4 expected_chips = 18 expected_fans = 1 diff --git a/pyasic/miners/models/avalonminer/A7X/A741.py b/pyasic/miners/device/models/avalonminer/A7X/A741.py similarity index 89% rename from pyasic/miners/models/avalonminer/A7X/A741.py rename to pyasic/miners/device/models/avalonminer/A7X/A741.py index 8e9750e9..3ab44e27 100644 --- a/pyasic/miners/models/avalonminer/A7X/A741.py +++ b/pyasic/miners/device/models/avalonminer/A7X/A741.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon741(AvalonMinerMake): - raw_model = "Avalon 741" + raw_model = MinerModel.AVALONMINER.Avalon741 + expected_hashboards = 4 expected_chips = 22 expected_fans = 1 diff --git a/pyasic/miners/models/avalonminer/A7X/A761.py b/pyasic/miners/device/models/avalonminer/A7X/A761.py similarity index 89% rename from pyasic/miners/models/avalonminer/A7X/A761.py rename to pyasic/miners/device/models/avalonminer/A7X/A761.py index f4f9c45f..556cb0fa 100644 --- a/pyasic/miners/models/avalonminer/A7X/A761.py +++ b/pyasic/miners/device/models/avalonminer/A7X/A761.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon761(AvalonMinerMake): - raw_model = "Avalon 761" + raw_model = MinerModel.AVALONMINER.Avalon761 + expected_hashboards = 4 expected_chips = 18 expected_fans = 1 diff --git a/pyasic/miners/models/avalonminer/A7X/__init__.py b/pyasic/miners/device/models/avalonminer/A7X/__init__.py similarity index 100% rename from pyasic/miners/models/avalonminer/A7X/__init__.py rename to pyasic/miners/device/models/avalonminer/A7X/__init__.py diff --git a/pyasic/miners/models/avalonminer/A8X/A821.py b/pyasic/miners/device/models/avalonminer/A8X/A821.py similarity index 89% rename from pyasic/miners/models/avalonminer/A8X/A821.py rename to pyasic/miners/device/models/avalonminer/A8X/A821.py index 81af5605..fbdd0c17 100644 --- a/pyasic/miners/models/avalonminer/A8X/A821.py +++ b/pyasic/miners/device/models/avalonminer/A8X/A821.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon821(AvalonMinerMake): - raw_model = "Avalon 821" + raw_model = MinerModel.AVALONMINER.Avalon821 + expected_hashboards = 4 expected_chips = 26 expected_fans = 1 diff --git a/pyasic/miners/models/avalonminer/A8X/A841.py b/pyasic/miners/device/models/avalonminer/A8X/A841.py similarity index 89% rename from pyasic/miners/models/avalonminer/A8X/A841.py rename to pyasic/miners/device/models/avalonminer/A8X/A841.py index 3cb18ad6..6f39673b 100644 --- a/pyasic/miners/models/avalonminer/A8X/A841.py +++ b/pyasic/miners/device/models/avalonminer/A8X/A841.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon841(AvalonMinerMake): - raw_model = "Avalon 841" + raw_model = MinerModel.AVALONMINER.Avalon841 + expected_hashboards = 4 expected_chips = 26 expected_fans = 1 diff --git a/pyasic/miners/models/avalonminer/A8X/A851.py b/pyasic/miners/device/models/avalonminer/A8X/A851.py similarity index 89% rename from pyasic/miners/models/avalonminer/A8X/A851.py rename to pyasic/miners/device/models/avalonminer/A8X/A851.py index d43f4724..ac8d7d77 100644 --- a/pyasic/miners/models/avalonminer/A8X/A851.py +++ b/pyasic/miners/device/models/avalonminer/A8X/A851.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon851(AvalonMinerMake): - raw_model = "Avalon 851" + raw_model = MinerModel.AVALONMINER.Avalon851 + expected_hashboards = 4 expected_chips = 26 expected_fans = 1 diff --git a/pyasic/miners/models/avalonminer/A8X/__init__.py b/pyasic/miners/device/models/avalonminer/A8X/__init__.py similarity index 100% rename from pyasic/miners/models/avalonminer/A8X/__init__.py rename to pyasic/miners/device/models/avalonminer/A8X/__init__.py diff --git a/pyasic/miners/models/avalonminer/A9X/A921.py b/pyasic/miners/device/models/avalonminer/A9X/A921.py similarity index 89% rename from pyasic/miners/models/avalonminer/A9X/A921.py rename to pyasic/miners/device/models/avalonminer/A9X/A921.py index f37250e9..c198a57b 100644 --- a/pyasic/miners/models/avalonminer/A9X/A921.py +++ b/pyasic/miners/device/models/avalonminer/A9X/A921.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import AvalonMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake class Avalon921(AvalonMinerMake): - raw_model = "Avalon 921" + raw_model = MinerModel.AVALONMINER.Avalon921 + expected_hashboards = 4 expected_chips = 26 expected_fans = 1 diff --git a/pyasic/miners/models/avalonminer/A9X/__init__.py b/pyasic/miners/device/models/avalonminer/A9X/__init__.py similarity index 100% rename from pyasic/miners/models/avalonminer/A9X/__init__.py rename to pyasic/miners/device/models/avalonminer/A9X/__init__.py diff --git a/pyasic/miners/models/avalonminer/__init__.py b/pyasic/miners/device/models/avalonminer/__init__.py similarity index 100% rename from pyasic/miners/models/avalonminer/__init__.py rename to pyasic/miners/device/models/avalonminer/__init__.py diff --git a/pyasic/miners/models/epic/__init__.py b/pyasic/miners/device/models/epic/__init__.py similarity index 100% rename from pyasic/miners/models/epic/__init__.py rename to pyasic/miners/device/models/epic/__init__.py diff --git a/pyasic/miners/models/epic/blockminer/__init__.py b/pyasic/miners/device/models/epic/blockminer/__init__.py similarity index 100% rename from pyasic/miners/models/epic/blockminer/__init__.py rename to pyasic/miners/device/models/epic/blockminer/__init__.py diff --git a/pyasic/miners/device/models/epic/blockminer/blockminer.py b/pyasic/miners/device/models/epic/blockminer/blockminer.py new file mode 100644 index 00000000..d30025cc --- /dev/null +++ b/pyasic/miners/device/models/epic/blockminer/blockminer.py @@ -0,0 +1,16 @@ +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import ePICMake + + +class BlockMiner520i(ePICMake): + raw_model = MinerModel.EPIC.BM520i + + expected_chips = 124 + expected_fans = 4 + + +class BlockMiner720i(ePICMake): + raw_model = MinerModel.EPIC.BM720i + + expected_chips = 180 + expected_fans = 4 diff --git a/pyasic/miners/models/goldshell/X5/CK5.py b/pyasic/miners/device/models/goldshell/X5/CK5.py similarity index 90% rename from pyasic/miners/models/goldshell/X5/CK5.py rename to pyasic/miners/device/models/goldshell/X5/CK5.py index e0a0e409..e375c8e0 100644 --- a/pyasic/miners/models/goldshell/X5/CK5.py +++ b/pyasic/miners/device/models/goldshell/X5/CK5.py @@ -13,11 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ -from pyasic.miners.makes import GoldshellMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import GoldshellMake class CK5(GoldshellMake): - raw_model = "CK5" + raw_model = MinerModel.GOLDSHELL.CK5 + expected_hashboards = 4 expected_chips = 46 expected_fans = 4 diff --git a/pyasic/miners/models/goldshell/X5/HS5.py b/pyasic/miners/device/models/goldshell/X5/HS5.py similarity index 90% rename from pyasic/miners/models/goldshell/X5/HS5.py rename to pyasic/miners/device/models/goldshell/X5/HS5.py index 5994191e..8e29df8f 100644 --- a/pyasic/miners/models/goldshell/X5/HS5.py +++ b/pyasic/miners/device/models/goldshell/X5/HS5.py @@ -13,11 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ -from pyasic.miners.makes import GoldshellMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import GoldshellMake class HS5(GoldshellMake): - raw_model = "HS5" + raw_model = MinerModel.GOLDSHELL.HS5 + expected_hashboards = 4 expected_chips = 46 expected_fans = 4 diff --git a/pyasic/miners/models/goldshell/X5/KD5.py b/pyasic/miners/device/models/goldshell/X5/KD5.py similarity index 90% rename from pyasic/miners/models/goldshell/X5/KD5.py rename to pyasic/miners/device/models/goldshell/X5/KD5.py index f302ad83..189b42c9 100644 --- a/pyasic/miners/models/goldshell/X5/KD5.py +++ b/pyasic/miners/device/models/goldshell/X5/KD5.py @@ -13,11 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ -from pyasic.miners.makes import GoldshellMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import GoldshellMake class KD5(GoldshellMake): - raw_model = "KD5" + raw_model = MinerModel.GOLDSHELL.KD5 + expected_hashboards = 4 expected_chips = 46 expected_fans = 4 diff --git a/pyasic/miners/models/goldshell/X5/__init__.py b/pyasic/miners/device/models/goldshell/X5/__init__.py similarity index 100% rename from pyasic/miners/models/goldshell/X5/__init__.py rename to pyasic/miners/device/models/goldshell/X5/__init__.py diff --git a/pyasic/miners/models/goldshell/XBox/KDBox.py b/pyasic/miners/device/models/goldshell/XBox/KDBox.py similarity index 87% rename from pyasic/miners/models/goldshell/XBox/KDBox.py rename to pyasic/miners/device/models/goldshell/XBox/KDBox.py index 709dd40d..e3dfa0e7 100644 --- a/pyasic/miners/models/goldshell/XBox/KDBox.py +++ b/pyasic/miners/device/models/goldshell/XBox/KDBox.py @@ -13,18 +13,19 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ -from pyasic.miners.makes import GoldshellMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import GoldshellMake class KDBoxII(GoldshellMake): - raw_model = "KD Box II" + raw_model = MinerModel.GOLDSHELL.KDBoxII + expected_chips = 36 - expected_fans = 2 expected_hashboards = 1 class KDBoxPro(GoldshellMake): - raw_model = "KD Box Pro" + raw_model = MinerModel.GOLDSHELL.KDBoxPro + expected_chips = 16 - expected_fans = 2 expected_hashboards = 1 diff --git a/pyasic/miners/models/goldshell/XBox/__init__.py b/pyasic/miners/device/models/goldshell/XBox/__init__.py similarity index 100% rename from pyasic/miners/models/goldshell/XBox/__init__.py rename to pyasic/miners/device/models/goldshell/XBox/__init__.py diff --git a/pyasic/miners/models/goldshell/XMax/KDMax.py b/pyasic/miners/device/models/goldshell/XMax/KDMax.py similarity index 90% rename from pyasic/miners/models/goldshell/XMax/KDMax.py rename to pyasic/miners/device/models/goldshell/XMax/KDMax.py index ef91b6ae..b8a73a01 100644 --- a/pyasic/miners/models/goldshell/XMax/KDMax.py +++ b/pyasic/miners/device/models/goldshell/XMax/KDMax.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ -from pyasic.miners.makes import GoldshellMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import GoldshellMake class KDMax(GoldshellMake): - raw_model = "KD Max" - expected_hashboards = 3 + raw_model = MinerModel.GOLDSHELL.KDMax + expected_chips = 84 expected_fans = 4 diff --git a/pyasic/miners/models/goldshell/XMax/__init__.py b/pyasic/miners/device/models/goldshell/XMax/__init__.py similarity index 100% rename from pyasic/miners/models/goldshell/XMax/__init__.py rename to pyasic/miners/device/models/goldshell/XMax/__init__.py diff --git a/pyasic/miners/models/goldshell/__init__.py b/pyasic/miners/device/models/goldshell/__init__.py similarity index 100% rename from pyasic/miners/models/goldshell/__init__.py rename to pyasic/miners/device/models/goldshell/__init__.py diff --git a/pyasic/miners/models/innosilicon/A10X/A10X.py b/pyasic/miners/device/models/innosilicon/A10X/A10X.py similarity index 89% rename from pyasic/miners/models/innosilicon/A10X/A10X.py rename to pyasic/miners/device/models/innosilicon/A10X/A10X.py index 2cbb9fda..fe237d99 100644 --- a/pyasic/miners/models/innosilicon/A10X/A10X.py +++ b/pyasic/miners/device/models/innosilicon/A10X/A10X.py @@ -13,8 +13,9 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ -from pyasic.miners.makes import InnosiliconMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import InnosiliconMake class A10X(InnosiliconMake): - raw_model = "A10X" + raw_model = MinerModel.INNOSILICON.A10X diff --git a/pyasic/miners/models/innosilicon/A10X/__init__.py b/pyasic/miners/device/models/innosilicon/A10X/__init__.py similarity index 100% rename from pyasic/miners/models/innosilicon/A10X/__init__.py rename to pyasic/miners/device/models/innosilicon/A10X/__init__.py diff --git a/pyasic/miners/models/innosilicon/T3X/T3H.py b/pyasic/miners/device/models/innosilicon/T3X/T3H.py similarity index 89% rename from pyasic/miners/models/innosilicon/T3X/T3H.py rename to pyasic/miners/device/models/innosilicon/T3X/T3H.py index b1347572..6168fc61 100644 --- a/pyasic/miners/models/innosilicon/T3X/T3H.py +++ b/pyasic/miners/device/models/innosilicon/T3X/T3H.py @@ -13,11 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import InnosiliconMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import InnosiliconMake class T3HPlus(InnosiliconMake): - raw_model = "T3H+" + raw_model = MinerModel.INNOSILICON.T3HPlus + expected_chips = 114 expected_fans = 4 diff --git a/pyasic/miners/models/innosilicon/T3X/__init__.py b/pyasic/miners/device/models/innosilicon/T3X/__init__.py similarity index 100% rename from pyasic/miners/models/innosilicon/T3X/__init__.py rename to pyasic/miners/device/models/innosilicon/T3X/__init__.py diff --git a/pyasic/miners/models/innosilicon/__init__.py b/pyasic/miners/device/models/innosilicon/__init__.py similarity index 100% rename from pyasic/miners/models/innosilicon/__init__.py rename to pyasic/miners/device/models/innosilicon/__init__.py diff --git a/pyasic/miners/models/whatsminer/M2X/M20.py b/pyasic/miners/device/models/whatsminer/M2X/M20.py similarity index 89% rename from pyasic/miners/models/whatsminer/M2X/M20.py rename to pyasic/miners/device/models/whatsminer/M2X/M20.py index 9660edd1..be3547dd 100644 --- a/pyasic/miners/models/whatsminer/M2X/M20.py +++ b/pyasic/miners/device/models/whatsminer/M2X/M20.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M20V10(WhatsMinerMake): - raw_model = "M20 V10" + raw_model = MinerModel.WHATSMINER.M20V10 + expected_chips = 70 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M2X/M20P.py b/pyasic/miners/device/models/whatsminer/M2X/M20P.py similarity index 87% rename from pyasic/miners/models/whatsminer/M2X/M20P.py rename to pyasic/miners/device/models/whatsminer/M2X/M20P.py index b298e3d5..6e1c5db6 100644 --- a/pyasic/miners/models/whatsminer/M2X/M20P.py +++ b/pyasic/miners/device/models/whatsminer/M2X/M20P.py @@ -13,17 +13,17 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M20PV10(WhatsMinerMake): - raw_model = "M20P V10" + raw_model = MinerModel.WHATSMINER.M20PV10 + expected_chips = 156 - expected_fans = 2 class M20PV30(WhatsMinerMake): - raw_model = "M20P V30" + raw_model = MinerModel.WHATSMINER.M20PV30 + expected_chips = 148 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M2X/M20S.py b/pyasic/miners/device/models/whatsminer/M2X/M20S.py similarity index 85% rename from pyasic/miners/models/whatsminer/M2X/M20S.py rename to pyasic/miners/device/models/whatsminer/M2X/M20S.py index e5f23899..d609b6d2 100644 --- a/pyasic/miners/models/whatsminer/M2X/M20S.py +++ b/pyasic/miners/device/models/whatsminer/M2X/M20S.py @@ -13,23 +13,23 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M20SV10(WhatsMinerMake): - raw_model = "M20S V10" + raw_model = MinerModel.WHATSMINER.M20SV10 + expected_chips = 105 - expected_fans = 2 class M20SV20(WhatsMinerMake): - raw_model = "M20S V20" + raw_model = MinerModel.WHATSMINER.M20SV20 + expected_chips = 111 - expected_fans = 2 class M20SV30(WhatsMinerMake): - raw_model = "M20S V30" + raw_model = MinerModel.WHATSMINER.M20SV30 + expected_chips = 140 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M2X/M20S_Plus.py b/pyasic/miners/device/models/whatsminer/M2X/M20S_Plus.py similarity index 89% rename from pyasic/miners/models/whatsminer/M2X/M20S_Plus.py rename to pyasic/miners/device/models/whatsminer/M2X/M20S_Plus.py index e1a9bb6d..bd99e10f 100644 --- a/pyasic/miners/models/whatsminer/M2X/M20S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M2X/M20S_Plus.py @@ -13,10 +13,9 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M20SPlusV30(WhatsMinerMake): - raw_model = "M20S+ V30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M20SPlusV30 diff --git a/pyasic/miners/models/whatsminer/M2X/M21.py b/pyasic/miners/device/models/whatsminer/M2X/M21.py similarity index 89% rename from pyasic/miners/models/whatsminer/M2X/M21.py rename to pyasic/miners/device/models/whatsminer/M2X/M21.py index d506042b..2e5585f6 100644 --- a/pyasic/miners/models/whatsminer/M2X/M21.py +++ b/pyasic/miners/device/models/whatsminer/M2X/M21.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M21V10(WhatsMinerMake): - raw_model = "M21 V10" + raw_model = MinerModel.WHATSMINER.M21V10 + expected_chips = 33 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M2X/M21S.py b/pyasic/miners/device/models/whatsminer/M2X/M21S.py similarity index 85% rename from pyasic/miners/models/whatsminer/M2X/M21S.py rename to pyasic/miners/device/models/whatsminer/M2X/M21S.py index c1cc41b2..4bd85aae 100644 --- a/pyasic/miners/models/whatsminer/M2X/M21S.py +++ b/pyasic/miners/device/models/whatsminer/M2X/M21S.py @@ -13,23 +13,23 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M21SV20(WhatsMinerMake): - raw_model = "M21S V20" + raw_model = MinerModel.WHATSMINER.M21SV20 + expected_chips = 66 - expected_fans = 2 class M21SV60(WhatsMinerMake): - raw_model = "M21S V60" + raw_model = MinerModel.WHATSMINER.M21SV60 + expected_chips = 105 - expected_fans = 2 class M21SV70(WhatsMinerMake): - raw_model = "M21S V70" + raw_model = MinerModel.WHATSMINER.M21SV70 + expected_chips = 111 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M2X/M21S_Plus.py b/pyasic/miners/device/models/whatsminer/M2X/M21S_Plus.py similarity index 89% rename from pyasic/miners/models/whatsminer/M2X/M21S_Plus.py rename to pyasic/miners/device/models/whatsminer/M2X/M21S_Plus.py index 946a817a..891b8bd0 100644 --- a/pyasic/miners/models/whatsminer/M2X/M21S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M2X/M21S_Plus.py @@ -13,10 +13,9 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M21SPlusV20(WhatsMinerMake): - raw_model = "M21S+ V20" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M21SPlusV20 diff --git a/pyasic/miners/models/whatsminer/M2X/M29.py b/pyasic/miners/device/models/whatsminer/M2X/M29.py similarity index 89% rename from pyasic/miners/models/whatsminer/M2X/M29.py rename to pyasic/miners/device/models/whatsminer/M2X/M29.py index 1e46e903..128dc90c 100644 --- a/pyasic/miners/models/whatsminer/M2X/M29.py +++ b/pyasic/miners/device/models/whatsminer/M2X/M29.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M29V10(WhatsMinerMake): - raw_model = "M29 V10" + raw_model = MinerModel.WHATSMINER.M29V10 + expected_chips = 50 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M2X/__init__.py b/pyasic/miners/device/models/whatsminer/M2X/__init__.py similarity index 100% rename from pyasic/miners/models/whatsminer/M2X/__init__.py rename to pyasic/miners/device/models/whatsminer/M2X/__init__.py diff --git a/pyasic/miners/models/whatsminer/M3X/M30.py b/pyasic/miners/device/models/whatsminer/M3X/M30.py similarity index 87% rename from pyasic/miners/models/whatsminer/M3X/M30.py rename to pyasic/miners/device/models/whatsminer/M3X/M30.py index c8e02dce..1461ecc4 100644 --- a/pyasic/miners/models/whatsminer/M3X/M30.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M30.py @@ -13,17 +13,17 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M30V10(WhatsMinerMake): - raw_model = "M30 V10" + raw_model = MinerModel.WHATSMINER.M30V10 + expected_chips = 105 - expected_fans = 2 class M30V20(WhatsMinerMake): - raw_model = "M30 V20" + raw_model = MinerModel.WHATSMINER.M30V20 + expected_chips = 111 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M30K.py b/pyasic/miners/device/models/whatsminer/M3X/M30K.py similarity index 90% rename from pyasic/miners/models/whatsminer/M3X/M30K.py rename to pyasic/miners/device/models/whatsminer/M3X/M30K.py index 62a92a65..e3b82f94 100644 --- a/pyasic/miners/models/whatsminer/M3X/M30K.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M30K.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M30KV10(WhatsMinerMake): - raw_model = "M30K V10" + raw_model = MinerModel.WHATSMINER.M30KV10 + expected_hashboards = 4 expected_chips = 240 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M30L.py b/pyasic/miners/device/models/whatsminer/M3X/M30L.py similarity index 89% rename from pyasic/miners/models/whatsminer/M3X/M30L.py rename to pyasic/miners/device/models/whatsminer/M3X/M30L.py index 626381b8..c204d576 100644 --- a/pyasic/miners/models/whatsminer/M3X/M30L.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M30L.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M30LV10(WhatsMinerMake): - raw_model = "M30L V10" + raw_model = MinerModel.WHATSMINER.M30LV10 + board_num = 4 expected_chips = 144 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M30S.py b/pyasic/miners/device/models/whatsminer/M3X/M30S.py similarity index 65% rename from pyasic/miners/models/whatsminer/M3X/M30S.py rename to pyasic/miners/device/models/whatsminer/M3X/M30S.py index 3743f78f..0b91a958 100644 --- a/pyasic/miners/models/whatsminer/M3X/M30S.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M30S.py @@ -13,174 +13,169 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M30SV10(WhatsMinerMake): - raw_model = "M30S V10" + raw_model = MinerModel.WHATSMINER.M30SV10 + expected_chips = 148 - expected_fans = 2 class M30SV20(WhatsMinerMake): - raw_model = "M30S V20" + raw_model = MinerModel.WHATSMINER.M30SV20 + expected_chips = 156 - expected_fans = 2 class M30SV30(WhatsMinerMake): - raw_model = "M30S V30" + raw_model = MinerModel.WHATSMINER.M30SV30 + expected_chips = 164 - expected_fans = 2 class M30SV40(WhatsMinerMake): - raw_model = "M30S V40" + raw_model = MinerModel.WHATSMINER.M30SV40 + expected_chips = 172 - expected_fans = 2 class M30SV50(WhatsMinerMake): - raw_model = "M30S V50" + raw_model = MinerModel.WHATSMINER.M30SV50 + expected_chips = 156 - expected_fans = 2 class M30SV60(WhatsMinerMake): - raw_model = "M30S V60" + raw_model = MinerModel.WHATSMINER.M30SV60 + expected_chips = 164 - expected_fans = 2 class M30SV70(WhatsMinerMake): - raw_model = "M30S V70" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SV70 class M30SV80(WhatsMinerMake): - raw_model = "M30S V80" + raw_model = MinerModel.WHATSMINER.M30SV80 + expected_chips = 129 - expected_fans = 2 class M30SVE10(WhatsMinerMake): - raw_model = "M30S VE10" + raw_model = MinerModel.WHATSMINER.M30SVE10 + expected_chips = 105 - expected_fans = 2 class M30SVE20(WhatsMinerMake): - raw_model = "M30S VE20" + raw_model = MinerModel.WHATSMINER.M30SVE20 + expected_chips = 111 - expected_fans = 2 class M30SVE30(WhatsMinerMake): - raw_model = "M30S VE30" + raw_model = MinerModel.WHATSMINER.M30SVE30 + expected_chips = 117 - expected_fans = 2 class M30SVE40(WhatsMinerMake): - raw_model = "M30S VE40" + raw_model = MinerModel.WHATSMINER.M30SVE40 + expected_chips = 123 - expected_fans = 2 class M30SVE50(WhatsMinerMake): - raw_model = "M30S VE50" + raw_model = MinerModel.WHATSMINER.M30SVE50 + expected_chips = 129 - expected_fans = 2 class M30SVE60(WhatsMinerMake): - raw_model = "M30S VE60" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SVE60 class M30SVE70(WhatsMinerMake): - raw_model = "M30S VE70" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SVE70 class M30SVF10(WhatsMinerMake): - raw_model = "M30S VF10" + raw_model = MinerModel.WHATSMINER.M30SVF10 + expected_chips = 70 - expected_fans = 2 class M30SVF20(WhatsMinerMake): - raw_model = "M30S VF20" + raw_model = MinerModel.WHATSMINER.M30SVF20 + expected_chips = 74 - expected_fans = 2 class M30SVF30(WhatsMinerMake): - raw_model = "M30S VF30" + raw_model = MinerModel.WHATSMINER.M30SVF30 + expected_chips = 78 - expected_fans = 2 class M30SVG10(WhatsMinerMake): - raw_model = "M30S VG10" + raw_model = MinerModel.WHATSMINER.M30SVG10 + expected_chips = 66 - expected_fans = 2 class M30SVG20(WhatsMinerMake): - raw_model = "M30S VG20" + raw_model = MinerModel.WHATSMINER.M30SVG20 + expected_chips = 70 - expected_fans = 2 class M30SVG30(WhatsMinerMake): - raw_model = "M30S VG30" + raw_model = MinerModel.WHATSMINER.M30SVG30 + expected_chips = 74 - expected_fans = 2 class M30SVG40(WhatsMinerMake): - raw_model = "M30S VG40" + raw_model = MinerModel.WHATSMINER.M30SVG40 + expected_chips = 78 - expected_fans = 2 class M30SVH10(WhatsMinerMake): - raw_model = "M30S VH10" + raw_model = MinerModel.WHATSMINER.M30SVH10 + expected_chips = 64 - expected_fans = 2 class M30SVH20(WhatsMinerMake): - raw_model = "M30S VH20" + raw_model = MinerModel.WHATSMINER.M30SVH20 + expected_chips = 66 - expected_fans = 2 class M30SVH30(WhatsMinerMake): - raw_model = "M30S VH30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SVH30 class M30SVH40(WhatsMinerMake): - raw_model = "M30S VH40" + raw_model = MinerModel.WHATSMINER.M30SVH40 + expected_chips = 64 - expected_fans = 2 class M30SVH50(WhatsMinerMake): - raw_model = "M30S VH50" + raw_model = MinerModel.WHATSMINER.M30SVH50 + expected_chips = 66 - expected_fans = 2 class M30SVH60(WhatsMinerMake): - raw_model = "M30S VH60" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SVH60 class M30SVI20(WhatsMinerMake): - raw_model = "M30S VI20" + raw_model = MinerModel.WHATSMINER.M30SVI20 + expected_chips = 70 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M30S_Plus.py b/pyasic/miners/device/models/whatsminer/M3X/M30S_Plus.py similarity index 64% rename from pyasic/miners/models/whatsminer/M3X/M30S_Plus.py rename to pyasic/miners/device/models/whatsminer/M3X/M30S_Plus.py index 16345eb5..df750a73 100644 --- a/pyasic/miners/models/whatsminer/M3X/M30S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M30S_Plus.py @@ -13,186 +13,181 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M30SPlusV10(WhatsMinerMake): - raw_model = "M30S+ V10" + raw_model = MinerModel.WHATSMINER.M30SPlusV10 + expected_chips = 215 - expected_fans = 2 class M30SPlusV20(WhatsMinerMake): - raw_model = "M30S+ V20" + raw_model = MinerModel.WHATSMINER.M30SPlusV20 + expected_chips = 255 - expected_fans = 2 class M30SPlusV30(WhatsMinerMake): - raw_model = "M30S+ V30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SPlusV30 class M30SPlusV40(WhatsMinerMake): - raw_model = "M30S+ V40" + raw_model = MinerModel.WHATSMINER.M30SPlusV40 + expected_chips = 235 - expected_fans = 2 class M30SPlusV50(WhatsMinerMake): - raw_model = "M30S+ V50" + raw_model = MinerModel.WHATSMINER.M30SPlusV50 + expected_chips = 225 - expected_fans = 2 class M30SPlusV60(WhatsMinerMake): - raw_model = "M30S+ V60" + raw_model = MinerModel.WHATSMINER.M30SPlusV60 + expected_chips = 245 - expected_fans = 2 class M30SPlusV70(WhatsMinerMake): - raw_model = "M30S+ V70" + raw_model = MinerModel.WHATSMINER.M30SPlusV70 + expected_chips = 235 - expected_fans = 2 class M30SPlusV80(WhatsMinerMake): - raw_model = "M30S+ V80" + raw_model = MinerModel.WHATSMINER.M30SPlusV80 + expected_chips = 245 - expected_fans = 2 class M30SPlusV90(WhatsMinerMake): - raw_model = "M30S+ V90" + raw_model = MinerModel.WHATSMINER.M30SPlusV90 + expected_chips = 225 - expected_fans = 2 class M30SPlusV100(WhatsMinerMake): - raw_model = "M30S+ V100" + raw_model = MinerModel.WHATSMINER.M30SPlusV100 + expected_chips = 215 - expected_fans = 2 class M30SPlusVE30(WhatsMinerMake): - raw_model = "M30S+ VE30" + raw_model = MinerModel.WHATSMINER.M30SPlusVE30 + expected_chips = 148 - expected_fans = 2 class M30SPlusVE40(WhatsMinerMake): - raw_model = "M30S+ VE40" + raw_model = MinerModel.WHATSMINER.M30SPlusVE40 + expected_chips = 156 - expected_fans = 2 class M30SPlusVE50(WhatsMinerMake): - raw_model = "M30S+ VE50" + raw_model = MinerModel.WHATSMINER.M30SPlusVE50 + expected_chips = 164 - expected_fans = 2 class M30SPlusVE60(WhatsMinerMake): - raw_model = "M30S+ VE60" + raw_model = MinerModel.WHATSMINER.M30SPlusVE60 + expected_chips = 172 - expected_fans = 2 class M30SPlusVE70(WhatsMinerMake): - raw_model = "M30S+ VE70" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SPlusVE70 class M30SPlusVE80(WhatsMinerMake): - raw_model = "M30S+ VE80" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SPlusVE80 class M30SPlusVE90(WhatsMinerMake): - raw_model = "M30S+ VE90" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SPlusVE90 class M30SPlusVE100(WhatsMinerMake): - raw_model = "M30S+ VE100" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SPlusVE100 class M30SPlusVF20(WhatsMinerMake): - raw_model = "M30S+ VF20" + raw_model = MinerModel.WHATSMINER.M30SPlusVF20 + expected_chips = 111 - expected_fans = 2 class M30SPlusVF30(WhatsMinerMake): - raw_model = "M30S+ VF30" + raw_model = MinerModel.WHATSMINER.M30SPlusVF30 + expected_chips = 117 - expected_fans = 2 class M30SPlusVG20(WhatsMinerMake): - raw_model = "M30S+ VG20" + raw_model = MinerModel.WHATSMINER.M30SPlusVG20 + expected_chips = 82 - expected_fans = 2 class M30SPlusVG30(WhatsMinerMake): - raw_model = "M30S+ VG30" + raw_model = MinerModel.WHATSMINER.M30SPlusVG30 + expected_chips = 78 - expected_fans = 2 class M30SPlusVG40(WhatsMinerMake): - raw_model = "M30S+ VG40" + raw_model = MinerModel.WHATSMINER.M30SPlusVG40 + expected_chips = 105 - expected_fans = 2 class M30SPlusVG50(WhatsMinerMake): - raw_model = "M30S+ VG50" + raw_model = MinerModel.WHATSMINER.M30SPlusVG50 + expected_chips = 111 - expected_fans = 2 class M30SPlusVG60(WhatsMinerMake): - raw_model = "M30S+ VG60" + raw_model = MinerModel.WHATSMINER.M30SPlusVG60 + expected_chips = 86 - expected_fans = 2 class M30SPlusVH10(WhatsMinerMake): - raw_model = "M30S+ VH10" + raw_model = MinerModel.WHATSMINER.M30SPlusVH10 + expected_chips = 64 - expected_fans = 2 class M30SPlusVH20(WhatsMinerMake): - raw_model = "M30S+ VH20" + raw_model = MinerModel.WHATSMINER.M30SPlusVH20 + expected_chips = 66 - expected_fans = 2 class M30SPlusVH30(WhatsMinerMake): - raw_model = "M30S+ VH30" + raw_model = MinerModel.WHATSMINER.M30SPlusVH30 + expected_chips = 70 - expected_fans = 2 class M30SPlusVH40(WhatsMinerMake): - raw_model = "M30S+ VH40" + raw_model = MinerModel.WHATSMINER.M30SPlusVH40 + expected_chips = 74 - expected_fans = 2 class M30SPlusVH50(WhatsMinerMake): - raw_model = "M30S+ VH50" + raw_model = MinerModel.WHATSMINER.M30SPlusVH50 + expected_chips = 64 - expected_fans = 2 class M30SPlusVH60(WhatsMinerMake): - raw_model = "M30S+ VH60" + raw_model = MinerModel.WHATSMINER.M30SPlusVH60 + expected_chips = 66 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M30S_Plus_Plus.py b/pyasic/miners/device/models/whatsminer/M3X/M30S_Plus_Plus.py similarity index 67% rename from pyasic/miners/models/whatsminer/M3X/M30S_Plus_Plus.py rename to pyasic/miners/device/models/whatsminer/M3X/M30S_Plus_Plus.py index e955a637..9d9d3bd8 100644 --- a/pyasic/miners/models/whatsminer/M3X/M30S_Plus_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M30S_Plus_Plus.py @@ -13,130 +13,109 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M30SPlusPlusV10(WhatsMinerMake): - raw_model = "M30S++ V10" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusV10 expected_hashboards = 4 expected_chips = 255 - expected_fans = 2 class M30SPlusPlusV20(WhatsMinerMake): - raw_model = "M30S++ V20" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusV20 expected_hashboards = 4 expected_chips = 255 - expected_fans = 2 class M30SPlusPlusVE30(WhatsMinerMake): - raw_model = "M30S++ VE30" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVE30 expected_chips = 215 - expected_fans = 2 class M30SPlusPlusVE40(WhatsMinerMake): - raw_model = "M30S++ VE40" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVE40 expected_chips = 225 - expected_fans = 2 class M30SPlusPlusVE50(WhatsMinerMake): - raw_model = "M30S++ VE50" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVE50 expected_chips = 235 - expected_fans = 2 class M30SPlusPlusVF40(WhatsMinerMake): - raw_model = "M30S++ VF40" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVF40 expected_chips = 156 - expected_fans = 2 class M30SPlusPlusVG30(WhatsMinerMake): - raw_model = "M30S++ VG30" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVG30 expected_chips = 111 - expected_fans = 2 class M30SPlusPlusVG40(WhatsMinerMake): - raw_model = "M30S++ VG40" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVG40 expected_chips = 117 - expected_fans = 2 class M30SPlusPlusVG50(WhatsMinerMake): - raw_model = "M30S++ VG50" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVG50 class M30SPlusPlusVH10(WhatsMinerMake): - raw_model = "M30S++ VH10" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH10 expected_chips = 82 - expected_fans = 2 class M30SPlusPlusVH20(WhatsMinerMake): - raw_model = "M30S++ VH20" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH20 expected_chips = 86 - expected_fans = 2 class M30SPlusPlusVH30(WhatsMinerMake): - raw_model = "M30S++ VH30" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH30 expected_chips = 111 - expected_fans = 2 class M30SPlusPlusVH40(WhatsMinerMake): - raw_model = "M30S++ VH40" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH40 expected_chips = 70 - expected_fans = 2 class M30SPlusPlusVH50(WhatsMinerMake): - raw_model = "M30S++ VH50" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH50 expected_chips = 74 - expected_fans = 2 class M30SPlusPlusVH60(WhatsMinerMake): - raw_model = "M30S++ VH60" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH60 expected_chips = 78 - expected_fans = 2 class M30SPlusPlusVH70(WhatsMinerMake): - raw_model = "M30S++ VH70" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH70 expected_chips = 70 - expected_fans = 2 class M30SPlusPlusVH80(WhatsMinerMake): - raw_model = "M30S++ VH80" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH80 expected_chips = 74 - expected_fans = 2 class M30SPlusPlusVH90(WhatsMinerMake): - raw_model = "M30S++ VH90" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH90 expected_chips = 78 - expected_fans = 2 class M30SPlusPlusVH100(WhatsMinerMake): - raw_model = "M30S++ VH100" + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVH100 expected_chips = 82 - expected_fans = 2 class M30SPlusPlusVJ20(WhatsMinerMake): - raw_model = "M30S++ VJ20" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVJ20 class M30SPlusPlusVJ30(WhatsMinerMake): - raw_model = "M30S++ VJ30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M30SPlusPlusVJ30 diff --git a/pyasic/miners/models/whatsminer/M3X/M31.py b/pyasic/miners/device/models/whatsminer/M3X/M31.py similarity index 87% rename from pyasic/miners/models/whatsminer/M3X/M31.py rename to pyasic/miners/device/models/whatsminer/M3X/M31.py index 20cafd08..06065b8a 100644 --- a/pyasic/miners/models/whatsminer/M3X/M31.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M31.py @@ -13,17 +13,17 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M31V10(WhatsMinerMake): - raw_model = "M31 V10" + raw_model = MinerModel.WHATSMINER.M31V10 + expected_chips = 70 - expected_fans = 2 class M31V20(WhatsMinerMake): - raw_model = "M31 V20" + raw_model = MinerModel.WHATSMINER.M31V20 + expected_chips = 74 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M31H.py b/pyasic/miners/device/models/whatsminer/M3X/M31H.py similarity index 88% rename from pyasic/miners/models/whatsminer/M3X/M31H.py rename to pyasic/miners/device/models/whatsminer/M3X/M31H.py index 2a03ef74..cc27fbb4 100644 --- a/pyasic/miners/models/whatsminer/M3X/M31H.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M31H.py @@ -13,18 +13,20 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M31HV10(WhatsMinerMake): - raw_model = "M31H V10" + raw_model = MinerModel.WHATSMINER.M31HV10 + expected_chips = 114 expected_fans = 0 class M31HV40(WhatsMinerMake): - raw_model = "M31H V40" + raw_model = MinerModel.WHATSMINER.M31HV40 + expected_hashboards = 4 expected_chips = 136 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/M31L.py b/pyasic/miners/device/models/whatsminer/M3X/M31L.py similarity index 89% rename from pyasic/miners/models/whatsminer/M3X/M31L.py rename to pyasic/miners/device/models/whatsminer/M3X/M31L.py index 64338f6c..48671b07 100644 --- a/pyasic/miners/models/whatsminer/M3X/M31L.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M31L.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M31LV10(WhatsMinerMake): - raw_model = "M31L V10" + raw_model = MinerModel.WHATSMINER.M31LV10 + expected_chips = 114 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M31S.py b/pyasic/miners/device/models/whatsminer/M3X/M31S.py similarity index 73% rename from pyasic/miners/models/whatsminer/M3X/M31S.py rename to pyasic/miners/device/models/whatsminer/M3X/M31S.py index 8d93d005..e0af6ab7 100644 --- a/pyasic/miners/models/whatsminer/M3X/M31S.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M31S.py @@ -13,75 +13,73 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M31SV10(WhatsMinerMake): - raw_model = "M31S V10" + raw_model = MinerModel.WHATSMINER.M31SV10 + expected_chips = 105 - expected_fans = 2 class M31SV20(WhatsMinerMake): - raw_model = "M31S V20" + raw_model = MinerModel.WHATSMINER.M31SV20 + expected_chips = 111 - expected_fans = 2 class M31SV30(WhatsMinerMake): - raw_model = "M31S V30" + raw_model = MinerModel.WHATSMINER.M31SV30 + expected_chips = 117 - expected_fans = 2 class M31SV40(WhatsMinerMake): - raw_model = "M31S V40" + raw_model = MinerModel.WHATSMINER.M31SV40 + expected_chips = 123 - expected_fans = 2 class M31SV50(WhatsMinerMake): - raw_model = "M31S V50" + raw_model = MinerModel.WHATSMINER.M31SV50 + expected_chips = 78 - expected_fans = 2 class M31SV60(WhatsMinerMake): - raw_model = "M31S V60" + raw_model = MinerModel.WHATSMINER.M31SV60 + expected_chips = 105 - expected_fans = 2 class M31SV70(WhatsMinerMake): - raw_model = "M31S V70" + raw_model = MinerModel.WHATSMINER.M31SV70 + expected_chips = 111 - expected_fans = 2 class M31SV80(WhatsMinerMake): - raw_model = "M31S V80" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M31SV80 class M31SV90(WhatsMinerMake): - raw_model = "M31S V90" + raw_model = MinerModel.WHATSMINER.M31SV90 + expected_chips = 117 - expected_fans = 2 class M31SVE10(WhatsMinerMake): - raw_model = "M31S VE10" + raw_model = MinerModel.WHATSMINER.M31SVE10 + expected_chips = 70 - expected_fans = 2 class M31SVE20(WhatsMinerMake): - raw_model = "M31S VE20" + raw_model = MinerModel.WHATSMINER.M31SVE20 + expected_chips = 74 - expected_fans = 2 class M31SVE30(WhatsMinerMake): - raw_model = "M31S VE30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M31SVE30 diff --git a/pyasic/miners/models/whatsminer/M3X/M31SE.py b/pyasic/miners/device/models/whatsminer/M3X/M31SE.py similarity index 85% rename from pyasic/miners/models/whatsminer/M3X/M31SE.py rename to pyasic/miners/device/models/whatsminer/M3X/M31SE.py index 0fa5f971..7afd5854 100644 --- a/pyasic/miners/models/whatsminer/M3X/M31SE.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M31SE.py @@ -13,23 +13,23 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M31SEV10(WhatsMinerMake): - raw_model = "M31SE V10" + raw_model = MinerModel.WHATSMINER.M31SEV10 + expected_chips = 82 - expected_fans = 2 class M31SEV20(WhatsMinerMake): - raw_model = "M31SE V20" + raw_model = MinerModel.WHATSMINER.M31SEV20 + expected_chips = 78 - expected_fans = 2 class M31SEV30(WhatsMinerMake): - raw_model = "M31SE V30" + raw_model = MinerModel.WHATSMINER.M31SEV30 + expected_chips = 78 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M31S_Plus.py b/pyasic/miners/device/models/whatsminer/M3X/M31S_Plus.py similarity index 67% rename from pyasic/miners/models/whatsminer/M3X/M31S_Plus.py rename to pyasic/miners/device/models/whatsminer/M3X/M31S_Plus.py index 726f2d9e..2b80063d 100644 --- a/pyasic/miners/models/whatsminer/M3X/M31S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M31S_Plus.py @@ -13,122 +13,119 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M31SPlusV10(WhatsMinerMake): - raw_model = "M31S+ V10" + raw_model = MinerModel.WHATSMINER.M31SPlusV10 + expected_chips = 105 - expected_fans = 2 class M31SPlusV20(WhatsMinerMake): - raw_model = "M31S+ V20" + raw_model = MinerModel.WHATSMINER.M31SPlusV20 + expected_chips = 111 - expected_fans = 2 class M31SPlusV30(WhatsMinerMake): - raw_model = "M31S+ V30" + raw_model = MinerModel.WHATSMINER.M31SPlusV30 + expected_chips = 117 - expected_fans = 2 class M31SPlusV40(WhatsMinerMake): - raw_model = "M31S+ V40" + raw_model = MinerModel.WHATSMINER.M31SPlusV40 + expected_chips = 123 - expected_fans = 2 class M31SPlusV50(WhatsMinerMake): - raw_model = "M31S+ V50" + raw_model = MinerModel.WHATSMINER.M31SPlusV50 + expected_chips = 148 - expected_fans = 2 class M31SPlusV60(WhatsMinerMake): - raw_model = "M31S+ V60" + raw_model = MinerModel.WHATSMINER.M31SPlusV60 + expected_chips = 156 - expected_fans = 2 class M31SPlusV80(WhatsMinerMake): - raw_model = "M31S+ V80" + raw_model = MinerModel.WHATSMINER.M31SPlusV80 + expected_chips = 129 - expected_fans = 2 class M31SPlusV90(WhatsMinerMake): - raw_model = "M31S+ V90" + raw_model = MinerModel.WHATSMINER.M31SPlusV90 + expected_chips = 117 - expected_fans = 2 class M31SPlusV100(WhatsMinerMake): - raw_model = "M31S+ V100" + raw_model = MinerModel.WHATSMINER.M31SPlusV100 + expected_chips = 111 - expected_fans = 2 class M31SPlusVE10(WhatsMinerMake): - raw_model = "M31S+ VE10" + raw_model = MinerModel.WHATSMINER.M31SPlusVE10 + expected_chips = 82 - expected_fans = 2 class M31SPlusVE20(WhatsMinerMake): - raw_model = "M31S+ VE20" + raw_model = MinerModel.WHATSMINER.M31SPlusVE20 + expected_chips = 78 - expected_fans = 2 class M31SPlusVE30(WhatsMinerMake): - raw_model = "M31S+ VE30" + raw_model = MinerModel.WHATSMINER.M31SPlusVE30 + expected_chips = 105 - expected_fans = 2 class M31SPlusVE40(WhatsMinerMake): - raw_model = "M31S+ VE40" + raw_model = MinerModel.WHATSMINER.M31SPlusVE40 + expected_chips = 111 - expected_fans = 2 class M31SPlusVE50(WhatsMinerMake): - raw_model = "M31S+ VE50" + raw_model = MinerModel.WHATSMINER.M31SPlusVE50 + expected_chips = 117 - expected_fans = 2 class M31SPlusVE60(WhatsMinerMake): - raw_model = "M31S+ VE60" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M31SPlusVE60 class M31SPlusVE80(WhatsMinerMake): - raw_model = "M31S+ VE80" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M31SPlusVE80 class M31SPlusVF20(WhatsMinerMake): - raw_model = "M31S+ VF20" + raw_model = MinerModel.WHATSMINER.M31SPlusVF20 + expected_chips = 66 - expected_fans = 2 class M31SPlusVF30(WhatsMinerMake): - raw_model = "M31S+ VF30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M31SPlusVF30 class M31SPlusVG20(WhatsMinerMake): - raw_model = "M31S+ VG20" + raw_model = MinerModel.WHATSMINER.M31SPlusVG20 + expected_chips = 66 - expected_fans = 2 class M31SPlusVG30(WhatsMinerMake): - raw_model = "M31S+ VG30" + raw_model = MinerModel.WHATSMINER.M31SPlusVG30 + expected_chips = 70 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M32.py b/pyasic/miners/device/models/whatsminer/M3X/M32.py similarity index 87% rename from pyasic/miners/models/whatsminer/M3X/M32.py rename to pyasic/miners/device/models/whatsminer/M3X/M32.py index 4d69a66f..fb8a02a8 100644 --- a/pyasic/miners/models/whatsminer/M3X/M32.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M32.py @@ -13,17 +13,17 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M32V10(WhatsMinerMake): - raw_model = "M32 V10" + raw_model = MinerModel.WHATSMINER.M32V10 + expected_chips = 78 - expected_fans = 2 class M32V20(WhatsMinerMake): - raw_model = "M32 V20" + raw_model = MinerModel.WHATSMINER.M32V20 + expected_chips = 74 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M32S.py b/pyasic/miners/device/models/whatsminer/M3X/M32S.py similarity index 90% rename from pyasic/miners/models/whatsminer/M3X/M32S.py rename to pyasic/miners/device/models/whatsminer/M3X/M32S.py index 4009a33e..ed27e1d6 100644 --- a/pyasic/miners/models/whatsminer/M3X/M32S.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M32S.py @@ -13,11 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M32S(WhatsMinerMake): - raw_model = "M32S" + raw_model = MinerModel.WHATSMINER.M32S + expected_chips = 78 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M3X/M33.py b/pyasic/miners/device/models/whatsminer/M3X/M33.py similarity index 86% rename from pyasic/miners/models/whatsminer/M3X/M33.py rename to pyasic/miners/device/models/whatsminer/M3X/M33.py index 2d8da74a..6879de10 100644 --- a/pyasic/miners/models/whatsminer/M3X/M33.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M33.py @@ -13,23 +13,26 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M33V10(WhatsMinerMake): - raw_model = "M33 V10" + raw_model = MinerModel.WHATSMINER.M33V10 + expected_chips = 33 expected_fans = 0 class M33V20(WhatsMinerMake): - raw_model = "M33 V20" + raw_model = MinerModel.WHATSMINER.M33V20 + expected_chips = 62 expected_fans = 0 class M33V30(WhatsMinerMake): - raw_model = "M33 V30" + raw_model = MinerModel.WHATSMINER.M33V30 + expected_chips = 66 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/M33S.py b/pyasic/miners/device/models/whatsminer/M3X/M33S.py similarity index 90% rename from pyasic/miners/models/whatsminer/M3X/M33S.py rename to pyasic/miners/device/models/whatsminer/M3X/M33S.py index e88ff200..a06f5997 100644 --- a/pyasic/miners/models/whatsminer/M3X/M33S.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M33S.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M33SVG30(WhatsMinerMake): - raw_model = "M33S VG30" + raw_model = MinerModel.WHATSMINER.M33SVG30 + expected_hashboards = 4 expected_chips = 116 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/M33S_Plus.py b/pyasic/miners/device/models/whatsminer/M3X/M33S_Plus.py similarity index 85% rename from pyasic/miners/models/whatsminer/M3X/M33S_Plus.py rename to pyasic/miners/device/models/whatsminer/M3X/M33S_Plus.py index 3bdd93ea..d875616d 100644 --- a/pyasic/miners/models/whatsminer/M3X/M33S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M33S_Plus.py @@ -13,25 +13,28 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M33SPlusVG20(WhatsMinerMake): - raw_model = "M33S+ VG20" + raw_model = MinerModel.WHATSMINER.M33SPlusVG20 + expected_hashboards = 4 expected_chips = 112 expected_fans = 0 class M33SPlusVH20(WhatsMinerMake): - raw_model = "M33S+ VH20" + raw_model = MinerModel.WHATSMINER.M33SPlusVH20 + expected_hashboards = 4 expected_chips = 100 expected_fans = 0 class M33SPlusVH30(WhatsMinerMake): - raw_model = "M33S+ VH30" + raw_model = MinerModel.WHATSMINER.M33SPlusVH30 + expected_hashboards = 4 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/M33S_Plus_Plus.py b/pyasic/miners/device/models/whatsminer/M3X/M33S_Plus_Plus.py similarity index 85% rename from pyasic/miners/models/whatsminer/M3X/M33S_Plus_Plus.py rename to pyasic/miners/device/models/whatsminer/M3X/M33S_Plus_Plus.py index 33c50385..c1138acf 100644 --- a/pyasic/miners/models/whatsminer/M3X/M33S_Plus_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M33S_Plus_Plus.py @@ -13,25 +13,28 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M33SPlusPlusVH20(WhatsMinerMake): - raw_model = "M33S++ VH20" + raw_model = MinerModel.WHATSMINER.M33SPlusPlusVH20 + expected_hashboards = 4 expected_chips = 112 expected_fans = 0 class M33SPlusPlusVH30(WhatsMinerMake): - raw_model = "M33S++ VH30" + raw_model = MinerModel.WHATSMINER.M33SPlusPlusVH30 + expected_hashboards = 4 expected_fans = 0 class M33SPlusPlusVG40(WhatsMinerMake): - raw_model = "M33S++ VG40" + raw_model = MinerModel.WHATSMINER.M33SPlusPlusVG40 + expected_hashboards = 4 expected_chips = 174 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/M34S_Plus.py b/pyasic/miners/device/models/whatsminer/M3X/M34S_Plus.py similarity index 89% rename from pyasic/miners/models/whatsminer/M3X/M34S_Plus.py rename to pyasic/miners/device/models/whatsminer/M3X/M34S_Plus.py index e41a49a6..b02d3bca 100644 --- a/pyasic/miners/models/whatsminer/M3X/M34S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M34S_Plus.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M34SPlusVE10(WhatsMinerMake): - raw_model = "M34S+ VE10" + raw_model = MinerModel.WHATSMINER.M34SPlusVE10 + expected_hashboards = 4 expected_chips = 116 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/M36S.py b/pyasic/miners/device/models/whatsminer/M3X/M36S.py similarity index 90% rename from pyasic/miners/models/whatsminer/M3X/M36S.py rename to pyasic/miners/device/models/whatsminer/M3X/M36S.py index b9f2231b..0b7d2139 100644 --- a/pyasic/miners/models/whatsminer/M3X/M36S.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M36S.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M36SVE10(WhatsMinerMake): - raw_model = "M36S VE10" + raw_model = MinerModel.WHATSMINER.M36SVE10 + expected_hashboards = 4 expected_chips = 114 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/M36S_Plus.py b/pyasic/miners/device/models/whatsminer/M3X/M36S_Plus.py similarity index 89% rename from pyasic/miners/models/whatsminer/M3X/M36S_Plus.py rename to pyasic/miners/device/models/whatsminer/M3X/M36S_Plus.py index 954a88fe..5c56468f 100644 --- a/pyasic/miners/models/whatsminer/M3X/M36S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M36S_Plus.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M36SPlusVG30(WhatsMinerMake): - raw_model = "M36S+ VG30" + raw_model = MinerModel.WHATSMINER.M36SPlusVG30 + expected_hashboards = 4 expected_chips = 108 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/M36S_Plus_Plus.py b/pyasic/miners/device/models/whatsminer/M3X/M36S_Plus_Plus.py similarity index 89% rename from pyasic/miners/models/whatsminer/M3X/M36S_Plus_Plus.py rename to pyasic/miners/device/models/whatsminer/M3X/M36S_Plus_Plus.py index 9a1a06fd..6553cbb2 100644 --- a/pyasic/miners/models/whatsminer/M3X/M36S_Plus_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M36S_Plus_Plus.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M36SPlusPlusVH30(WhatsMinerMake): - raw_model = "M36S++ VH30" + raw_model = MinerModel.WHATSMINER.M36SPlusPlusVH30 + expected_hashboards = 4 expected_chips = 80 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/M39.py b/pyasic/miners/device/models/whatsminer/M3X/M39.py similarity index 86% rename from pyasic/miners/models/whatsminer/M3X/M39.py rename to pyasic/miners/device/models/whatsminer/M3X/M39.py index c235f430..b2cbe068 100644 --- a/pyasic/miners/models/whatsminer/M3X/M39.py +++ b/pyasic/miners/device/models/whatsminer/M3X/M39.py @@ -13,23 +13,26 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M39V10(WhatsMinerMake): - raw_model = "M39 V10" + raw_model = MinerModel.WHATSMINER.M39V10 + expected_chips = 50 expected_fans = 0 class M39V20(WhatsMinerMake): - raw_model = "M39 V20" + raw_model = MinerModel.WHATSMINER.M39V20 + expected_chips = 54 expected_fans = 0 class M39V30(WhatsMinerMake): - raw_model = "M39 V30" + raw_model = MinerModel.WHATSMINER.M39V30 + expected_chips = 68 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M3X/__init__.py b/pyasic/miners/device/models/whatsminer/M3X/__init__.py similarity index 100% rename from pyasic/miners/models/whatsminer/M3X/__init__.py rename to pyasic/miners/device/models/whatsminer/M3X/__init__.py diff --git a/pyasic/miners/models/whatsminer/M5X/M50.py b/pyasic/miners/device/models/whatsminer/M5X/M50.py similarity index 72% rename from pyasic/miners/models/whatsminer/M5X/M50.py rename to pyasic/miners/device/models/whatsminer/M5X/M50.py index 8e807584..0cb2d4a7 100644 --- a/pyasic/miners/models/whatsminer/M5X/M50.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M50.py @@ -13,81 +13,76 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M50VE30(WhatsMinerMake): - raw_model = "M50 VE30" + raw_model = MinerModel.WHATSMINER.M50VE30 + expected_hashboards = 4 expected_chips = 255 - expected_fans = 2 class M50VG30(WhatsMinerMake): - raw_model = "M50 VG30" + raw_model = MinerModel.WHATSMINER.M50VG30 + expected_chips = 156 - expected_fans = 2 class M50VH10(WhatsMinerMake): - raw_model = "M50 VH10" + raw_model = MinerModel.WHATSMINER.M50VH10 + expected_chips = 86 - expected_fans = 2 class M50VH20(WhatsMinerMake): - raw_model = "M50 VH20" + raw_model = MinerModel.WHATSMINER.M50VH20 + expected_chips = 111 - expected_fans = 2 class M50VH30(WhatsMinerMake): - raw_model = "M50 VH30" + raw_model = MinerModel.WHATSMINER.M50VH30 + expected_chips = 117 - expected_fans = 2 class M50VH40(WhatsMinerMake): - raw_model = "M50 VH40" + raw_model = MinerModel.WHATSMINER.M50VH40 + expected_chips = 84 - expected_fans = 2 class M50VH50(WhatsMinerMake): - raw_model = "M50 VH50" + raw_model = MinerModel.WHATSMINER.M50VH50 + expected_chips = 105 - expected_fans = 2 class M50VH60(WhatsMinerMake): - raw_model = "M50 VH60" + raw_model = MinerModel.WHATSMINER.M50VH60 + expected_chips = 84 - expected_fans = 2 class M50VH70(WhatsMinerMake): - raw_model = "M50 VH70" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50VH70 class M50VH80(WhatsMinerMake): - raw_model = "M50 VH80" + raw_model = MinerModel.WHATSMINER.M50VH80 + expected_chips = 111 - expected_fans = 2 class M50VJ10(WhatsMinerMake): - raw_model = "M50 VJ10" - expected_chips = 0 - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50VJ10 class M50VJ20(WhatsMinerMake): - raw_model = "M50 VJ20" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50VJ20 class M50VJ30(WhatsMinerMake): - raw_model = "M50 VJ30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50VJ30 diff --git a/pyasic/miners/models/whatsminer/M5X/M50S.py b/pyasic/miners/device/models/whatsminer/M5X/M50S.py similarity index 76% rename from pyasic/miners/models/whatsminer/M5X/M50S.py rename to pyasic/miners/device/models/whatsminer/M5X/M50S.py index 01479066..51cf9871 100644 --- a/pyasic/miners/models/whatsminer/M5X/M50S.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M50S.py @@ -13,47 +13,41 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M50SVJ10(WhatsMinerMake): - raw_model = "M50S VJ10" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SVJ10 class M50SVJ20(WhatsMinerMake): - raw_model = "M50S VJ20" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SVJ20 class M50SVJ30(WhatsMinerMake): - raw_model = "M50S VJ30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SVJ30 class M50SVH10(WhatsMinerMake): - raw_model = "M50S VH10" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SVH10 class M50SVH20(WhatsMinerMake): - raw_model = "M50S VH20" + raw_model = MinerModel.WHATSMINER.M50SVH20 + expected_chips = 135 - expected_fans = 2 class M50SVH30(WhatsMinerMake): - raw_model = "M50S VH30" + raw_model = MinerModel.WHATSMINER.M50SVH30 + expected_chips = 156 - expected_fans = 2 class M50SVH40(WhatsMinerMake): - raw_model = "M50S VH40" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SVH40 class M50SVH50(WhatsMinerMake): - raw_model = "M50S VH50" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SVH50 diff --git a/pyasic/miners/models/whatsminer/M5X/M50S_Plus.py b/pyasic/miners/device/models/whatsminer/M5X/M50S_Plus.py similarity index 82% rename from pyasic/miners/models/whatsminer/M5X/M50S_Plus.py rename to pyasic/miners/device/models/whatsminer/M5X/M50S_Plus.py index 7e4278a3..aa1e8fa7 100644 --- a/pyasic/miners/models/whatsminer/M5X/M50S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M50S_Plus.py @@ -13,26 +13,23 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M50SPlusVH30(WhatsMinerMake): - raw_model = "M50S+ VH30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SPlusVH30 class M50SPlusVH40(WhatsMinerMake): - raw_model = "M50S+ VH40" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SPlusVH40 class M50SPlusVJ30(WhatsMinerMake): - raw_model = "M50S+ VJ30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SPlusVJ30 class M50SPlusVK20(WhatsMinerMake): - raw_model = "M50S+ VK20" + raw_model = MinerModel.WHATSMINER.M50SPlusVK20 + expected_chips = 117 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M5X/M50S_Plus_Plus.py b/pyasic/miners/device/models/whatsminer/M5X/M50S_Plus_Plus.py similarity index 84% rename from pyasic/miners/models/whatsminer/M5X/M50S_Plus_Plus.py rename to pyasic/miners/device/models/whatsminer/M5X/M50S_Plus_Plus.py index e0abaca1..29aab688 100644 --- a/pyasic/miners/models/whatsminer/M5X/M50S_Plus_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M50S_Plus_Plus.py @@ -13,22 +13,21 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M50SPlusPlusVK10(WhatsMinerMake): - raw_model = "M50S++ VK10" + raw_model = MinerModel.WHATSMINER.M50SPlusPlusVK10 + expected_chips = 117 - expected_fans = 2 class M50SPlusPlusVK20(WhatsMinerMake): - raw_model = "M50S++ VK20" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M50SPlusPlusVK20 class M50SPlusPlusVK30(WhatsMinerMake): - raw_model = "M50S++ VK30" + raw_model = MinerModel.WHATSMINER.M50SPlusPlusVK30 + expected_chips = 76 - expected_fans = 2 diff --git a/pyasic/miners/models/whatsminer/M5X/M53.py b/pyasic/miners/device/models/whatsminer/M5X/M53.py similarity index 90% rename from pyasic/miners/models/whatsminer/M5X/M53.py rename to pyasic/miners/device/models/whatsminer/M5X/M53.py index 1fb07b3a..5efbdb35 100644 --- a/pyasic/miners/models/whatsminer/M5X/M53.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M53.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M53VH30(WhatsMinerMake): - raw_model = "M53 VH30" + raw_model = MinerModel.WHATSMINER.M53VH30 + expected_hashboards = 4 expected_chips = 128 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M5X/M53S.py b/pyasic/miners/device/models/whatsminer/M5X/M53S.py similarity index 87% rename from pyasic/miners/models/whatsminer/M5X/M53S.py rename to pyasic/miners/device/models/whatsminer/M5X/M53S.py index 8c86f25e..20fc9b30 100644 --- a/pyasic/miners/models/whatsminer/M5X/M53S.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M53S.py @@ -13,15 +13,17 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M53SVH30(WhatsMinerMake): - raw_model = "M53S VH30" + raw_model = MinerModel.WHATSMINER.M53SVH30 + expected_fans = 0 class M53SVJ40(WhatsMinerMake): - raw_model = "M53S VJ40" + raw_model = MinerModel.WHATSMINER.M53SVJ40 + expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M5X/M53S_Plus.py b/pyasic/miners/device/models/whatsminer/M5X/M53S_Plus.py similarity index 89% rename from pyasic/miners/models/whatsminer/M5X/M53S_Plus.py rename to pyasic/miners/device/models/whatsminer/M5X/M53S_Plus.py index 7ea09739..dc4e9607 100644 --- a/pyasic/miners/models/whatsminer/M5X/M53S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M53S_Plus.py @@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M53SPlusVJ30(WhatsMinerMake): - raw_model = "M53S+ VJ30" + raw_model = MinerModel.WHATSMINER.M53SPlusVJ30 + expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M5X/M53S_Plus_Plus.py b/pyasic/miners/device/models/whatsminer/M5X/M53S_Plus_Plus.py similarity index 89% rename from pyasic/miners/models/whatsminer/M5X/M53S_Plus_Plus.py rename to pyasic/miners/device/models/whatsminer/M5X/M53S_Plus_Plus.py index eb54a1bd..e576499d 100644 --- a/pyasic/miners/models/whatsminer/M5X/M53S_Plus_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M53S_Plus_Plus.py @@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M53SPlusPlusVK10(WhatsMinerMake): - raw_model = "M53S++ VK10" + raw_model = MinerModel.WHATSMINER.M53SPlusPlusVK10 + expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M5X/M56.py b/pyasic/miners/device/models/whatsminer/M5X/M56.py similarity index 90% rename from pyasic/miners/models/whatsminer/M5X/M56.py rename to pyasic/miners/device/models/whatsminer/M5X/M56.py index e6708dd0..13f21d12 100644 --- a/pyasic/miners/models/whatsminer/M5X/M56.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M56.py @@ -13,12 +13,13 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M56VH30(WhatsMinerMake): - raw_model = "M56 VH30" + raw_model = MinerModel.WHATSMINER.M56VH30 + expected_hashboards = 4 expected_chips = 108 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M5X/M56S.py b/pyasic/miners/device/models/whatsminer/M5X/M56S.py similarity index 89% rename from pyasic/miners/models/whatsminer/M5X/M56S.py rename to pyasic/miners/device/models/whatsminer/M5X/M56S.py index ecd7f0a9..56aaad91 100644 --- a/pyasic/miners/models/whatsminer/M5X/M56S.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M56S.py @@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M56SVH30(WhatsMinerMake): - raw_model = "M56S VH30" + raw_model = MinerModel.WHATSMINER.M56SVH30 + expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M5X/M56S_Plus.py b/pyasic/miners/device/models/whatsminer/M5X/M56S_Plus.py similarity index 89% rename from pyasic/miners/models/whatsminer/M5X/M56S_Plus.py rename to pyasic/miners/device/models/whatsminer/M5X/M56S_Plus.py index 59c4a361..dfb3d01e 100644 --- a/pyasic/miners/models/whatsminer/M5X/M56S_Plus.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M56S_Plus.py @@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M56SPlusVJ30(WhatsMinerMake): - raw_model = "M56S+ VJ30" + raw_model = MinerModel.WHATSMINER.M56SPlusVJ30 + expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M5X/M59.py b/pyasic/miners/device/models/whatsminer/M5X/M59.py similarity index 89% rename from pyasic/miners/models/whatsminer/M5X/M59.py rename to pyasic/miners/device/models/whatsminer/M5X/M59.py index cf685ad8..2d907a0f 100644 --- a/pyasic/miners/models/whatsminer/M5X/M59.py +++ b/pyasic/miners/device/models/whatsminer/M5X/M59.py @@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M59VH30(WhatsMinerMake): - raw_model = "M59 VH30" + raw_model = MinerModel.WHATSMINER.M59VH30 + expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M5X/__init__.py b/pyasic/miners/device/models/whatsminer/M5X/__init__.py similarity index 100% rename from pyasic/miners/models/whatsminer/M5X/__init__.py rename to pyasic/miners/device/models/whatsminer/M5X/__init__.py diff --git a/pyasic/miners/models/whatsminer/M6X/M60.py b/pyasic/miners/device/models/whatsminer/M6X/M60.py similarity index 82% rename from pyasic/miners/models/whatsminer/M6X/M60.py rename to pyasic/miners/device/models/whatsminer/M6X/M60.py index 9640ce64..2f3418a2 100644 --- a/pyasic/miners/models/whatsminer/M6X/M60.py +++ b/pyasic/miners/device/models/whatsminer/M6X/M60.py @@ -13,25 +13,21 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M60VK10(WhatsMinerMake): - raw_model = "M60 VK10" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M60VK10 class M60VK20(WhatsMinerMake): - raw_model = "M60 VK20" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M60VK20 class M60VK30(WhatsMinerMake): - raw_model = "M60 VK30" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M60VK30 class M60VK40(WhatsMinerMake): - raw_model = "M60 VK40" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M60VK40 diff --git a/pyasic/miners/models/whatsminer/M6X/M60S.py b/pyasic/miners/device/models/whatsminer/M6X/M60S.py similarity index 82% rename from pyasic/miners/models/whatsminer/M6X/M60S.py rename to pyasic/miners/device/models/whatsminer/M6X/M60S.py index 86ddc2c4..9a6b9494 100644 --- a/pyasic/miners/models/whatsminer/M6X/M60S.py +++ b/pyasic/miners/device/models/whatsminer/M6X/M60S.py @@ -13,27 +13,23 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M60SVK10(WhatsMinerMake): - raw_model = "M60S VK10" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M60SVK10 class M60SVK20(WhatsMinerMake): - raw_model = "M60S VK20" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M60SVK20 class M60SVK30(WhatsMinerMake): - raw_model = "M60S VK30" - expected_hashboards = 3 + raw_model = MinerModel.WHATSMINER.M60SVK30 + expected_chips = 78 - expected_fans = 2 class M60SVK40(WhatsMinerMake): - raw_model = "M60S VK40" - expected_fans = 2 + raw_model = MinerModel.WHATSMINER.M60SVK40 diff --git a/pyasic/miners/models/whatsminer/M6X/M63.py b/pyasic/miners/device/models/whatsminer/M6X/M63.py similarity index 85% rename from pyasic/miners/models/whatsminer/M6X/M63.py rename to pyasic/miners/device/models/whatsminer/M6X/M63.py index f9840ad4..fd0a219e 100644 --- a/pyasic/miners/models/whatsminer/M6X/M63.py +++ b/pyasic/miners/device/models/whatsminer/M6X/M63.py @@ -13,22 +13,25 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M63VK10(WhatsMinerMake): - raw_model = "M63 VK10" + raw_model = MinerModel.WHATSMINER.M63VK10 + expected_fans = 0 class M63VK20(WhatsMinerMake): - raw_model = "M63 VK20" + raw_model = MinerModel.WHATSMINER.M63VK20 + expected_fans = 0 class M63VK30(WhatsMinerMake): - raw_model = "M63 VK30" + raw_model = MinerModel.WHATSMINER.M63VK30 + expected_chips = 68 expected_hashboards = 4 expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M6X/M63S.py b/pyasic/miners/device/models/whatsminer/M6X/M63S.py similarity index 85% rename from pyasic/miners/models/whatsminer/M6X/M63S.py rename to pyasic/miners/device/models/whatsminer/M6X/M63S.py index b38e775d..7ed57e11 100644 --- a/pyasic/miners/models/whatsminer/M6X/M63S.py +++ b/pyasic/miners/device/models/whatsminer/M6X/M63S.py @@ -13,20 +13,23 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M63SVK10(WhatsMinerMake): - raw_model = "M63S VK10" + raw_model = MinerModel.WHATSMINER.M63SVK10 + expected_fans = 0 class M63SVK20(WhatsMinerMake): - raw_model = "M63S VK20" + raw_model = MinerModel.WHATSMINER.M63SVK20 + expected_fans = 0 class M63SVK30(WhatsMinerMake): - raw_model = "M63S VK30" + raw_model = MinerModel.WHATSMINER.M63SVK30 + expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M6X/M66.py b/pyasic/miners/device/models/whatsminer/M6X/M66.py similarity index 87% rename from pyasic/miners/models/whatsminer/M6X/M66.py rename to pyasic/miners/device/models/whatsminer/M6X/M66.py index 3910aff8..325a9063 100644 --- a/pyasic/miners/models/whatsminer/M6X/M66.py +++ b/pyasic/miners/device/models/whatsminer/M6X/M66.py @@ -13,15 +13,17 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M66VK20(WhatsMinerMake): - raw_model = "M66 VK20" + raw_model = MinerModel.WHATSMINER.M66VK20 + expected_fans = 0 class M66VK30(WhatsMinerMake): - raw_model = "M66 VK30" + raw_model = MinerModel.WHATSMINER.M66VK30 + expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M6X/M66S.py b/pyasic/miners/device/models/whatsminer/M6X/M66S.py similarity index 85% rename from pyasic/miners/models/whatsminer/M6X/M66S.py rename to pyasic/miners/device/models/whatsminer/M6X/M66S.py index 57abdf0d..3fd2b221 100644 --- a/pyasic/miners/models/whatsminer/M6X/M66S.py +++ b/pyasic/miners/device/models/whatsminer/M6X/M66S.py @@ -13,22 +13,25 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ - -from pyasic.miners.makes import WhatsMinerMake +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import WhatsMinerMake class M66SVK20(WhatsMinerMake): - raw_model = "M66S VK20" + raw_model = MinerModel.WHATSMINER.M66SVK20 + expected_fans = 0 class M66SVK30(WhatsMinerMake): - raw_model = "M66S VK30" + raw_model = MinerModel.WHATSMINER.M66SVK30 + expected_chips = 96 expected_hashboards = 4 expected_fans = 0 class M66SVK40(WhatsMinerMake): - raw_model = "M66S VK40" + raw_model = MinerModel.WHATSMINER.M66SVK40 + expected_fans = 0 diff --git a/pyasic/miners/models/whatsminer/M6X/__init__.py b/pyasic/miners/device/models/whatsminer/M6X/__init__.py similarity index 100% rename from pyasic/miners/models/whatsminer/M6X/__init__.py rename to pyasic/miners/device/models/whatsminer/M6X/__init__.py diff --git a/pyasic/miners/models/whatsminer/__init__.py b/pyasic/miners/device/models/whatsminer/__init__.py similarity index 100% rename from pyasic/miners/models/whatsminer/__init__.py rename to pyasic/miners/device/models/whatsminer/__init__.py diff --git a/pyasic/miners/factory.py b/pyasic/miners/factory.py index 965a47b7..93219ee8 100644 --- a/pyasic/miners/factory.py +++ b/pyasic/miners/factory.py @@ -34,9 +34,9 @@ from pyasic.miners.backends import * from pyasic.miners.backends.unknown import UnknownMiner from pyasic.miners.base import AnyMiner from pyasic.miners.blockminer import * +from pyasic.miners.device.makes import * from pyasic.miners.goldshell import * from pyasic.miners.innosilicon import * -from pyasic.miners.makes import * from pyasic.miners.whatsminer import * diff --git a/pyasic/miners/goldshell/bfgminer/X5/CK5.py b/pyasic/miners/goldshell/bfgminer/X5/CK5.py index 177e5266..ae0c2853 100644 --- a/pyasic/miners/goldshell/bfgminer/X5/CK5.py +++ b/pyasic/miners/goldshell/bfgminer/X5/CK5.py @@ -14,7 +14,7 @@ # limitations under the License. - # ------------------------------------------------------------------------------ from pyasic.miners.backends import GoldshellMiner -from pyasic.miners.models import CK5 +from pyasic.miners.device.models import CK5 class GoldshellCK5(GoldshellMiner, CK5): diff --git a/pyasic/miners/goldshell/bfgminer/X5/HS5.py b/pyasic/miners/goldshell/bfgminer/X5/HS5.py index 292b45dd..c6e35c61 100644 --- a/pyasic/miners/goldshell/bfgminer/X5/HS5.py +++ b/pyasic/miners/goldshell/bfgminer/X5/HS5.py @@ -14,7 +14,7 @@ # limitations under the License. - # ------------------------------------------------------------------------------ from pyasic.miners.backends import GoldshellMiner -from pyasic.miners.models import HS5 +from pyasic.miners.device.models import HS5 class GoldshellHS5(GoldshellMiner, HS5): diff --git a/pyasic/miners/goldshell/bfgminer/X5/KD5.py b/pyasic/miners/goldshell/bfgminer/X5/KD5.py index ca312aab..0d06b349 100644 --- a/pyasic/miners/goldshell/bfgminer/X5/KD5.py +++ b/pyasic/miners/goldshell/bfgminer/X5/KD5.py @@ -14,7 +14,7 @@ # limitations under the License. - # ------------------------------------------------------------------------------ from pyasic.miners.backends import GoldshellMiner -from pyasic.miners.models import KD5 +from pyasic.miners.device.models import KD5 class GoldshellKD5(GoldshellMiner, KD5): diff --git a/pyasic/miners/goldshell/bfgminer/XBox/KDBox.py b/pyasic/miners/goldshell/bfgminer/XBox/KDBox.py index 98ba4897..17478300 100644 --- a/pyasic/miners/goldshell/bfgminer/XBox/KDBox.py +++ b/pyasic/miners/goldshell/bfgminer/XBox/KDBox.py @@ -14,7 +14,7 @@ # limitations under the License. - # ------------------------------------------------------------------------------ from pyasic.miners.backends import GoldshellMiner -from pyasic.miners.models import KDBoxII, KDBoxPro +from pyasic.miners.device.models import KDBoxII, KDBoxPro class GoldshellKDBoxII(GoldshellMiner, KDBoxII): diff --git a/pyasic/miners/goldshell/bfgminer/XMax/KDMax.py b/pyasic/miners/goldshell/bfgminer/XMax/KDMax.py index d7ed94f0..3f898ef7 100644 --- a/pyasic/miners/goldshell/bfgminer/XMax/KDMax.py +++ b/pyasic/miners/goldshell/bfgminer/XMax/KDMax.py @@ -14,7 +14,7 @@ # limitations under the License. - # ------------------------------------------------------------------------------ from pyasic.miners.backends import GoldshellMiner -from pyasic.miners.models import KDMax +from pyasic.miners.device.models import KDMax class GoldshellKDMax(GoldshellMiner, KDMax): diff --git a/pyasic/miners/innosilicon/cgminer/A10X/A10X.py b/pyasic/miners/innosilicon/cgminer/A10X/A10X.py index 6f1acfa4..f969fe75 100644 --- a/pyasic/miners/innosilicon/cgminer/A10X/A10X.py +++ b/pyasic/miners/innosilicon/cgminer/A10X/A10X.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends.innosilicon import Innosilicon -from pyasic.miners.models import A10X +from pyasic.miners.device.models import A10X class InnosiliconA10X(Innosilicon, A10X): diff --git a/pyasic/miners/innosilicon/cgminer/T3X/T3H.py b/pyasic/miners/innosilicon/cgminer/T3X/T3H.py index ec6a7f01..e47e51c4 100644 --- a/pyasic/miners/innosilicon/cgminer/T3X/T3H.py +++ b/pyasic/miners/innosilicon/cgminer/T3X/T3H.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends.innosilicon import Innosilicon -from pyasic.miners.models import T3HPlus +from pyasic.miners.device.models import T3HPlus class InnosiliconT3HPlus(Innosilicon, T3HPlus): diff --git a/pyasic/miners/models/auradine/AD/AD2.py b/pyasic/miners/models/auradine/AD/AD2.py deleted file mode 100644 index a3e704b4..00000000 --- a/pyasic/miners/models/auradine/AD/AD2.py +++ /dev/null @@ -1,6 +0,0 @@ -from pyasic.miners.makes import AuradineMake - - -class AuradineAD2500(AuradineMake): - raw_model = "AD2500" - expected_fans = 0 diff --git a/pyasic/miners/models/auradine/AD/AD3.py b/pyasic/miners/models/auradine/AD/AD3.py deleted file mode 100644 index e3b04add..00000000 --- a/pyasic/miners/models/auradine/AD/AD3.py +++ /dev/null @@ -1,6 +0,0 @@ -from pyasic.miners.makes import AuradineMake - - -class AuradineAD3500(AuradineMake): - raw_model = "AD3500" - expected_fans = 0 diff --git a/pyasic/miners/models/auradine/AI/AI2.py b/pyasic/miners/models/auradine/AI/AI2.py deleted file mode 100644 index 8cb05218..00000000 --- a/pyasic/miners/models/auradine/AI/AI2.py +++ /dev/null @@ -1,6 +0,0 @@ -from pyasic.miners.makes import AuradineMake - - -class AuradineAI2500(AuradineMake): - raw_model = "AI2500" - expected_fans = 0 diff --git a/pyasic/miners/models/auradine/AI/AI3.py b/pyasic/miners/models/auradine/AI/AI3.py deleted file mode 100644 index 05a6bf0e..00000000 --- a/pyasic/miners/models/auradine/AI/AI3.py +++ /dev/null @@ -1,6 +0,0 @@ -from pyasic.miners.makes import AuradineMake - - -class AuradineAI3680(AuradineMake): - raw_model = "AI3680" - expected_fans = 0 diff --git a/pyasic/miners/models/auradine/AT/AT1.py b/pyasic/miners/models/auradine/AT/AT1.py deleted file mode 100644 index 1e8c84ad..00000000 --- a/pyasic/miners/models/auradine/AT/AT1.py +++ /dev/null @@ -1,7 +0,0 @@ -from pyasic.miners.makes import AuradineMake - - -class AuradineAT1500(AuradineMake): - raw_model = "AT1500" - expected_chips = 132 - expected_fans = 4 diff --git a/pyasic/miners/models/auradine/AT/AT2.py b/pyasic/miners/models/auradine/AT/AT2.py deleted file mode 100644 index 6ce2bc64..00000000 --- a/pyasic/miners/models/auradine/AT/AT2.py +++ /dev/null @@ -1,11 +0,0 @@ -from pyasic.miners.makes import AuradineMake - - -class AuradineAT2860(AuradineMake): - raw_model = "AT2860" - expected_fans = 4 - - -class AuradineAT2880(AuradineMake): - raw_model = "AT2880" - expected_fans = 4 diff --git a/pyasic/miners/models/epic/blockminer/blockminer.py b/pyasic/miners/models/epic/blockminer/blockminer.py deleted file mode 100644 index 8fca89d7..00000000 --- a/pyasic/miners/models/epic/blockminer/blockminer.py +++ /dev/null @@ -1,13 +0,0 @@ -from pyasic.miners.makes import ePICMake - - -class BlockMiner520i(ePICMake): - raw_model = "BlockMiner 520i" - expected_chips = 124 - expected_fans = 4 - - -class BlockMiner720i(ePICMake): - raw_model = "BlockMiner 720i" - expected_chips = 180 - expected_fans = 4 diff --git a/pyasic/miners/whatsminer/btminer/M2X/M20.py b/pyasic/miners/whatsminer/btminer/M2X/M20.py index 8191209b..bee4e5db 100644 --- a/pyasic/miners/whatsminer/btminer/M2X/M20.py +++ b/pyasic/miners/whatsminer/btminer/M2X/M20.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M2X -from pyasic.miners.models import M20V10 +from pyasic.miners.device.models import M20V10 class BTMinerM20V10(M2X, M20V10): diff --git a/pyasic/miners/whatsminer/btminer/M2X/M20P.py b/pyasic/miners/whatsminer/btminer/M2X/M20P.py index 6fb2f445..604a3c49 100644 --- a/pyasic/miners/whatsminer/btminer/M2X/M20P.py +++ b/pyasic/miners/whatsminer/btminer/M2X/M20P.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M2X -from pyasic.miners.models import M20PV10, M20PV30 +from pyasic.miners.device.models import M20PV10, M20PV30 class BTMinerM20PV10(M2X, M20PV10): diff --git a/pyasic/miners/whatsminer/btminer/M2X/M20S.py b/pyasic/miners/whatsminer/btminer/M2X/M20S.py index e2c87863..ac94f3f8 100644 --- a/pyasic/miners/whatsminer/btminer/M2X/M20S.py +++ b/pyasic/miners/whatsminer/btminer/M2X/M20S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M2X -from pyasic.miners.models import M20SV10, M20SV20, M20SV30 +from pyasic.miners.device.models import M20SV10, M20SV20, M20SV30 class BTMinerM20SV10(M2X, M20SV10): diff --git a/pyasic/miners/whatsminer/btminer/M2X/M20S_Plus.py b/pyasic/miners/whatsminer/btminer/M2X/M20S_Plus.py index 4473c7ef..6d646201 100644 --- a/pyasic/miners/whatsminer/btminer/M2X/M20S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M2X/M20S_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M2X -from pyasic.miners.models import M20SPlusV30 +from pyasic.miners.device.models import M20SPlusV30 class BTMinerM20SPlusV30(M2X, M20SPlusV30): diff --git a/pyasic/miners/whatsminer/btminer/M2X/M21.py b/pyasic/miners/whatsminer/btminer/M2X/M21.py index 91f26991..31771d96 100644 --- a/pyasic/miners/whatsminer/btminer/M2X/M21.py +++ b/pyasic/miners/whatsminer/btminer/M2X/M21.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M2X -from pyasic.miners.models import M21V10 +from pyasic.miners.device.models import M21V10 class BTMinerM21V10(M2X, M21V10): diff --git a/pyasic/miners/whatsminer/btminer/M2X/M21S.py b/pyasic/miners/whatsminer/btminer/M2X/M21S.py index b0b9ebd7..e9e5232b 100644 --- a/pyasic/miners/whatsminer/btminer/M2X/M21S.py +++ b/pyasic/miners/whatsminer/btminer/M2X/M21S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M2X -from pyasic.miners.models import M21SV20, M21SV60, M21SV70 +from pyasic.miners.device.models import M21SV20, M21SV60, M21SV70 class BTMinerM21SV20(M2X, M21SV20): diff --git a/pyasic/miners/whatsminer/btminer/M2X/M21S_Plus.py b/pyasic/miners/whatsminer/btminer/M2X/M21S_Plus.py index fb1c9cfd..2af37623 100644 --- a/pyasic/miners/whatsminer/btminer/M2X/M21S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M2X/M21S_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M2X -from pyasic.miners.models import M21SPlusV20 +from pyasic.miners.device.models import M21SPlusV20 class BTMinerM21SPlusV20(M2X, M21SPlusV20): diff --git a/pyasic/miners/whatsminer/btminer/M2X/M29.py b/pyasic/miners/whatsminer/btminer/M2X/M29.py index 0747e3bd..b9a98125 100644 --- a/pyasic/miners/whatsminer/btminer/M2X/M29.py +++ b/pyasic/miners/whatsminer/btminer/M2X/M29.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M2X -from pyasic.miners.models import M29V10 +from pyasic.miners.device.models import M29V10 class BTMinerM29V10(M2X, M29V10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M30.py b/pyasic/miners/whatsminer/btminer/M3X/M30.py index aa0f8ede..a02be406 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M30.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M30.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M30V10, M30V20 +from pyasic.miners.device.models import M30V10, M30V20 class BTMinerM30V10(M3X, M30V10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M30K.py b/pyasic/miners/whatsminer/btminer/M3X/M30K.py index 82224539..b85167aa 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M30K.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M30K.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M30KV10 +from pyasic.miners.device.models import M30KV10 class BTMinerM30KV10(M3X, M30KV10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M30L.py b/pyasic/miners/whatsminer/btminer/M3X/M30L.py index 2d1954fd..a1b5ea9c 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M30L.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M30L.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M30LV10 +from pyasic.miners.device.models import M30LV10 class BTMinerM30LV10(M3X, M30LV10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M30S.py b/pyasic/miners/whatsminer/btminer/M3X/M30S.py index 695a8264..f2f342dd 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M30S.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M30S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( M30SV10, M30SV20, M30SV30, diff --git a/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus.py index 83ef256e..b12dffd2 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( M30SPlusV10, M30SPlusV20, M30SPlusV30, diff --git a/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus_Plus.py index 77c5fa54..b341a0d1 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( M30SPlusPlusV10, M30SPlusPlusV20, M30SPlusPlusVE30, diff --git a/pyasic/miners/whatsminer/btminer/M3X/M31.py b/pyasic/miners/whatsminer/btminer/M3X/M31.py index f5d0c71d..88c7f197 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M31.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M31.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M31V10, M31V20 +from pyasic.miners.device.models import M31V10, M31V20 class BTMinerM31V10(M3X, M31V10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M31H.py b/pyasic/miners/whatsminer/btminer/M3X/M31H.py index dc5df52b..b830ba97 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M31H.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M31H.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M31HV10, M31HV40 +from pyasic.miners.device.models import M31HV10, M31HV40 class BTMinerM31HV10(M3X, M31HV10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M31L.py b/pyasic/miners/whatsminer/btminer/M3X/M31L.py index 8bdbe34b..56cda4be 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M31L.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M31L.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M30LV10 +from pyasic.miners.device.models import M30LV10 class BTMinerM31LV10(M3X, M30LV10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M31S.py b/pyasic/miners/whatsminer/btminer/M3X/M31S.py index c8acd011..4bdbaacd 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M31S.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M31S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( M31SV10, M31SV20, M31SV30, diff --git a/pyasic/miners/whatsminer/btminer/M3X/M31SE.py b/pyasic/miners/whatsminer/btminer/M3X/M31SE.py index 8f8e127e..d7a0afe3 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M31SE.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M31SE.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M31SEV10, M31SEV20, M31SEV30 +from pyasic.miners.device.models import M31SEV10, M31SEV20, M31SEV30 class BTMinerM31SEV10(M3X, M31SEV10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M31S_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M31S_Plus.py index 8ed13a8c..98e0075e 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M31S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M31S_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( M31SPlusV10, M31SPlusV20, M31SPlusV30, diff --git a/pyasic/miners/whatsminer/btminer/M3X/M32.py b/pyasic/miners/whatsminer/btminer/M3X/M32.py index 98da3f05..39632188 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M32.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M32.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M32V10, M32V20 +from pyasic.miners.device.models import M32V10, M32V20 class BTMinerM32V10(M3X, M32V10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M32S.py b/pyasic/miners/whatsminer/btminer/M3X/M32S.py index e6ba475b..3f56290d 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M32S.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M32S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M32S +from pyasic.miners.device.models import M32S class BTMinerM32S(M3X, M32S): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M33.py b/pyasic/miners/whatsminer/btminer/M3X/M33.py index d2ba6519..55376535 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M33.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M33.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M33V10, M33V20, M33V30 +from pyasic.miners.device.models import M33V10, M33V20, M33V30 class BTMinerM33V10(M3X, M33V10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M33S.py b/pyasic/miners/whatsminer/btminer/M3X/M33S.py index 6286db37..08f5c86c 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M33S.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M33S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M33SVG30 +from pyasic.miners.device.models import M33SVG30 class BTMinerM33SVG30(M3X, M33SVG30): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M33S_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M33S_Plus.py index dddbbce0..c0532a7a 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M33S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M33S_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M33SPlusVG20, M33SPlusVH20, M33SPlusVH30 +from pyasic.miners.device.models import M33SPlusVG20, M33SPlusVH20, M33SPlusVH30 class BTMinerM33SPlusVG20(M3X, M33SPlusVG20): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M33S_Plus_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M33S_Plus_Plus.py index ee8f198c..d42a2768 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M33S_Plus_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M33S_Plus_Plus.py @@ -15,7 +15,11 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M33SPlusPlusVG40, M33SPlusPlusVH20, M33SPlusPlusVH30 +from pyasic.miners.device.models import ( + M33SPlusPlusVG40, + M33SPlusPlusVH20, + M33SPlusPlusVH30, +) class BTMinerM33SPlusPlusVH20(M3X, M33SPlusPlusVH20): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M34S_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M34S_Plus.py index d66cb244..e226e810 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M34S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M34S_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M34SPlusVE10 +from pyasic.miners.device.models import M34SPlusVE10 class BTMinerM34SPlusVE10(M3X, M34SPlusVE10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M36S.py b/pyasic/miners/whatsminer/btminer/M3X/M36S.py index e83d9c2c..203e5907 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M36S.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M36S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M36SVE10 +from pyasic.miners.device.models import M36SVE10 class BTMinerM36SVE10(M3X, M36SVE10): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M36S_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M36S_Plus.py index f637590b..033f3038 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M36S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M36S_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M36SPlusVG30 +from pyasic.miners.device.models import M36SPlusVG30 class BTMinerM36SPlusVG30(M3X, M36SPlusVG30): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M36S_Plus_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M36S_Plus_Plus.py index cc307b06..14e70ba1 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M36S_Plus_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M36S_Plus_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M36SPlusPlusVH30 +from pyasic.miners.device.models import M36SPlusPlusVH30 class BTMinerM36SPlusPlusVH30(M3X, M36SPlusPlusVH30): diff --git a/pyasic/miners/whatsminer/btminer/M3X/M39.py b/pyasic/miners/whatsminer/btminer/M3X/M39.py index df599b05..a6f32cd6 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M39.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M39.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M3X -from pyasic.miners.models import M39V10, M39V20, M39V30 +from pyasic.miners.device.models import M39V10, M39V20, M39V30 class BTMinerM39V10(M3X, M39V10): diff --git a/pyasic/miners/whatsminer/btminer/M5X/M50.py b/pyasic/miners/whatsminer/btminer/M5X/M50.py index 13f9bd5a..40ab6762 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M50.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M50.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( M50VE30, M50VG30, M50VH10, diff --git a/pyasic/miners/whatsminer/btminer/M5X/M50S.py b/pyasic/miners/whatsminer/btminer/M5X/M50S.py index a76054b3..2eca7a20 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M50S.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M50S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import ( +from pyasic.miners.device.models import ( M50SVH10, M50SVH20, M50SVH30, diff --git a/pyasic/miners/whatsminer/btminer/M5X/M50S_Plus.py b/pyasic/miners/whatsminer/btminer/M5X/M50S_Plus.py index 062065b1..0444d39c 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M50S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M50S_Plus.py @@ -15,7 +15,12 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import M50SPlusVH30, M50SPlusVH40, M50SPlusVJ30, M50SPlusVK20 +from pyasic.miners.device.models import ( + M50SPlusVH30, + M50SPlusVH40, + M50SPlusVJ30, + M50SPlusVK20, +) class BTMinerM50SPlusVH30(M5X, M50SPlusVH30): diff --git a/pyasic/miners/whatsminer/btminer/M5X/M50S_Plus_Plus.py b/pyasic/miners/whatsminer/btminer/M5X/M50S_Plus_Plus.py index f9b1cc60..3715cd59 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M50S_Plus_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M50S_Plus_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models.whatsminer.M5X.M50S_Plus_Plus import ( # noqa - ignore _module import +from pyasic.miners.device.models.whatsminer import ( # noqa - ignore _module import M50SPlusPlusVK10, M50SPlusPlusVK20, M50SPlusPlusVK30, diff --git a/pyasic/miners/whatsminer/btminer/M5X/M53.py b/pyasic/miners/whatsminer/btminer/M5X/M53.py index 0892b3a7..72a8e7ea 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M53.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M53.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import M53VH30 +from pyasic.miners.device.models import M53VH30 class BTMinerM53VH30(M5X, M53VH30): diff --git a/pyasic/miners/whatsminer/btminer/M5X/M53S.py b/pyasic/miners/whatsminer/btminer/M5X/M53S.py index 0766a13a..cb42bb70 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M53S.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M53S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import M53SVH30, M53SVJ40 +from pyasic.miners.device.models import M53SVH30, M53SVJ40 class BTMinerM53SVH30(M5X, M53SVH30): diff --git a/pyasic/miners/whatsminer/btminer/M5X/M53S_Plus.py b/pyasic/miners/whatsminer/btminer/M5X/M53S_Plus.py index ee16f0a0..cd1814b7 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M53S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M53S_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import M53SPlusVJ30 +from pyasic.miners.device.models import M53SPlusVJ30 class BTMinerM53SPlusVJ30(M5X, M53SPlusVJ30): diff --git a/pyasic/miners/whatsminer/btminer/M5X/M53S_Plus_Plus.py b/pyasic/miners/whatsminer/btminer/M5X/M53S_Plus_Plus.py index 3c70b233..3e74c80c 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M53S_Plus_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M53S_Plus_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import M53SPlusPlusVK10 +from pyasic.miners.device.models import M53SPlusPlusVK10 class BTMinerM53SPlusPlusVK10(M5X, M53SPlusPlusVK10): diff --git a/pyasic/miners/whatsminer/btminer/M5X/M56.py b/pyasic/miners/whatsminer/btminer/M5X/M56.py index 9b518d9c..a8f1fd7c 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M56.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M56.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import M56VH30 +from pyasic.miners.device.models import M56VH30 class BTMinerM56VH30(M5X, M56VH30): diff --git a/pyasic/miners/whatsminer/btminer/M5X/M56S.py b/pyasic/miners/whatsminer/btminer/M5X/M56S.py index b8c7ae7c..3e326f44 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M56S.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M56S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import M56SVH30 +from pyasic.miners.device.models import M56SVH30 class BTMinerM56SVH30(M5X, M56SVH30): diff --git a/pyasic/miners/whatsminer/btminer/M5X/M56S_Plus.py b/pyasic/miners/whatsminer/btminer/M5X/M56S_Plus.py index feb0414b..3b5fbffd 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M56S_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M56S_Plus.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import M56SPlusVJ30 +from pyasic.miners.device.models import M56SPlusVJ30 class BTMinerM56SPlusVJ30(M5X, M56SPlusVJ30): diff --git a/pyasic/miners/whatsminer/btminer/M5X/M59.py b/pyasic/miners/whatsminer/btminer/M5X/M59.py index 1375e844..36fdfa8d 100644 --- a/pyasic/miners/whatsminer/btminer/M5X/M59.py +++ b/pyasic/miners/whatsminer/btminer/M5X/M59.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M5X -from pyasic.miners.models import M59VH30 +from pyasic.miners.device.models import M59VH30 class BTMinerM59VH30(M5X, M59VH30): diff --git a/pyasic/miners/whatsminer/btminer/M6X/M60.py b/pyasic/miners/whatsminer/btminer/M6X/M60.py index e4587808..19fad109 100644 --- a/pyasic/miners/whatsminer/btminer/M6X/M60.py +++ b/pyasic/miners/whatsminer/btminer/M6X/M60.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M6X -from pyasic.miners.models import M60VK10, M60VK20, M60VK30, M60VK40 +from pyasic.miners.device.models import M60VK10, M60VK20, M60VK30, M60VK40 class BTMinerM60VK10(M6X, M60VK10): diff --git a/pyasic/miners/whatsminer/btminer/M6X/M60S.py b/pyasic/miners/whatsminer/btminer/M6X/M60S.py index d3801efd..f1020db9 100644 --- a/pyasic/miners/whatsminer/btminer/M6X/M60S.py +++ b/pyasic/miners/whatsminer/btminer/M6X/M60S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M6X -from pyasic.miners.models import M60SVK10, M60SVK20, M60SVK30, M60SVK40 +from pyasic.miners.device.models import M60SVK10, M60SVK20, M60SVK30, M60SVK40 class BTMinerM60SVK10(M6X, M60SVK10): diff --git a/pyasic/miners/whatsminer/btminer/M6X/M63.py b/pyasic/miners/whatsminer/btminer/M6X/M63.py index 5dfbc902..8d5d5357 100644 --- a/pyasic/miners/whatsminer/btminer/M6X/M63.py +++ b/pyasic/miners/whatsminer/btminer/M6X/M63.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M6X -from pyasic.miners.models import M63VK10, M63VK20, M63VK30 +from pyasic.miners.device.models import M63VK10, M63VK20, M63VK30 class BTMinerM63VK10(M6X, M63VK10): diff --git a/pyasic/miners/whatsminer/btminer/M6X/M63S.py b/pyasic/miners/whatsminer/btminer/M6X/M63S.py index 3d431b59..9530cff1 100644 --- a/pyasic/miners/whatsminer/btminer/M6X/M63S.py +++ b/pyasic/miners/whatsminer/btminer/M6X/M63S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M6X -from pyasic.miners.models import M63SVK10, M63SVK20, M63SVK30 +from pyasic.miners.device.models import M63SVK10, M63SVK20, M63SVK30 class BTMinerM63SVK10(M6X, M63SVK10): diff --git a/pyasic/miners/whatsminer/btminer/M6X/M66.py b/pyasic/miners/whatsminer/btminer/M6X/M66.py index 509ad71b..a172c134 100644 --- a/pyasic/miners/whatsminer/btminer/M6X/M66.py +++ b/pyasic/miners/whatsminer/btminer/M6X/M66.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M6X -from pyasic.miners.models import M66VK20, M66VK30 +from pyasic.miners.device.models import M66VK20, M66VK30 class BTMinerM66VK20(M6X, M66VK20): diff --git a/pyasic/miners/whatsminer/btminer/M6X/M66S.py b/pyasic/miners/whatsminer/btminer/M6X/M66S.py index c8138af9..498d7619 100644 --- a/pyasic/miners/whatsminer/btminer/M6X/M66S.py +++ b/pyasic/miners/whatsminer/btminer/M6X/M66S.py @@ -15,7 +15,7 @@ # ------------------------------------------------------------------------------ from pyasic.miners.backends import M6X -from pyasic.miners.models import M66SVK20, M66SVK30, M66SVK40 +from pyasic.miners.device.models import M66SVK20, M66SVK30, M66SVK40 class BTMinerM66SVK20(M6X, M66SVK20): diff --git a/pyasic/web/__init__.py b/pyasic/web/__init__.py index bc47f6ad..5e030e65 100644 --- a/pyasic/web/__init__.py +++ b/pyasic/web/__init__.py @@ -13,10 +13,9 @@ # See the License for the specific language governing permissions and - # limitations under the License. - # ------------------------------------------------------------------------------ -from .base import BaseWebAPI - from .antminer import AntminerModernWebAPI, AntminerOldWebAPI from .auradine import AuradineWebAPI +from .base import BaseWebAPI from .braiins_os import BOSerWebAPI, BOSMinerWebAPI from .epic import ePICWebAPI from .goldshell import GoldshellWebAPI diff --git a/pyproject.toml b/pyproject.toml index aba68333..9c447457 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyasic" -version = "0.56.0" +version = "0.57.0" description = "A simplified and standardized interface for Bitcoin ASICs." authors = ["UpstreamData "] repository = "https://github.com/UpstreamData/pyasic" diff --git a/tests/__init__.py b/tests/__init__.py index cdbcd3d3..b073a7c0 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -14,10 +14,10 @@ # limitations under the License. - # ------------------------------------------------------------------------------ -from tests.rpc_tests import * from tests.config_tests import TestConfig from tests.miners_tests import MinersTest from tests.network_tests import NetworkTest +from tests.rpc_tests import * if __name__ == "__main__": # `coverage run --source pyasic -m unittest discover` will give code coverage data diff --git a/tests/miners_tests/__init__.py b/tests/miners_tests/__init__.py index 47dfa5b4..f85b622c 100644 --- a/tests/miners_tests/__init__.py +++ b/tests/miners_tests/__init__.py @@ -55,6 +55,7 @@ class MinersTest(unittest.TestCase): "expected_hashrate", "uptime", "wattage", + "voltage", "wattage_limit", ] )