refactor: remove parameters from get_{x} functions and move them to _get_{x}(**params). Add miner.fw_str, and miner.raw_model. Remove model from get_data exclude. Swap fan_count to expected_fans.
This commit is contained in:
@@ -66,14 +66,14 @@ class _MinerPhaseBalancer:
|
||||
str(miner.ip): {
|
||||
"miner": miner,
|
||||
"set": 0,
|
||||
"min": miner.fan_count * FAN_USAGE,
|
||||
"min": miner.expected_fans * FAN_USAGE,
|
||||
}
|
||||
for miner in miners
|
||||
}
|
||||
for miner in miners:
|
||||
if (
|
||||
isinstance(miner, BTMiner)
|
||||
and not (miner.model.startswith("M2") if miner.model else True)
|
||||
and not (miner.raw_model.startswith("M2") if miner.raw_model else True)
|
||||
) or isinstance(miner, BOSMiner):
|
||||
if isinstance(miner, S9):
|
||||
self.miners[str(miner.ip)]["tune"] = True
|
||||
@@ -98,8 +98,8 @@ class _MinerPhaseBalancer:
|
||||
self.miners[str(miner.ip)]["tune"] = False
|
||||
self.miners[str(miner.ip)]["shutdown"] = True
|
||||
self.miners[str(miner.ip)]["max"] = 3600
|
||||
if miner.model:
|
||||
if miner.model.startswith("M2"):
|
||||
if miner.raw_model:
|
||||
if miner.raw_model.startswith("M2"):
|
||||
self.miners[str(miner.ip)]["tune"] = False
|
||||
self.miners[str(miner.ip)]["shutdown"] = True
|
||||
self.miners[str(miner.ip)]["max"] = 2400
|
||||
|
||||
@@ -34,44 +34,43 @@ from pyasic.web.antminer import AntminerModernWebAPI, AntminerOldWebAPI
|
||||
ANTMINER_MODERN_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction(
|
||||
"get_mac", [WebAPICommand("web_get_system_info", "get_system_info")]
|
||||
"_get_mac", [WebAPICommand("web_get_system_info", "get_system_info")]
|
||||
),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction(
|
||||
"get_hostname", [WebAPICommand("web_get_system_info", "get_system_info")]
|
||||
"_get_hostname", [WebAPICommand("web_get_system_info", "get_system_info")]
|
||||
),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction("get_hashboards", []),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("get_wattage_limit"),
|
||||
str(DataOptions.HASHBOARDS): DataFunction("_get_hashboards"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("_get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("_get_wattage_limit"),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction(
|
||||
"get_errors", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_errors", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction(
|
||||
"get_fault_light",
|
||||
"_get_fault_light",
|
||||
[WebAPICommand("web_get_blink_status", "get_blink_status")],
|
||||
),
|
||||
str(DataOptions.IS_MINING): DataFunction(
|
||||
"is_mining", [WebAPICommand("web_get_conf", "get_miner_conf")]
|
||||
"_is_mining", [WebAPICommand("web_get_conf", "get_miner_conf")]
|
||||
),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
@@ -141,7 +140,7 @@ class AntminerModern(BMMiner):
|
||||
await self.send_config(cfg)
|
||||
return True
|
||||
|
||||
async def get_hostname(self, web_get_system_info: dict = None) -> Union[str, None]:
|
||||
async def _get_hostname(self, web_get_system_info: dict = None) -> Union[str, None]:
|
||||
if not web_get_system_info:
|
||||
try:
|
||||
web_get_system_info = await self.web.get_system_info()
|
||||
@@ -154,7 +153,7 @@ class AntminerModern(BMMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_mac(self, web_get_system_info: dict = None) -> Union[str, None]:
|
||||
async def _get_mac(self, web_get_system_info: dict = None) -> Union[str, None]:
|
||||
if not web_get_system_info:
|
||||
try:
|
||||
web_get_system_info = await self.web.get_system_info()
|
||||
@@ -174,7 +173,7 @@ class AntminerModern(BMMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_errors(self, web_summary: dict = None) -> List[MinerErrorData]:
|
||||
async def _get_errors(self, web_summary: dict = None) -> List[MinerErrorData]:
|
||||
if not web_summary:
|
||||
try:
|
||||
web_summary = await self.web.summary()
|
||||
@@ -194,7 +193,7 @@ class AntminerModern(BMMiner):
|
||||
pass
|
||||
return errors
|
||||
|
||||
async def get_hashboards(self) -> List[HashBoard]:
|
||||
async def _get_hashboards(self) -> List[HashBoard]:
|
||||
hashboards = [
|
||||
HashBoard(idx, expected_chips=self.expected_chips)
|
||||
for idx in range(self.expected_hashboards)
|
||||
@@ -230,7 +229,7 @@ class AntminerModern(BMMiner):
|
||||
pass
|
||||
return hashboards
|
||||
|
||||
async def get_fault_light(self, web_get_blink_status: dict = None) -> bool:
|
||||
async def _get_fault_light(self, web_get_blink_status: dict = None) -> bool:
|
||||
if self.light:
|
||||
return self.light
|
||||
|
||||
@@ -247,7 +246,7 @@ class AntminerModern(BMMiner):
|
||||
pass
|
||||
return self.light
|
||||
|
||||
async def get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
async def _get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
@@ -312,7 +311,7 @@ class AntminerModern(BMMiner):
|
||||
protocol=protocol,
|
||||
)
|
||||
|
||||
async def is_mining(self, web_get_conf: dict = None) -> Optional[bool]:
|
||||
async def _is_mining(self, web_get_conf: dict = None) -> Optional[bool]:
|
||||
if not web_get_conf:
|
||||
try:
|
||||
web_get_conf = await self.web.get_miner_conf()
|
||||
@@ -329,7 +328,7 @@ class AntminerModern(BMMiner):
|
||||
except LookupError:
|
||||
pass
|
||||
|
||||
async def get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
async def _get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
@@ -345,43 +344,42 @@ class AntminerModern(BMMiner):
|
||||
|
||||
ANTMINER_OLD_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction("get_mac"),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.MAC): DataFunction("_get_mac"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction(
|
||||
"get_hostname", [WebAPICommand("web_get_system_info", "get_system_info")]
|
||||
"_get_hostname", [WebAPICommand("web_get_system_info", "get_system_info")]
|
||||
),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("get_wattage_limit"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("_get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("_get_wattage_limit"),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("get_errors"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("_get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction(
|
||||
"get_fault_light",
|
||||
"_get_fault_light",
|
||||
[WebAPICommand("web_get_blink_status", "get_blink_status")],
|
||||
),
|
||||
str(DataOptions.IS_MINING): DataFunction(
|
||||
"is_mining", [WebAPICommand("web_get_conf", "get_miner_conf")]
|
||||
"_is_mining", [WebAPICommand("web_get_conf", "get_miner_conf")]
|
||||
),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
@@ -408,7 +406,7 @@ class AntminerOld(CGMiner):
|
||||
self.config = config
|
||||
await self.web.set_miner_conf(config.as_am_old(user_suffix=user_suffix))
|
||||
|
||||
async def get_mac(self) -> Union[str, None]:
|
||||
async def _get_mac(self) -> Union[str, None]:
|
||||
try:
|
||||
data = await self.web.get_system_info()
|
||||
if data:
|
||||
@@ -445,7 +443,7 @@ class AntminerOld(CGMiner):
|
||||
return True
|
||||
return False
|
||||
|
||||
async def get_fault_light(self, web_get_blink_status: dict = None) -> bool:
|
||||
async def _get_fault_light(self, web_get_blink_status: dict = None) -> bool:
|
||||
if self.light:
|
||||
return self.light
|
||||
|
||||
@@ -462,7 +460,7 @@ class AntminerOld(CGMiner):
|
||||
pass
|
||||
return self.light
|
||||
|
||||
async def get_hostname(self, web_get_system_info: dict = None) -> Optional[str]:
|
||||
async def _get_hostname(self, web_get_system_info: dict = None) -> Optional[str]:
|
||||
if not web_get_system_info:
|
||||
try:
|
||||
web_get_system_info = await self.web.get_system_info()
|
||||
@@ -475,14 +473,14 @@ class AntminerOld(CGMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
async def _get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
fans_data = [Fan() for _ in range(self.fan_count)]
|
||||
fans_data = [Fan() for _ in range(self.expected_fans)]
|
||||
if api_stats:
|
||||
try:
|
||||
fan_offset = -1
|
||||
@@ -495,7 +493,7 @@ class AntminerOld(CGMiner):
|
||||
if fan_offset == -1:
|
||||
fan_offset = 3
|
||||
|
||||
for fan in range(self.fan_count):
|
||||
for fan in range(self.expected_fans):
|
||||
fans_data[fan].speed = api_stats["STATS"][1].get(
|
||||
f"fan{fan_offset+fan}", 0
|
||||
)
|
||||
@@ -503,7 +501,7 @@ class AntminerOld(CGMiner):
|
||||
pass
|
||||
return fans_data
|
||||
|
||||
async def get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
async def _get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
hashboards = []
|
||||
|
||||
if not api_stats:
|
||||
@@ -557,7 +555,7 @@ class AntminerOld(CGMiner):
|
||||
|
||||
return hashboards
|
||||
|
||||
async def is_mining(self, web_get_conf: dict = None) -> Optional[bool]:
|
||||
async def _is_mining(self, web_get_conf: dict = None) -> Optional[bool]:
|
||||
if not web_get_conf:
|
||||
try:
|
||||
web_get_conf = await self.web.get_miner_conf()
|
||||
@@ -582,7 +580,7 @@ class AntminerOld(CGMiner):
|
||||
else:
|
||||
return False
|
||||
|
||||
async def get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
async def _get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
|
||||
@@ -32,35 +32,34 @@ from pyasic.miners.base import (
|
||||
|
||||
BFGMINER_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction("get_mac"),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.MAC): DataFunction("_get_mac"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction("get_hostname"),
|
||||
str(DataOptions.HOSTNAME): DataFunction("_get_hostname"),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("get_wattage_limit"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("_get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("_get_wattage_limit"),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction("get_uptime"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("_get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("_get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("_is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction("_get_uptime"),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
)
|
||||
@@ -117,14 +116,10 @@ class BFGMiner(BaseMiner):
|
||||
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
|
||||
##################################################
|
||||
|
||||
async def get_mac(self) -> str:
|
||||
return "00:00:00:00:00:00"
|
||||
|
||||
async def get_api_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
# Check to see if the version info is already cached
|
||||
if self.api_ver:
|
||||
return self.api_ver
|
||||
async def _get_mac(self) -> Optional[str]:
|
||||
return None
|
||||
|
||||
async def _get_api_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
if not api_version:
|
||||
try:
|
||||
api_version = await self.api.version()
|
||||
@@ -139,11 +134,7 @@ class BFGMiner(BaseMiner):
|
||||
|
||||
return self.api_ver
|
||||
|
||||
async def get_fw_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
# Check to see if the version info is already cached
|
||||
if self.fw_ver:
|
||||
return self.fw_ver
|
||||
|
||||
async def _get_fw_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
if not api_version:
|
||||
try:
|
||||
api_version = await self.api.version()
|
||||
@@ -158,26 +149,16 @@ class BFGMiner(BaseMiner):
|
||||
|
||||
return self.fw_ver
|
||||
|
||||
async def get_version(
|
||||
self, api_version: dict = None
|
||||
) -> Tuple[Optional[str], Optional[str]]:
|
||||
# check if version is cached
|
||||
miner_version = namedtuple("MinerVersion", "api_ver fw_ver")
|
||||
return miner_version(
|
||||
api_ver=await self.get_api_ver(api_version),
|
||||
fw_ver=await self.get_fw_ver(api_version=api_version),
|
||||
)
|
||||
|
||||
async def reboot(self) -> bool:
|
||||
return False
|
||||
|
||||
async def get_fan_psu(self):
|
||||
async def _get_fan_psu(self):
|
||||
return None
|
||||
|
||||
async def get_hostname(self) -> Optional[str]:
|
||||
async def _get_hostname(self) -> Optional[str]:
|
||||
return None
|
||||
|
||||
async def get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
async def _get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
# get hr from API
|
||||
if not api_summary:
|
||||
try:
|
||||
@@ -191,7 +172,7 @@ class BFGMiner(BaseMiner):
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
async def _get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
hashboards = []
|
||||
|
||||
if not api_stats:
|
||||
@@ -245,16 +226,16 @@ class BFGMiner(BaseMiner):
|
||||
|
||||
return hashboards
|
||||
|
||||
async def get_env_temp(self) -> Optional[float]:
|
||||
async def _get_env_temp(self) -> Optional[float]:
|
||||
return None
|
||||
|
||||
async def get_wattage(self) -> Optional[int]:
|
||||
async def _get_wattage(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_wattage_limit(self) -> Optional[int]:
|
||||
async def _get_wattage_limit(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
async def _get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
@@ -274,7 +255,7 @@ class BFGMiner(BaseMiner):
|
||||
if fan_offset == -1:
|
||||
fan_offset = 1
|
||||
|
||||
for fan in range(self.fan_count):
|
||||
for fan in range(self.expected_fans):
|
||||
fans_data[fan] = api_stats["STATS"][1].get(
|
||||
f"fan{fan_offset+fan}", 0
|
||||
)
|
||||
@@ -284,13 +265,13 @@ class BFGMiner(BaseMiner):
|
||||
|
||||
return fans
|
||||
|
||||
async def get_errors(self) -> List[MinerErrorData]:
|
||||
async def _get_errors(self) -> List[MinerErrorData]:
|
||||
return []
|
||||
|
||||
async def get_fault_light(self) -> bool:
|
||||
async def _get_fault_light(self) -> bool:
|
||||
return False
|
||||
|
||||
async def get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
async def _get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
# X19 method, not sure compatibility
|
||||
if not api_stats:
|
||||
try:
|
||||
@@ -314,8 +295,8 @@ class BFGMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
async def _is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
return None
|
||||
|
||||
async def get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
async def _get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
return None
|
||||
|
||||
@@ -32,40 +32,39 @@ from pyasic.web.goldshell import GoldshellWebAPI
|
||||
GOLDSHELL_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction(
|
||||
"get_mac", [WebAPICommand("web_setting", "setting")]
|
||||
"_get_mac", [WebAPICommand("web_setting", "setting")]
|
||||
),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver", [WebAPICommand("web_status", "status")]
|
||||
"_get_fw_ver", [WebAPICommand("web_status", "status")]
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction("get_hostname"),
|
||||
str(DataOptions.HOSTNAME): DataFunction("_get_hostname"),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards",
|
||||
"_get_hashboards",
|
||||
[
|
||||
RPCAPICommand("api_devs", "devs"),
|
||||
RPCAPICommand("api_devdetails", "devdetails"),
|
||||
],
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("get_wattage_limit"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("_get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("_get_wattage_limit"),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction("get_uptime"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("_get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("_get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("_is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction("_get_uptime"),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
)
|
||||
@@ -110,7 +109,7 @@ class BFGMinerGoldshell(BFGMiner):
|
||||
url=pool["url"], user=pool["user"], password=pool["pass"]
|
||||
)
|
||||
|
||||
async def get_mac(self, web_setting: dict = None) -> str:
|
||||
async def _get_mac(self, web_setting: dict = None) -> str:
|
||||
if not web_setting:
|
||||
try:
|
||||
web_setting = await self.web.setting()
|
||||
@@ -123,7 +122,7 @@ class BFGMinerGoldshell(BFGMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_fw_ver(self, web_status: dict = None) -> str:
|
||||
async def _get_fw_ver(self, web_status: dict = None) -> str:
|
||||
if not web_status:
|
||||
try:
|
||||
web_status = await self.web.setting()
|
||||
@@ -136,7 +135,7 @@ class BFGMinerGoldshell(BFGMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_hashboards(
|
||||
async def _get_hashboards(
|
||||
self, api_devs: dict = None, api_devdetails: dict = None
|
||||
) -> List[HashBoard]:
|
||||
if not api_devs:
|
||||
@@ -186,8 +185,8 @@ class BFGMinerGoldshell(BFGMiner):
|
||||
|
||||
return hashboards
|
||||
|
||||
async def is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
async def _is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
return None
|
||||
|
||||
async def get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
async def _get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
return None
|
||||
|
||||
@@ -33,36 +33,35 @@ from pyasic.miners.base import (
|
||||
|
||||
BMMINER_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction("get_mac"),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.MAC): DataFunction("_get_mac"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction("get_hostname"),
|
||||
str(DataOptions.HOSTNAME): DataFunction("_get_hostname"),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("get_wattage_limit"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("_get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("_get_wattage_limit"),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("is_mining"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("_get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("_get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("_is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
@@ -156,14 +155,10 @@ class BMMiner(BaseMiner):
|
||||
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
|
||||
##################################################
|
||||
|
||||
async def get_mac(self) -> str:
|
||||
return "00:00:00:00:00:00"
|
||||
|
||||
async def get_api_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
# Check to see if the version info is already cached
|
||||
if self.api_ver:
|
||||
return self.api_ver
|
||||
async def _get_mac(self) -> Optional[str]:
|
||||
return None
|
||||
|
||||
async def _get_api_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
if not api_version:
|
||||
try:
|
||||
api_version = await self.api.version()
|
||||
@@ -178,11 +173,7 @@ class BMMiner(BaseMiner):
|
||||
|
||||
return self.api_ver
|
||||
|
||||
async def get_fw_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
# Check to see if the version info is already cached
|
||||
if self.fw_ver:
|
||||
return self.fw_ver
|
||||
|
||||
async def _get_fw_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
if not api_version:
|
||||
try:
|
||||
api_version = await self.api.version()
|
||||
@@ -197,24 +188,14 @@ class BMMiner(BaseMiner):
|
||||
|
||||
return self.fw_ver
|
||||
|
||||
async def get_version(
|
||||
self, api_version: dict = None
|
||||
) -> Tuple[Optional[str], Optional[str]]:
|
||||
# check if version is cached
|
||||
miner_version = namedtuple("MinerVersion", "api_ver fw_ver")
|
||||
return miner_version(
|
||||
api_ver=await self.get_api_ver(api_version),
|
||||
fw_ver=await self.get_fw_ver(api_version=api_version),
|
||||
)
|
||||
|
||||
async def get_fan_psu(self):
|
||||
async def _get_fan_psu(self):
|
||||
return None
|
||||
|
||||
async def get_hostname(self) -> Optional[str]:
|
||||
async def _get_hostname(self) -> Optional[str]:
|
||||
hn = await self.send_ssh_command("cat /proc/sys/kernel/hostname")
|
||||
return hn
|
||||
|
||||
async def get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
async def _get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
# get hr from API
|
||||
if not api_summary:
|
||||
try:
|
||||
@@ -228,7 +209,7 @@ class BMMiner(BaseMiner):
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
async def _get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
hashboards = []
|
||||
|
||||
if not api_stats:
|
||||
@@ -295,23 +276,23 @@ class BMMiner(BaseMiner):
|
||||
|
||||
return hashboards
|
||||
|
||||
async def get_env_temp(self) -> Optional[float]:
|
||||
async def _get_env_temp(self) -> Optional[float]:
|
||||
return None
|
||||
|
||||
async def get_wattage(self) -> Optional[int]:
|
||||
async def _get_wattage(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_wattage_limit(self) -> Optional[int]:
|
||||
async def _get_wattage_limit(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
async def _get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
fans = [Fan() for _ in range(self.fan_count)]
|
||||
fans = [Fan() for _ in range(self.expected_fans)]
|
||||
if api_stats:
|
||||
try:
|
||||
fan_offset = -1
|
||||
@@ -324,7 +305,7 @@ class BMMiner(BaseMiner):
|
||||
if fan_offset == -1:
|
||||
fan_offset = 1
|
||||
|
||||
for fan in range(self.fan_count):
|
||||
for fan in range(self.expected_fans):
|
||||
fans[fan].speed = api_stats["STATS"][1].get(
|
||||
f"fan{fan_offset+fan}", 0
|
||||
)
|
||||
@@ -333,13 +314,13 @@ class BMMiner(BaseMiner):
|
||||
|
||||
return fans
|
||||
|
||||
async def get_errors(self) -> List[MinerErrorData]:
|
||||
async def _get_errors(self) -> List[MinerErrorData]:
|
||||
return []
|
||||
|
||||
async def get_fault_light(self) -> bool:
|
||||
async def _get_fault_light(self) -> bool:
|
||||
return False
|
||||
|
||||
async def get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
async def _get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
# X19 method, not sure compatibility
|
||||
if not api_stats:
|
||||
try:
|
||||
@@ -363,13 +344,13 @@ class BMMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
async def _is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
return None
|
||||
|
||||
async def get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
async def _get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.web.get_miner_conf()
|
||||
api_stats = await self.api.stats()
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
|
||||
@@ -41,19 +41,18 @@ from pyasic.web.bosminer import BOSMinerWebAPI
|
||||
BOSMINER_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction(
|
||||
"get_mac",
|
||||
"_get_mac",
|
||||
[
|
||||
WebAPICommand(
|
||||
"web_net_conf", "/cgi-bin/luci/admin/network/iface_status/lan"
|
||||
)
|
||||
],
|
||||
),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver",
|
||||
"_get_fw_ver",
|
||||
[
|
||||
GraphQLCommand(
|
||||
"graphql_version", {"bos": {"info": {"version": {"full": None}}}}
|
||||
@@ -61,11 +60,11 @@ BOSMINER_DATA_LOC = DataLocations(
|
||||
],
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction(
|
||||
"get_hostname",
|
||||
"_get_hostname",
|
||||
[GraphQLCommand("graphql_hostname", {"bos": {"hostname": None}})],
|
||||
),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate",
|
||||
"_get_hashrate",
|
||||
[
|
||||
RPCAPICommand("api_summary", "summary"),
|
||||
GraphQLCommand(
|
||||
@@ -79,10 +78,10 @@ BOSMINER_DATA_LOC = DataLocations(
|
||||
],
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_devs", "devs")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_devs", "devs")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards",
|
||||
"_get_hashboards",
|
||||
[
|
||||
RPCAPICommand("api_temps", "temps"),
|
||||
RPCAPICommand("api_devdetails", "devdetails"),
|
||||
@@ -106,9 +105,9 @@ BOSMINER_DATA_LOC = DataLocations(
|
||||
),
|
||||
],
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction(
|
||||
"get_wattage",
|
||||
"_get_wattage",
|
||||
[
|
||||
RPCAPICommand("api_tunerstatus", "tunerstatus"),
|
||||
GraphQLCommand(
|
||||
@@ -124,7 +123,7 @@ BOSMINER_DATA_LOC = DataLocations(
|
||||
],
|
||||
),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction(
|
||||
"get_wattage_limit",
|
||||
"_get_wattage_limit",
|
||||
[
|
||||
RPCAPICommand("api_tunerstatus", "tunerstatus"),
|
||||
GraphQLCommand(
|
||||
@@ -134,7 +133,7 @@ BOSMINER_DATA_LOC = DataLocations(
|
||||
],
|
||||
),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans",
|
||||
"_get_fans",
|
||||
[
|
||||
RPCAPICommand("api_fans", "fans"),
|
||||
GraphQLCommand(
|
||||
@@ -143,9 +142,9 @@ BOSMINER_DATA_LOC = DataLocations(
|
||||
),
|
||||
],
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction(
|
||||
"get_errors",
|
||||
"_get_errors",
|
||||
[
|
||||
RPCAPICommand("api_tunerstatus", "tunerstatus"),
|
||||
GraphQLCommand(
|
||||
@@ -166,14 +165,14 @@ BOSMINER_DATA_LOC = DataLocations(
|
||||
],
|
||||
),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction(
|
||||
"get_fault_light",
|
||||
"_get_fault_light",
|
||||
[GraphQLCommand("graphql_fault_light", {"bos": {"faultLight": None}})],
|
||||
),
|
||||
str(DataOptions.IS_MINING): DataFunction(
|
||||
"is_mining", [RPCAPICommand("api_devdetails", "devdetails")]
|
||||
"_is_mining", [RPCAPICommand("api_devdetails", "devdetails")]
|
||||
),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"get_uptime", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_uptime", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
@@ -189,6 +188,7 @@ class BOSMiner(BaseMiner):
|
||||
|
||||
# static data
|
||||
self.api_type = "BOSMiner"
|
||||
self.fw_str = "BOS"
|
||||
# data gathering locations
|
||||
self.data_locations = BOSMINER_DATA_LOC
|
||||
# autotuning/shutdown support
|
||||
@@ -329,7 +329,7 @@ class BOSMiner(BaseMiner):
|
||||
"format": {
|
||||
"version": "1.2+",
|
||||
"generator": "pyasic",
|
||||
"model": f"{self.make.replace('Miner', 'miner')} {self.model.replace(' (BOS)', '').replace('j', 'J')}",
|
||||
"raw_model": f"{self.make.replace('Miner', 'miner')} {self.raw_model}",
|
||||
"timestamp": int(time.time()),
|
||||
},
|
||||
**config.as_bosminer(user_suffix=user_suffix),
|
||||
@@ -428,7 +428,7 @@ class BOSMiner(BaseMiner):
|
||||
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
|
||||
##################################################
|
||||
|
||||
async def get_mac(self, web_net_conf: Union[dict, list] = None) -> Optional[str]:
|
||||
async def _get_mac(self, web_net_conf: Union[dict, list] = None) -> Optional[str]:
|
||||
if not web_net_conf:
|
||||
try:
|
||||
web_net_conf = await self.web.send_command(
|
||||
@@ -454,8 +454,8 @@ class BOSMiner(BaseMiner):
|
||||
# return result.upper().strip()
|
||||
|
||||
async def get_model(self) -> Optional[str]:
|
||||
if self.model is not None:
|
||||
return self.model + " (BOS)"
|
||||
if self.raw_model is not None:
|
||||
return self.raw_model + " (BOS)"
|
||||
return "? (BOS)"
|
||||
|
||||
async def get_version(
|
||||
@@ -467,7 +467,7 @@ class BOSMiner(BaseMiner):
|
||||
fw_ver = await self.get_fw_ver(graphql_version)
|
||||
return miner_version(api_ver, fw_ver)
|
||||
|
||||
async def get_api_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
async def _get_api_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
if not api_version:
|
||||
try:
|
||||
api_version = await self.api.version()
|
||||
@@ -485,7 +485,7 @@ class BOSMiner(BaseMiner):
|
||||
|
||||
return self.api_ver
|
||||
|
||||
async def get_fw_ver(self, graphql_version: dict = None) -> Optional[str]:
|
||||
async def _get_fw_ver(self, graphql_version: dict = None) -> Optional[str]:
|
||||
if not graphql_version:
|
||||
try:
|
||||
graphql_version = await self.web.send_command(
|
||||
@@ -515,7 +515,7 @@ class BOSMiner(BaseMiner):
|
||||
|
||||
return self.fw_ver
|
||||
|
||||
async def get_hostname(self, graphql_hostname: dict = None) -> Union[str, None]:
|
||||
async def _get_hostname(self, graphql_hostname: dict = None) -> Union[str, None]:
|
||||
hostname = None
|
||||
|
||||
if not graphql_hostname:
|
||||
@@ -544,7 +544,7 @@ class BOSMiner(BaseMiner):
|
||||
logging.warning(f"Failed to get hostname for miner: {self}, {e}")
|
||||
return hostname
|
||||
|
||||
async def get_hashrate(
|
||||
async def _get_hashrate(
|
||||
self, api_summary: dict = None, graphql_hashrate: dict = None
|
||||
) -> Optional[float]:
|
||||
# get hr from graphql
|
||||
@@ -583,7 +583,7 @@ class BOSMiner(BaseMiner):
|
||||
except (KeyError, IndexError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_hashboards(
|
||||
async def _get_hashboards(
|
||||
self,
|
||||
api_temps: dict = None,
|
||||
api_devdetails: dict = None,
|
||||
@@ -714,10 +714,10 @@ class BOSMiner(BaseMiner):
|
||||
|
||||
return hashboards
|
||||
|
||||
async def get_env_temp(self) -> Optional[float]:
|
||||
async def _get_env_temp(self) -> Optional[float]:
|
||||
return None
|
||||
|
||||
async def get_wattage(
|
||||
async def _get_wattage(
|
||||
self, api_tunerstatus: dict = None, graphql_wattage: dict = None
|
||||
) -> Optional[int]:
|
||||
if not graphql_wattage and not api_tunerstatus:
|
||||
@@ -753,7 +753,7 @@ class BOSMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def get_wattage_limit(
|
||||
async def _get_wattage_limit(
|
||||
self, api_tunerstatus: dict = None, graphql_wattage_limit: dict = None
|
||||
) -> Optional[int]:
|
||||
if not graphql_wattage_limit and not api_tunerstatus:
|
||||
@@ -784,7 +784,7 @@ class BOSMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def get_fans(
|
||||
async def _get_fans(
|
||||
self, api_fans: dict = None, graphql_fans: dict = None
|
||||
) -> List[Fan]:
|
||||
if not graphql_fans and not api_fans:
|
||||
@@ -796,7 +796,7 @@ class BOSMiner(BaseMiner):
|
||||
pass
|
||||
if graphql_fans.get("data"):
|
||||
fans = []
|
||||
for n in range(self.fan_count):
|
||||
for n in range(self.expected_fans):
|
||||
try:
|
||||
fans.append(
|
||||
Fan(
|
||||
@@ -817,18 +817,18 @@ class BOSMiner(BaseMiner):
|
||||
|
||||
if api_fans:
|
||||
fans = []
|
||||
for n in range(self.fan_count):
|
||||
for n in range(self.expected_fans):
|
||||
try:
|
||||
fans.append(Fan(api_fans["FANS"][n]["RPM"]))
|
||||
except (IndexError, KeyError):
|
||||
pass
|
||||
return fans
|
||||
return [Fan() for _ in range(self.fan_count)]
|
||||
return [Fan() for _ in range(self.expected_fans)]
|
||||
|
||||
async def get_fan_psu(self) -> Optional[int]:
|
||||
async def _get_fan_psu(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_errors(
|
||||
async def _get_errors(
|
||||
self, api_tunerstatus: dict = None, graphql_errors: dict = None
|
||||
) -> List[MinerErrorData]:
|
||||
if not graphql_errors and not api_tunerstatus:
|
||||
@@ -907,7 +907,7 @@ class BOSMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def get_fault_light(self, graphql_fault_light: dict = None) -> bool:
|
||||
async def _get_fault_light(self, graphql_fault_light: dict = None) -> bool:
|
||||
if self.light:
|
||||
return self.light
|
||||
|
||||
@@ -964,7 +964,7 @@ class BOSMiner(BaseMiner):
|
||||
except (TypeError, AttributeError):
|
||||
return self.light
|
||||
|
||||
async def get_expected_hashrate(self, api_devs: dict = None) -> Optional[float]:
|
||||
async def _get_expected_hashrate(self, api_devs: dict = None) -> Optional[float]:
|
||||
if not api_devs:
|
||||
try:
|
||||
api_devs = await self.api.devs()
|
||||
@@ -990,7 +990,7 @@ class BOSMiner(BaseMiner):
|
||||
except (IndexError, KeyError):
|
||||
pass
|
||||
|
||||
async def is_mining(self, api_devdetails: dict = None) -> Optional[bool]:
|
||||
async def _is_mining(self, api_devdetails: dict = None) -> Optional[bool]:
|
||||
if not api_devdetails:
|
||||
try:
|
||||
api_devdetails = await self.api.send_command(
|
||||
@@ -1005,7 +1005,7 @@ class BOSMiner(BaseMiner):
|
||||
except LookupError:
|
||||
pass
|
||||
|
||||
async def get_uptime(self, api_summary: dict = None) -> Optional[int]:
|
||||
async def _get_uptime(self, api_summary: dict = None) -> Optional[int]:
|
||||
if not api_summary:
|
||||
try:
|
||||
api_summary = await self.api.summary()
|
||||
|
||||
@@ -93,7 +93,7 @@ class BOSMinerOld(BOSMiner):
|
||||
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
|
||||
##################################################
|
||||
|
||||
async def get_mac(self, *args, **kwargs) -> Optional[str]:
|
||||
async def _get_mac(self, *args, **kwargs) -> Optional[str]:
|
||||
return None
|
||||
|
||||
async def get_model(self, *args, **kwargs) -> str:
|
||||
@@ -102,54 +102,54 @@ class BOSMinerOld(BOSMiner):
|
||||
async def get_version(self, *args, **kwargs) -> Tuple[Optional[str], Optional[str]]:
|
||||
return None, None
|
||||
|
||||
async def get_hostname(self, *args, **kwargs) -> Optional[str]:
|
||||
async def _get_hostname(self, *args, **kwargs) -> Optional[str]:
|
||||
return None
|
||||
|
||||
async def get_hashrate(self, *args, **kwargs) -> Optional[float]:
|
||||
async def _get_hashrate(self, *args, **kwargs) -> Optional[float]:
|
||||
return None
|
||||
|
||||
async def get_hashboards(self, *args, **kwargs) -> List[HashBoard]:
|
||||
async def _get_hashboards(self, *args, **kwargs) -> List[HashBoard]:
|
||||
return []
|
||||
|
||||
async def get_env_temp(self, *args, **kwargs) -> Optional[float]:
|
||||
async def _get_env_temp(self, *args, **kwargs) -> Optional[float]:
|
||||
return None
|
||||
|
||||
async def get_wattage(self, *args, **kwargs) -> Optional[int]:
|
||||
async def _get_wattage(self, *args, **kwargs) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_wattage_limit(self, *args, **kwargs) -> Optional[int]:
|
||||
async def _get_wattage_limit(self, *args, **kwargs) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_fans(
|
||||
async def _get_fans(
|
||||
self,
|
||||
*args,
|
||||
**kwargs,
|
||||
) -> List[Fan]:
|
||||
return [Fan(), Fan(), Fan(), Fan()]
|
||||
|
||||
async def get_fan_psu(self, *args, **kwargs) -> Optional[int]:
|
||||
async def _get_fan_psu(self, *args, **kwargs) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_api_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
async def _get_api_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
return None
|
||||
|
||||
async def get_fw_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
async def _get_fw_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
return None
|
||||
|
||||
async def get_errors(self, *args, **kwargs) -> List[MinerErrorData]:
|
||||
async def _get_errors(self, *args, **kwargs) -> List[MinerErrorData]:
|
||||
return []
|
||||
|
||||
async def get_fault_light(self, *args, **kwargs) -> bool:
|
||||
async def _get_fault_light(self, *args, **kwargs) -> bool:
|
||||
return False
|
||||
|
||||
async def get_expected_hashrate(self, *args, **kwargs) -> Optional[float]:
|
||||
async def _get_expected_hashrate(self, *args, **kwargs) -> Optional[float]:
|
||||
return None
|
||||
|
||||
async def get_data(self, allow_warning: bool = False, **kwargs) -> MinerData:
|
||||
return MinerData(ip=str(self.ip))
|
||||
|
||||
async def is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
async def _is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
return None
|
||||
|
||||
async def get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
async def _get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
return None
|
||||
|
||||
@@ -35,70 +35,69 @@ from pyasic.miners.base import (
|
||||
BTMINER_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction(
|
||||
"get_mac",
|
||||
"_get_mac",
|
||||
[
|
||||
RPCAPICommand("api_summary", "summary"),
|
||||
RPCAPICommand("api_get_miner_info", "get_miner_info"),
|
||||
],
|
||||
),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_get_version", "get_version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_get_version", "get_version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver",
|
||||
"_get_fw_ver",
|
||||
[
|
||||
RPCAPICommand("api_get_version", "get_version"),
|
||||
RPCAPICommand("api_summary", "summary"),
|
||||
],
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction(
|
||||
"get_hostname", [RPCAPICommand("api_get_miner_info", "get_miner_info")]
|
||||
"_get_hostname", [RPCAPICommand("api_get_miner_info", "get_miner_info")]
|
||||
),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards", [RPCAPICommand("api_devs", "devs")]
|
||||
"_get_hashboards", [RPCAPICommand("api_devs", "devs")]
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction(
|
||||
"get_env_temp", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_env_temp", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.WATTAGE): DataFunction(
|
||||
"get_wattage", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_wattage", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction(
|
||||
"get_wattage_limit", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_wattage_limit", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans",
|
||||
"_get_fans",
|
||||
[
|
||||
RPCAPICommand("api_summary", "summary"),
|
||||
RPCAPICommand("api_get_psu", "get_psu"),
|
||||
],
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction(
|
||||
"get_fan_psu",
|
||||
"_get_fan_psu",
|
||||
[
|
||||
RPCAPICommand("api_summary", "summary"),
|
||||
RPCAPICommand("api_get_psu", "get_psu"),
|
||||
],
|
||||
),
|
||||
str(DataOptions.ERRORS): DataFunction(
|
||||
"get_errors", [RPCAPICommand("api_get_error_code", "get_error_code")]
|
||||
"_get_errors", [RPCAPICommand("api_get_error_code", "get_error_code")]
|
||||
),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction(
|
||||
"get_fault_light",
|
||||
"_get_fault_light",
|
||||
[RPCAPICommand("api_get_miner_info", "get_miner_info")],
|
||||
),
|
||||
str(DataOptions.IS_MINING): DataFunction(
|
||||
"is_mining", [RPCAPICommand("api_status", "status")]
|
||||
"_is_mining", [RPCAPICommand("api_status", "status")]
|
||||
),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"get_uptime", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_uptime", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
@@ -239,7 +238,7 @@ class BTMiner(BaseMiner):
|
||||
else:
|
||||
cfg = MinerConfig()
|
||||
|
||||
is_mining = await self.is_mining(status)
|
||||
is_mining = await self._is_mining(status)
|
||||
if not is_mining:
|
||||
cfg.mining_mode = MiningModeConfig.sleep()
|
||||
return cfg
|
||||
@@ -283,7 +282,7 @@ class BTMiner(BaseMiner):
|
||||
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
|
||||
##################################################
|
||||
|
||||
async def get_mac(
|
||||
async def _get_mac(
|
||||
self, api_summary: dict = None, api_get_miner_info: dict = None
|
||||
) -> Optional[str]:
|
||||
if not api_get_miner_info:
|
||||
@@ -312,21 +311,7 @@ class BTMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def get_version(
|
||||
self, api_get_version: dict = None, api_summary: dict = None
|
||||
) -> Tuple[Optional[str], Optional[str]]:
|
||||
miner_version = namedtuple("MinerVersion", "api_ver fw_ver")
|
||||
api_ver = await self.get_api_ver(api_get_version=api_get_version)
|
||||
fw_ver = await self.get_fw_ver(
|
||||
api_get_version=api_get_version, api_summary=api_summary
|
||||
)
|
||||
return miner_version(api_ver, fw_ver)
|
||||
|
||||
async def get_api_ver(self, api_get_version: dict = None) -> Optional[str]:
|
||||
# Check to see if the version info is already cached
|
||||
if self.api_ver:
|
||||
return self.api_ver
|
||||
|
||||
async def _get_api_ver(self, api_get_version: dict = None) -> Optional[str]:
|
||||
if not api_get_version:
|
||||
try:
|
||||
api_get_version = await self.api.get_version()
|
||||
@@ -349,13 +334,9 @@ class BTMiner(BaseMiner):
|
||||
|
||||
return self.api_ver
|
||||
|
||||
async def get_fw_ver(
|
||||
async def _get_fw_ver(
|
||||
self, api_get_version: dict = None, api_summary: dict = None
|
||||
) -> Optional[str]:
|
||||
# Check to see if the version info is already cached
|
||||
if self.fw_ver:
|
||||
return self.fw_ver
|
||||
|
||||
if not api_get_version:
|
||||
try:
|
||||
api_get_version = await self.api.get_version()
|
||||
@@ -388,7 +369,7 @@ class BTMiner(BaseMiner):
|
||||
|
||||
return self.fw_ver
|
||||
|
||||
async def get_hostname(self, api_get_miner_info: dict = None) -> Optional[str]:
|
||||
async def _get_hostname(self, api_get_miner_info: dict = None) -> Optional[str]:
|
||||
hostname = None
|
||||
if not api_get_miner_info:
|
||||
try:
|
||||
@@ -404,7 +385,7 @@ class BTMiner(BaseMiner):
|
||||
|
||||
return hostname
|
||||
|
||||
async def get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
async def _get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
# get hr from API
|
||||
if not api_summary:
|
||||
try:
|
||||
@@ -418,7 +399,7 @@ class BTMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def get_hashboards(self, api_devs: dict = None) -> List[HashBoard]:
|
||||
async def _get_hashboards(self, api_devs: dict = None) -> List[HashBoard]:
|
||||
hashboards = [
|
||||
HashBoard(slot=i, expected_chips=self.expected_chips)
|
||||
for i in range(self.expected_hashboards)
|
||||
@@ -453,7 +434,7 @@ class BTMiner(BaseMiner):
|
||||
|
||||
return hashboards
|
||||
|
||||
async def get_env_temp(self, api_summary: dict = None) -> Optional[float]:
|
||||
async def _get_env_temp(self, api_summary: dict = None) -> Optional[float]:
|
||||
if not api_summary:
|
||||
try:
|
||||
api_summary = await self.api.summary()
|
||||
@@ -466,7 +447,7 @@ class BTMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def get_wattage(self, api_summary: dict = None) -> Optional[int]:
|
||||
async def _get_wattage(self, api_summary: dict = None) -> Optional[int]:
|
||||
if not api_summary:
|
||||
try:
|
||||
api_summary = await self.api.summary()
|
||||
@@ -480,7 +461,7 @@ class BTMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def get_wattage_limit(self, api_summary: dict = None) -> Optional[int]:
|
||||
async def _get_wattage_limit(self, api_summary: dict = None) -> Optional[int]:
|
||||
if not api_summary:
|
||||
try:
|
||||
api_summary = await self.api.summary()
|
||||
@@ -493,7 +474,7 @@ class BTMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def get_fans(
|
||||
async def _get_fans(
|
||||
self, api_summary: dict = None, api_get_psu: dict = None
|
||||
) -> List[Fan]:
|
||||
if not api_summary:
|
||||
@@ -502,10 +483,10 @@ class BTMiner(BaseMiner):
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
fans = [Fan() for _ in range(self.fan_count)]
|
||||
fans = [Fan() for _ in range(self.expected_fans)]
|
||||
if api_summary:
|
||||
try:
|
||||
if self.fan_count > 0:
|
||||
if self.expected_fans > 0:
|
||||
fans = [
|
||||
Fan(api_summary["SUMMARY"][0].get("Fan Speed In", 0)),
|
||||
Fan(api_summary["SUMMARY"][0].get("Fan Speed Out", 0)),
|
||||
@@ -515,7 +496,7 @@ class BTMiner(BaseMiner):
|
||||
|
||||
return fans
|
||||
|
||||
async def get_fan_psu(
|
||||
async def _get_fan_psu(
|
||||
self, api_summary: dict = None, api_get_psu: dict = None
|
||||
) -> Optional[int]:
|
||||
if not api_summary:
|
||||
@@ -542,7 +523,7 @@ class BTMiner(BaseMiner):
|
||||
except (KeyError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_errors(
|
||||
async def _get_errors(
|
||||
self, api_summary: dict = None, api_get_error_code: dict = None
|
||||
) -> List[MinerErrorData]:
|
||||
errors = []
|
||||
@@ -577,7 +558,7 @@ class BTMiner(BaseMiner):
|
||||
|
||||
return errors
|
||||
|
||||
async def get_expected_hashrate(self, api_summary: dict = None):
|
||||
async def _get_expected_hashrate(self, api_summary: dict = None):
|
||||
if not api_summary:
|
||||
try:
|
||||
api_summary = await self.api.summary()
|
||||
@@ -592,7 +573,7 @@ class BTMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def get_fault_light(self, api_get_miner_info: dict = None) -> bool:
|
||||
async def _get_fault_light(self, api_get_miner_info: dict = None) -> bool:
|
||||
if not api_get_miner_info:
|
||||
try:
|
||||
api_get_miner_info = await self.api.get_miner_info()
|
||||
@@ -630,7 +611,7 @@ class BTMiner(BaseMiner):
|
||||
async def set_hostname(self, hostname: str):
|
||||
await self.api.set_hostname(hostname)
|
||||
|
||||
async def is_mining(self, api_status: dict = None) -> Optional[bool]:
|
||||
async def _is_mining(self, api_status: dict = None) -> Optional[bool]:
|
||||
if not api_status:
|
||||
try:
|
||||
api_status = await self.api.status()
|
||||
@@ -649,7 +630,7 @@ class BTMiner(BaseMiner):
|
||||
except LookupError:
|
||||
pass
|
||||
|
||||
async def get_uptime(self, api_summary: dict = None) -> Optional[int]:
|
||||
async def _get_uptime(self, api_summary: dict = None) -> Optional[int]:
|
||||
if not api_summary:
|
||||
try:
|
||||
api_summary = await self.api.summary()
|
||||
|
||||
@@ -33,36 +33,35 @@ from pyasic.miners.base import (
|
||||
|
||||
CGMINER_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction("get_mac"),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.MAC): DataFunction("_get_mac"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction("get_hostname"),
|
||||
str(DataOptions.HOSTNAME): DataFunction("_get_hostname"),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("get_wattage_limit"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction("_get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("_get_wattage_limit"),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("is_mining"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("_get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("_get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("_is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
@@ -181,22 +180,10 @@ class CGMiner(BaseMiner):
|
||||
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
|
||||
##################################################
|
||||
|
||||
async def get_mac(self) -> Optional[str]:
|
||||
async def _get_mac(self) -> Optional[str]:
|
||||
return None
|
||||
|
||||
async def get_version(
|
||||
self, api_version: dict = None
|
||||
) -> Tuple[Optional[str], Optional[str]]:
|
||||
miner_version = namedtuple("MinerVersion", "api_ver fw_ver")
|
||||
return miner_version(
|
||||
api_ver=await self.get_api_ver(api_version=api_version),
|
||||
fw_ver=await self.get_fw_ver(api_version=api_version),
|
||||
)
|
||||
|
||||
async def get_api_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
if self.api_ver:
|
||||
return self.api_ver
|
||||
|
||||
async def _get_api_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
if not api_version:
|
||||
try:
|
||||
api_version = await self.api.version()
|
||||
@@ -211,10 +198,7 @@ class CGMiner(BaseMiner):
|
||||
|
||||
return self.api_ver
|
||||
|
||||
async def get_fw_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
if self.fw_ver:
|
||||
return self.fw_ver
|
||||
|
||||
async def _get_fw_ver(self, api_version: dict = None) -> Optional[str]:
|
||||
if not api_version:
|
||||
try:
|
||||
api_version = await self.api.version()
|
||||
@@ -229,11 +213,11 @@ class CGMiner(BaseMiner):
|
||||
|
||||
return self.fw_ver
|
||||
|
||||
async def get_hostname(self) -> Optional[str]:
|
||||
async def _get_hostname(self) -> Optional[str]:
|
||||
hn = await self.send_ssh_command("cat /proc/sys/kernel/hostname")
|
||||
return hn
|
||||
|
||||
async def get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
async def _get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
# get hr from API
|
||||
if not api_summary:
|
||||
try:
|
||||
@@ -249,7 +233,7 @@ class CGMiner(BaseMiner):
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
async def _get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
hashboards = []
|
||||
|
||||
if not api_stats:
|
||||
@@ -303,23 +287,23 @@ class CGMiner(BaseMiner):
|
||||
|
||||
return hashboards
|
||||
|
||||
async def get_env_temp(self) -> Optional[float]:
|
||||
async def _get_env_temp(self) -> Optional[float]:
|
||||
return None
|
||||
|
||||
async def get_wattage(self) -> Optional[int]:
|
||||
async def _get_wattage(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_wattage_limit(self) -> Optional[int]:
|
||||
async def _get_wattage_limit(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
async def _get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
fans = [Fan() for _ in range(self.fan_count)]
|
||||
fans = [Fan() for _ in range(self.expected_fans)]
|
||||
if api_stats:
|
||||
try:
|
||||
fan_offset = -1
|
||||
@@ -332,7 +316,7 @@ class CGMiner(BaseMiner):
|
||||
if fan_offset == -1:
|
||||
fan_offset = 1
|
||||
|
||||
for fan in range(self.fan_count):
|
||||
for fan in range(self.expected_fans):
|
||||
fans[fan].speed = api_stats["STATS"][1].get(
|
||||
f"fan{fan_offset+fan}", 0
|
||||
)
|
||||
@@ -340,16 +324,16 @@ class CGMiner(BaseMiner):
|
||||
pass
|
||||
return fans
|
||||
|
||||
async def get_fan_psu(self) -> Optional[int]:
|
||||
async def _get_fan_psu(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_errors(self) -> List[MinerErrorData]:
|
||||
async def _get_errors(self) -> List[MinerErrorData]:
|
||||
return []
|
||||
|
||||
async def get_fault_light(self) -> bool:
|
||||
async def _get_fault_light(self) -> bool:
|
||||
return False
|
||||
|
||||
async def get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
async def _get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
# X19 method, not sure compatibility
|
||||
if not api_stats:
|
||||
try:
|
||||
@@ -373,10 +357,10 @@ class CGMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
async def _is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
return None
|
||||
|
||||
async def get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
async def _get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
|
||||
@@ -28,44 +28,43 @@ from pyasic.miners.base import DataFunction, DataLocations, DataOptions, RPCAPIC
|
||||
AVALON_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction(
|
||||
"get_mac", [RPCAPICommand("api_version", "version")]
|
||||
"_get_mac", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_fw_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction(
|
||||
"get_hostname", [RPCAPICommand("api_version", "version")]
|
||||
"_get_hostname", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [RPCAPICommand("api_devs", "devs")]
|
||||
"_get_hashrate", [RPCAPICommand("api_devs", "devs")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction(
|
||||
"get_env_temp", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_env_temp", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.WATTAGE): DataFunction("get_wattage"),
|
||||
str(DataOptions.WATTAGE): DataFunction("_get_wattage"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction(
|
||||
"get_wattage_limit", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_wattage_limit", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_fans", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("get_errors"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("_get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction(
|
||||
"get_fault_light", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_fault_light", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.IS_MINING): DataFunction("is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction("get_uptime"),
|
||||
str(DataOptions.IS_MINING): DataFunction("_is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction("_get_uptime"),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
)
|
||||
@@ -176,7 +175,7 @@ class CGMinerAvalon(CGMiner):
|
||||
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
|
||||
##################################################
|
||||
|
||||
async def get_mac(self, api_version: dict = None) -> Optional[str]:
|
||||
async def _get_mac(self, api_version: dict = None) -> Optional[str]:
|
||||
if not api_version:
|
||||
try:
|
||||
api_version = await self.api.version()
|
||||
@@ -194,7 +193,7 @@ class CGMinerAvalon(CGMiner):
|
||||
except (KeyError, ValueError):
|
||||
pass
|
||||
|
||||
async def get_hostname(self, mac: str = None) -> Optional[str]:
|
||||
async def _get_hostname(self, mac: str = None) -> Optional[str]:
|
||||
return None
|
||||
# if not mac:
|
||||
# mac = await self.get_mac()
|
||||
@@ -202,7 +201,7 @@ class CGMinerAvalon(CGMiner):
|
||||
# if mac:
|
||||
# return f"Avalon{mac.replace(':', '')[-6:]}"
|
||||
|
||||
async def get_hashrate(self, api_devs: dict = None) -> Optional[float]:
|
||||
async def _get_hashrate(self, api_devs: dict = None) -> Optional[float]:
|
||||
if not api_devs:
|
||||
try:
|
||||
api_devs = await self.api.devs()
|
||||
@@ -215,7 +214,7 @@ class CGMinerAvalon(CGMiner):
|
||||
except (KeyError, IndexError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
async def _get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
hashboards = [
|
||||
HashBoard(slot=i, expected_chips=self.expected_chips)
|
||||
for i in range(self.expected_hashboards)
|
||||
@@ -263,7 +262,7 @@ class CGMinerAvalon(CGMiner):
|
||||
|
||||
return hashboards
|
||||
|
||||
async def get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
async def _get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
@@ -278,7 +277,7 @@ class CGMinerAvalon(CGMiner):
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_env_temp(self, api_stats: dict = None) -> Optional[float]:
|
||||
async def _get_env_temp(self, api_stats: dict = None) -> Optional[float]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
@@ -293,10 +292,10 @@ class CGMinerAvalon(CGMiner):
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_wattage(self) -> Optional[int]:
|
||||
async def _get_wattage(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_wattage_limit(self, api_stats: dict = None) -> Optional[int]:
|
||||
async def _get_wattage_limit(self, api_stats: dict = None) -> Optional[int]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
@@ -311,14 +310,14 @@ class CGMinerAvalon(CGMiner):
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
async def _get_fans(self, api_stats: dict = None) -> List[Fan]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
fans_data = [Fan() for _ in range(self.fan_count)]
|
||||
fans_data = [Fan() for _ in range(self.expected_fans)]
|
||||
if api_stats:
|
||||
try:
|
||||
unparsed_stats = api_stats["STATS"][0]["MM ID0"]
|
||||
@@ -326,17 +325,17 @@ class CGMinerAvalon(CGMiner):
|
||||
except LookupError:
|
||||
return fans_data
|
||||
|
||||
for fan in range(self.fan_count):
|
||||
for fan in range(self.expected_fans):
|
||||
try:
|
||||
fans_data[fan].speed = int(parsed_stats[f"Fan{fan + 1}"])
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
pass
|
||||
return fans_data
|
||||
|
||||
async def get_errors(self) -> List[MinerErrorData]:
|
||||
async def _get_errors(self) -> List[MinerErrorData]:
|
||||
return []
|
||||
|
||||
async def get_fault_light(self, api_stats: dict = None) -> bool: # noqa
|
||||
async def _get_fault_light(self, api_stats: dict = None) -> bool: # noqa
|
||||
if self.light:
|
||||
return self.light
|
||||
if not api_stats:
|
||||
@@ -365,5 +364,5 @@ class CGMinerAvalon(CGMiner):
|
||||
pass
|
||||
return False
|
||||
|
||||
async def is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
async def _is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
return None
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
from pyasic import MinerConfig
|
||||
from pyasic.config import MinerConfig, MiningModeConfig
|
||||
from pyasic.data import Fan, HashBoard
|
||||
from pyasic.data.error_codes import MinerErrorData, X19Error
|
||||
from pyasic.config import MinerConfig, MiningModeConfig
|
||||
from pyasic.errors import APIError
|
||||
from pyasic.logger import logger
|
||||
from pyasic.miners.base import (
|
||||
@@ -34,47 +34,46 @@ from pyasic.web.epic import ePICWebAPI
|
||||
EPIC_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction(
|
||||
"get_mac", [WebAPICommand("web_network", "network")]
|
||||
"_get_mac", [WebAPICommand("web_network", "network")]
|
||||
),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.API_VERSION): DataFunction("get_api_ver"),
|
||||
str(DataOptions.API_VERSION): DataFunction("_get_api_ver"),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_fw_ver", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction(
|
||||
"get_hostname", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_hostname", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_hashrate", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_expected_hashrate", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards",
|
||||
"_get_hashboards",
|
||||
[
|
||||
WebAPICommand("web_summary", "summary"),
|
||||
WebAPICommand("web_hashrate", "hashrate"),
|
||||
],
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction(
|
||||
"get_wattage", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_wattage", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("get_wattage_limit"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("_get_wattage_limit"),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_fans", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction(
|
||||
"get_errors", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_errors", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction(
|
||||
"get_fault_light", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_fault_light", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.IS_MINING): DataFunction("is_mining"),
|
||||
str(DataOptions.IS_MINING): DataFunction("_is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"get_uptime", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_uptime", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
@@ -89,14 +88,10 @@ class ePIC(BaseMiner):
|
||||
|
||||
# static data
|
||||
self.api_type = "ePIC"
|
||||
self.fw_str = "ePIC"
|
||||
# data gathering locations
|
||||
self.data_locations = EPIC_DATA_LOC
|
||||
|
||||
async def get_model(self) -> Optional[str]:
|
||||
if self.model is not None:
|
||||
return self.model + " (ePIC)"
|
||||
return "? (ePIC)"
|
||||
|
||||
async def get_config(self) -> MinerConfig:
|
||||
summary = None
|
||||
try:
|
||||
@@ -150,7 +145,7 @@ class ePIC(BaseMiner):
|
||||
pass
|
||||
return False
|
||||
|
||||
async def get_mac(self, web_network: dict = None) -> str:
|
||||
async def _get_mac(self, web_network: dict = None) -> str:
|
||||
if not web_network:
|
||||
web_network = await self.web.network()
|
||||
if web_network:
|
||||
@@ -161,7 +156,7 @@ class ePIC(BaseMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_hostname(self, web_summary: dict = None) -> str:
|
||||
async def _get_hostname(self, web_summary: dict = None) -> str:
|
||||
if not web_summary:
|
||||
web_summary = await self.web.summary()
|
||||
if web_summary:
|
||||
@@ -171,7 +166,7 @@ class ePIC(BaseMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_wattage(self, web_summary: dict = None) -> Optional[int]:
|
||||
async def _get_wattage(self, web_summary: dict = None) -> Optional[int]:
|
||||
if not web_summary:
|
||||
web_summary = await self.web.summary()
|
||||
|
||||
@@ -183,7 +178,7 @@ class ePIC(BaseMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_hashrate(self, web_summary: dict = None) -> Optional[float]:
|
||||
async def _get_hashrate(self, web_summary: dict = None) -> Optional[float]:
|
||||
# get hr from API
|
||||
if not web_summary:
|
||||
try:
|
||||
@@ -202,7 +197,7 @@ class ePIC(BaseMiner):
|
||||
logger.error(e)
|
||||
pass
|
||||
|
||||
async def get_expected_hashrate(self, web_summary: dict = None) -> Optional[float]:
|
||||
async def _get_expected_hashrate(self, web_summary: dict = None) -> Optional[float]:
|
||||
# get hr from API
|
||||
if not web_summary:
|
||||
try:
|
||||
@@ -226,7 +221,7 @@ class ePIC(BaseMiner):
|
||||
logger.error(e)
|
||||
pass
|
||||
|
||||
async def get_fw_ver(self, web_summary: dict = None) -> Optional[str]:
|
||||
async def _get_fw_ver(self, web_summary: dict = None) -> Optional[str]:
|
||||
if not web_summary:
|
||||
web_summary = await self.web.summary()
|
||||
|
||||
@@ -238,7 +233,7 @@ class ePIC(BaseMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_fans(self, web_summary: dict = None) -> List[Fan]:
|
||||
async def _get_fans(self, web_summary: dict = None) -> List[Fan]:
|
||||
if not web_summary:
|
||||
try:
|
||||
web_summary = await self.web.summary()
|
||||
@@ -255,7 +250,7 @@ class ePIC(BaseMiner):
|
||||
fans.append(Fan())
|
||||
return fans
|
||||
|
||||
async def get_hashboards(
|
||||
async def _get_hashboards(
|
||||
self, web_summary: dict = None, web_hashrate: dict = None
|
||||
) -> List[HashBoard]:
|
||||
if not web_summary:
|
||||
@@ -286,10 +281,10 @@ class ePIC(BaseMiner):
|
||||
hb_list[hr["Index"]].temp = hb["Temperature"]
|
||||
return hb_list
|
||||
|
||||
async def is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
async def _is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
return None
|
||||
|
||||
async def get_uptime(self, web_summary: dict = None) -> Optional[int]:
|
||||
async def _get_uptime(self, web_summary: dict = None) -> Optional[int]:
|
||||
if not web_summary:
|
||||
web_summary = await self.web.summary()
|
||||
if web_summary:
|
||||
@@ -300,7 +295,7 @@ class ePIC(BaseMiner):
|
||||
pass
|
||||
return None
|
||||
|
||||
async def get_fault_light(self, web_summary: dict = None) -> bool:
|
||||
async def _get_fault_light(self, web_summary: dict = None) -> bool:
|
||||
if not web_summary:
|
||||
web_summary = await self.web.summary()
|
||||
if web_summary:
|
||||
@@ -311,7 +306,7 @@ class ePIC(BaseMiner):
|
||||
pass
|
||||
return False
|
||||
|
||||
async def get_errors(self, web_summary: dict = None) -> List[MinerErrorData]:
|
||||
async def _get_errors(self, web_summary: dict = None) -> List[MinerErrorData]:
|
||||
if not web_summary:
|
||||
web_summary = await self.web.summary()
|
||||
errors = []
|
||||
@@ -331,22 +326,19 @@ class ePIC(BaseMiner):
|
||||
def fault_light_on(self) -> bool:
|
||||
return False
|
||||
|
||||
def get_api_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
def _get_api_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
pass
|
||||
|
||||
def get_config(self) -> MinerConfig:
|
||||
return self.config
|
||||
|
||||
def get_env_temp(self, *args, **kwargs) -> Optional[float]:
|
||||
def _get_env_temp(self, *args, **kwargs) -> Optional[float]:
|
||||
pass
|
||||
|
||||
def get_fan_psu(self, *args, **kwargs) -> Optional[int]:
|
||||
def _get_fan_psu(self, *args, **kwargs) -> Optional[int]:
|
||||
pass
|
||||
|
||||
def get_version(self, *args, **kwargs) -> Tuple[Optional[str], Optional[str]]:
|
||||
pass
|
||||
|
||||
def get_wattage_limit(self, *args, **kwargs) -> Optional[int]:
|
||||
def _get_wattage_limit(self, *args, **kwargs) -> Optional[int]:
|
||||
pass
|
||||
|
||||
def send_config(self, config: MinerConfig, user_suffix: str = None) -> None:
|
||||
|
||||
@@ -24,8 +24,4 @@ class Hiveon(BMMiner):
|
||||
super().__init__(ip, api_ver)
|
||||
# static data
|
||||
self.api_type = "Hiveon"
|
||||
|
||||
async def get_model(self) -> Optional[str]:
|
||||
if self.model is not None:
|
||||
return self.model + " (Hiveon)"
|
||||
return "? (Hiveon)"
|
||||
self.fw_str = "Hive"
|
||||
|
||||
@@ -39,35 +39,34 @@ from pyasic.web.bosminer import BOSMinerWebAPI
|
||||
LUXMINER_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction(
|
||||
"get_mac", [RPCAPICommand("api_config", "config")]
|
||||
"_get_mac", [RPCAPICommand("api_config", "config")]
|
||||
),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.API_VERSION): DataFunction("get_api_ver"),
|
||||
str(DataOptions.FW_VERSION): DataFunction("get_fw_ver"),
|
||||
str(DataOptions.HOSTNAME): DataFunction("get_hostname"),
|
||||
str(DataOptions.API_VERSION): DataFunction("_get_api_ver"),
|
||||
str(DataOptions.FW_VERSION): DataFunction("_get_fw_ver"),
|
||||
str(DataOptions.HOSTNAME): DataFunction("_get_hostname"),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
"_get_hashrate", [RPCAPICommand("api_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction(
|
||||
"get_wattage", [RPCAPICommand("api_power", "power")]
|
||||
"_get_wattage", [RPCAPICommand("api_power", "power")]
|
||||
),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("get_wattage_limit"),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction("_get_wattage_limit"),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [RPCAPICommand("api_fans", "fans")]
|
||||
"_get_fans", [RPCAPICommand("api_fans", "fans")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("is_mining"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("_get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("_get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("_is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_uptime", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
@@ -83,6 +82,7 @@ class LUXMiner(BaseMiner):
|
||||
|
||||
# static data
|
||||
self.api_type = "LUXMiner"
|
||||
self.fw_str = "LuxOS"
|
||||
# data gathering locations
|
||||
self.data_locations = LUXMINER_DATA_LOC
|
||||
# autotuning/shutdown support
|
||||
@@ -181,7 +181,7 @@ class LUXMiner(BaseMiner):
|
||||
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
|
||||
##################################################
|
||||
|
||||
async def get_mac(self, api_config: dict = None) -> Optional[str]:
|
||||
async def _get_mac(self, api_config: dict = None) -> Optional[str]:
|
||||
mac = None
|
||||
if not api_config:
|
||||
try:
|
||||
@@ -197,24 +197,19 @@ class LUXMiner(BaseMiner):
|
||||
|
||||
return mac
|
||||
|
||||
async def get_model(self) -> Optional[str]:
|
||||
if self.model is not None:
|
||||
return self.model + " (LuxOS)"
|
||||
return "? (LuxOS)"
|
||||
|
||||
async def get_version(self) -> Tuple[Optional[str], Optional[str]]:
|
||||
pass
|
||||
|
||||
async def get_api_ver(self) -> Optional[str]:
|
||||
async def _get_api_ver(self) -> Optional[str]:
|
||||
pass
|
||||
|
||||
async def get_fw_ver(self) -> Optional[str]:
|
||||
async def _get_fw_ver(self) -> Optional[str]:
|
||||
pass
|
||||
|
||||
async def get_hostname(self) -> Union[str, None]:
|
||||
async def _get_hostname(self) -> Union[str, None]:
|
||||
pass
|
||||
|
||||
async def get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
async def _get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
if not api_summary:
|
||||
try:
|
||||
api_summary = await self.api.summary()
|
||||
@@ -227,7 +222,7 @@ class LUXMiner(BaseMiner):
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
async def _get_hashboards(self, api_stats: dict = None) -> List[HashBoard]:
|
||||
hashboards = []
|
||||
|
||||
if not api_stats:
|
||||
@@ -281,10 +276,10 @@ class LUXMiner(BaseMiner):
|
||||
|
||||
return hashboards
|
||||
|
||||
async def get_env_temp(self) -> Optional[float]:
|
||||
async def _get_env_temp(self) -> Optional[float]:
|
||||
return None
|
||||
|
||||
async def get_wattage(self, api_power: dict) -> Optional[int]:
|
||||
async def _get_wattage(self, api_power: dict) -> Optional[int]:
|
||||
if not api_power:
|
||||
try:
|
||||
api_power = await self.api.power()
|
||||
@@ -297,10 +292,10 @@ class LUXMiner(BaseMiner):
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_wattage_limit(self) -> Optional[int]:
|
||||
async def _get_wattage_limit(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_fans(self, api_fans: dict = None) -> List[Fan]:
|
||||
async def _get_fans(self, api_fans: dict = None) -> List[Fan]:
|
||||
if not api_fans:
|
||||
try:
|
||||
api_fans = await self.api.fans()
|
||||
@@ -310,23 +305,23 @@ class LUXMiner(BaseMiner):
|
||||
fans = []
|
||||
|
||||
if api_fans:
|
||||
for fan in range(self.fan_count):
|
||||
for fan in range(self.expected_fans):
|
||||
try:
|
||||
fans.append(Fan(api_fans["FANS"][0]["RPM"]))
|
||||
except (IndexError, KeyError, ValueError, TypeError):
|
||||
fans.append(Fan())
|
||||
return fans
|
||||
|
||||
async def get_fan_psu(self) -> Optional[int]:
|
||||
async def _get_fan_psu(self) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_errors(self) -> List[MinerErrorData]:
|
||||
async def _get_errors(self) -> List[MinerErrorData]:
|
||||
pass
|
||||
|
||||
async def get_fault_light(self) -> bool:
|
||||
async def _get_fault_light(self) -> bool:
|
||||
pass
|
||||
|
||||
async def get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
async def _get_expected_hashrate(self, api_stats: dict = None) -> Optional[float]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
@@ -349,10 +344,10 @@ class LUXMiner(BaseMiner):
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
|
||||
async def is_mining(self) -> Optional[bool]:
|
||||
async def _is_mining(self) -> Optional[bool]:
|
||||
pass
|
||||
|
||||
async def get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
async def _get_uptime(self, api_stats: dict = None) -> Optional[int]:
|
||||
if not api_stats:
|
||||
try:
|
||||
api_stats = await self.api.stats()
|
||||
|
||||
@@ -32,42 +32,41 @@ from pyasic.web.vnish import VNishWebAPI
|
||||
VNISH_DATA_LOC = DataLocations(
|
||||
**{
|
||||
str(DataOptions.MAC): DataFunction(
|
||||
"get_mac", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_mac", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.MODEL): DataFunction("get_model"),
|
||||
str(DataOptions.API_VERSION): DataFunction(
|
||||
"get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
"_get_api_ver", [RPCAPICommand("api_version", "version")]
|
||||
),
|
||||
str(DataOptions.FW_VERSION): DataFunction(
|
||||
"get_fw_ver", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_fw_ver", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.HOSTNAME): DataFunction(
|
||||
"get_hostname", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_hostname", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.HASHRATE): DataFunction(
|
||||
"get_hashrate", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_hashrate", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.EXPECTED_HASHRATE): DataFunction(
|
||||
"get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_expected_hashrate", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.HASHBOARDS): DataFunction(
|
||||
"get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
"_get_hashboards", [RPCAPICommand("api_stats", "stats")]
|
||||
),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("get_env_temp"),
|
||||
str(DataOptions.ENVIRONMENT_TEMP): DataFunction("_get_env_temp"),
|
||||
str(DataOptions.WATTAGE): DataFunction(
|
||||
"get_wattage", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_wattage", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.WATTAGE_LIMIT): DataFunction(
|
||||
"get_wattage_limit", [WebAPICommand("web_settings", "settings")]
|
||||
"_get_wattage_limit", [WebAPICommand("web_settings", "settings")]
|
||||
),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"get_fans", [WebAPICommand("web_summary", "summary")]
|
||||
"_get_fans", [WebAPICommand("web_summary", "summary")]
|
||||
),
|
||||
str(DataOptions.FAN_PSU): DataFunction("get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction("get_uptime"),
|
||||
str(DataOptions.FAN_PSU): DataFunction("_get_fan_psu"),
|
||||
str(DataOptions.ERRORS): DataFunction("_get_errors"),
|
||||
str(DataOptions.FAULT_LIGHT): DataFunction("_get_fault_light"),
|
||||
str(DataOptions.IS_MINING): DataFunction("_is_mining"),
|
||||
str(DataOptions.UPTIME): DataFunction("_get_uptime"),
|
||||
str(DataOptions.CONFIG): DataFunction("get_config"),
|
||||
}
|
||||
)
|
||||
@@ -81,14 +80,10 @@ class VNish(BMMiner):
|
||||
|
||||
# static data
|
||||
self.api_type = "VNish"
|
||||
self.fw_str = "VNish"
|
||||
# data gathering locations
|
||||
self.data_locations = VNISH_DATA_LOC
|
||||
|
||||
async def get_model(self) -> Optional[str]:
|
||||
if self.model is not None:
|
||||
return self.model + " (VNish)"
|
||||
return "? (VNish)"
|
||||
|
||||
async def restart_backend(self) -> bool:
|
||||
data = await self.web.restart_vnish()
|
||||
if data:
|
||||
@@ -125,7 +120,7 @@ class VNish(BMMiner):
|
||||
pass
|
||||
return False
|
||||
|
||||
async def get_mac(self, web_summary: dict = None) -> str:
|
||||
async def _get_mac(self, web_summary: dict = None) -> str:
|
||||
if not web_summary:
|
||||
web_info = await self.web.info()
|
||||
|
||||
@@ -143,7 +138,7 @@ class VNish(BMMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_hostname(self, web_summary: dict = None) -> str:
|
||||
async def _get_hostname(self, web_summary: dict = None) -> str:
|
||||
if not web_summary:
|
||||
web_info = await self.web.info()
|
||||
|
||||
@@ -161,7 +156,7 @@ class VNish(BMMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_wattage(self, web_summary: dict = None) -> Optional[int]:
|
||||
async def _get_wattage(self, web_summary: dict = None) -> Optional[int]:
|
||||
if not web_summary:
|
||||
web_summary = await self.web.summary()
|
||||
|
||||
@@ -173,7 +168,7 @@ class VNish(BMMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
async def _get_hashrate(self, api_summary: dict = None) -> Optional[float]:
|
||||
# get hr from API
|
||||
if not api_summary:
|
||||
try:
|
||||
@@ -190,7 +185,7 @@ class VNish(BMMiner):
|
||||
logger.error(e)
|
||||
pass
|
||||
|
||||
async def get_wattage_limit(self, web_settings: dict = None) -> Optional[int]:
|
||||
async def _get_wattage_limit(self, web_settings: dict = None) -> Optional[int]:
|
||||
if not web_settings:
|
||||
web_settings = await self.web.summary()
|
||||
|
||||
@@ -203,7 +198,7 @@ class VNish(BMMiner):
|
||||
except (KeyError, TypeError):
|
||||
pass
|
||||
|
||||
async def get_fw_ver(self, web_summary: dict = None) -> Optional[str]:
|
||||
async def _get_fw_ver(self, web_summary: dict = None) -> Optional[str]:
|
||||
if not web_summary:
|
||||
web_summary = await self.web.summary()
|
||||
|
||||
@@ -215,10 +210,10 @@ class VNish(BMMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
async def _is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
return None
|
||||
|
||||
async def get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
async def _get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
return None
|
||||
|
||||
async def get_config(self) -> MinerConfig:
|
||||
|
||||
@@ -31,7 +31,6 @@ from pyasic.logger import logger
|
||||
|
||||
class DataOptions(Enum):
|
||||
MAC = "mac"
|
||||
MODEL = "model"
|
||||
API_VERSION = "api_ver"
|
||||
FW_VERSION = "fw_ver"
|
||||
HOSTNAME = "hostname"
|
||||
@@ -106,11 +105,12 @@ class BaseMiner(ABC):
|
||||
self.api_type = None
|
||||
# type
|
||||
self.make = None
|
||||
self.model = None
|
||||
self.raw_model = None
|
||||
self.fw_str = None
|
||||
# physical attributes
|
||||
self.expected_hashboards = 3
|
||||
self.expected_chips = 0
|
||||
self.fan_count = 2
|
||||
self.expected_fans = 2
|
||||
# data gathering locations
|
||||
self.data_locations: DataLocations = None
|
||||
# autotuning/shutdown support
|
||||
@@ -140,6 +140,13 @@ class BaseMiner(ABC):
|
||||
def __eq__(self, other):
|
||||
return ipaddress.ip_address(self.ip) == ipaddress.ip_address(other.ip)
|
||||
|
||||
@property
|
||||
def model(self):
|
||||
model_data = [self.raw_model]
|
||||
if self.fw_str is not None:
|
||||
model_data.append(f"({self.fw_str})")
|
||||
return " ".join(model_data)
|
||||
|
||||
@property
|
||||
def pwd(self): # noqa - Skip PyCharm inspection
|
||||
data = []
|
||||
@@ -309,14 +316,13 @@ class BaseMiner(ABC):
|
||||
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
|
||||
##################################################
|
||||
|
||||
@abstractmethod
|
||||
async def get_mac(self, *args, **kwargs) -> Optional[str]:
|
||||
async def get_mac(self) -> Optional[str]:
|
||||
"""Get the MAC address of the miner and return it as a string.
|
||||
|
||||
Returns:
|
||||
A string representing the MAC address of the miner.
|
||||
"""
|
||||
pass
|
||||
return await self._get_mac()
|
||||
|
||||
async def get_model(self) -> Optional[str]:
|
||||
"""Get the model of the miner and return it as a string.
|
||||
@@ -326,148 +332,198 @@ class BaseMiner(ABC):
|
||||
"""
|
||||
return self.model
|
||||
|
||||
@abstractmethod
|
||||
async def get_api_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
async def get_api_ver(self) -> Optional[str]:
|
||||
"""Get the API version of the miner and is as a string.
|
||||
|
||||
Returns:
|
||||
API version as a string.
|
||||
"""
|
||||
pass
|
||||
return await self._get_api_ver()
|
||||
|
||||
@abstractmethod
|
||||
async def get_fw_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
async def get_fw_ver(self) -> Optional[str]:
|
||||
"""Get the firmware version of the miner and is as a string.
|
||||
|
||||
Returns:
|
||||
Firmware version as a string.
|
||||
"""
|
||||
pass
|
||||
return await self._get_fw_ver()
|
||||
|
||||
@abstractmethod
|
||||
async def get_version(self, *args, **kwargs) -> Tuple[Optional[str], Optional[str]]:
|
||||
async def get_version(self) -> Tuple[Optional[str], Optional[str]]:
|
||||
"""Get the API version and firmware version of the miner and return them as strings.
|
||||
|
||||
Returns:
|
||||
A tuple of (API version, firmware version) as strings.
|
||||
"""
|
||||
pass
|
||||
api_ver = await self.get_api_ver()
|
||||
fw_ver = await self.get_fw_ver()
|
||||
return api_ver, fw_ver
|
||||
|
||||
@abstractmethod
|
||||
async def get_hostname(self, *args, **kwargs) -> Optional[str]:
|
||||
async def get_hostname(self) -> Optional[str]:
|
||||
"""Get the hostname of the miner and return it as a string.
|
||||
|
||||
Returns:
|
||||
A string representing the hostname of the miner.
|
||||
"""
|
||||
pass
|
||||
return await self._get_hostname()
|
||||
|
||||
@abstractmethod
|
||||
async def get_hashrate(self, *args, **kwargs) -> Optional[float]:
|
||||
async def get_hashrate(self) -> Optional[float]:
|
||||
"""Get the hashrate of the miner and return it as a float in TH/s.
|
||||
|
||||
Returns:
|
||||
Hashrate of the miner in TH/s as a float.
|
||||
"""
|
||||
pass
|
||||
return await self._get_hashrate()
|
||||
|
||||
@abstractmethod
|
||||
async def get_hashboards(self, *args, **kwargs) -> List[HashBoard]:
|
||||
async def get_hashboards(self) -> List[HashBoard]:
|
||||
"""Get hashboard data from the miner in the form of [`HashBoard`][pyasic.data.HashBoard].
|
||||
|
||||
Returns:
|
||||
A [`HashBoard`][pyasic.data.HashBoard] instance containing hashboard data from the miner.
|
||||
"""
|
||||
pass
|
||||
return await self._get_hashboards()
|
||||
|
||||
@abstractmethod
|
||||
async def get_env_temp(self, *args, **kwargs) -> Optional[float]:
|
||||
async def get_env_temp(self) -> Optional[float]:
|
||||
"""Get environment temp from the miner as a float.
|
||||
|
||||
Returns:
|
||||
Environment temp of the miner as a float.
|
||||
"""
|
||||
pass
|
||||
return await self._get_env_temp()
|
||||
|
||||
@abstractmethod
|
||||
async def get_wattage(self, *args, **kwargs) -> Optional[int]:
|
||||
async def get_wattage(self) -> Optional[int]:
|
||||
"""Get wattage from the miner as an int.
|
||||
|
||||
Returns:
|
||||
Wattage of the miner as an int.
|
||||
"""
|
||||
pass
|
||||
return await self._get_wattage()
|
||||
|
||||
@abstractmethod
|
||||
async def get_wattage_limit(self, *args, **kwargs) -> Optional[int]:
|
||||
async def get_wattage_limit(self) -> Optional[int]:
|
||||
"""Get wattage limit from the miner as an int.
|
||||
|
||||
Returns:
|
||||
Wattage limit of the miner as an int.
|
||||
"""
|
||||
pass
|
||||
return await self._get_wattage_limit()
|
||||
|
||||
@abstractmethod
|
||||
async def get_fans(self, *args, **kwargs) -> List[Fan]:
|
||||
async def get_fans(self) -> List[Fan]:
|
||||
"""Get fan data from the miner in the form [fan_1, fan_2, fan_3, fan_4].
|
||||
|
||||
Returns:
|
||||
A list of fan data.
|
||||
"""
|
||||
pass
|
||||
return await self._get_fans()
|
||||
|
||||
@abstractmethod
|
||||
async def get_fan_psu(self, *args, **kwargs) -> Optional[int]:
|
||||
async def get_fan_psu(self) -> Optional[int]:
|
||||
"""Get PSU fan speed from the miner.
|
||||
|
||||
Returns:
|
||||
PSU fan speed.
|
||||
"""
|
||||
pass
|
||||
return await self._get_fan_psu()
|
||||
|
||||
@abstractmethod
|
||||
async def get_errors(self, *args, **kwargs) -> List[MinerErrorData]:
|
||||
async def get_errors(self) -> List[MinerErrorData]:
|
||||
"""Get a list of the errors the miner is experiencing.
|
||||
|
||||
Returns:
|
||||
A list of error classes representing different errors.
|
||||
"""
|
||||
pass
|
||||
return await self._get_errors()
|
||||
|
||||
@abstractmethod
|
||||
async def get_fault_light(self, *args, **kwargs) -> bool:
|
||||
async def get_fault_light(self) -> bool:
|
||||
"""Check the status of the fault light and return on or off as a boolean.
|
||||
|
||||
Returns:
|
||||
A boolean value where `True` represents on and `False` represents off.
|
||||
"""
|
||||
pass
|
||||
return await self._get_fault_light()
|
||||
|
||||
@abstractmethod
|
||||
async def get_expected_hashrate(self, *args, **kwargs) -> Optional[float]:
|
||||
async def get_expected_hashrate(self) -> Optional[float]:
|
||||
"""Get the nominal hashrate from factory if available.
|
||||
|
||||
Returns:
|
||||
A float value of nominal hashrate in TH/s.
|
||||
"""
|
||||
pass
|
||||
return await self._get_expected_hashrate()
|
||||
|
||||
@abstractmethod
|
||||
async def is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
async def is_mining(self) -> Optional[bool]:
|
||||
"""Check whether the miner is mining.
|
||||
|
||||
Returns:
|
||||
A boolean value representing if the miner is mining.
|
||||
"""
|
||||
pass
|
||||
return await self._is_mining()
|
||||
|
||||
@abstractmethod
|
||||
async def get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
async def get_uptime(self) -> Optional[int]:
|
||||
"""Get the uptime of the miner in seconds.
|
||||
|
||||
Returns:
|
||||
The uptime of the miner in seconds.
|
||||
"""
|
||||
return await self._get_uptime()
|
||||
|
||||
@abstractmethod
|
||||
async def _get_mac(self, *args, **kwargs) -> Optional[str]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_api_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_fw_ver(self, *args, **kwargs) -> Optional[str]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_hostname(self, *args, **kwargs) -> Optional[str]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_hashrate(self, *args, **kwargs) -> Optional[float]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_hashboards(self, *args, **kwargs) -> List[HashBoard]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_env_temp(self, *args, **kwargs) -> Optional[float]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_wattage(self, *args, **kwargs) -> Optional[int]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_wattage_limit(self, *args, **kwargs) -> Optional[int]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_fans(self, *args, **kwargs) -> List[Fan]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_fan_psu(self, *args, **kwargs) -> Optional[int]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_errors(self, *args, **kwargs) -> List[MinerErrorData]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_fault_light(self, *args, **kwargs) -> bool:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_expected_hashrate(self, *args, **kwargs) -> Optional[float]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _is_mining(self, *args, **kwargs) -> Optional[bool]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def _get_uptime(self, *args, **kwargs) -> Optional[int]:
|
||||
pass
|
||||
|
||||
async def _get_data(
|
||||
@@ -571,6 +627,7 @@ class BaseMiner(ABC):
|
||||
data = MinerData(
|
||||
ip=str(self.ip),
|
||||
make=self.make,
|
||||
model=self.model,
|
||||
expected_chips=self.expected_chips * self.expected_hashboards,
|
||||
expected_hashboards=self.expected_hashboards,
|
||||
hashboards=[
|
||||
|
||||
@@ -254,7 +254,7 @@ class CGMinerA10X(CGMiner, A10X):
|
||||
else:
|
||||
web_get_all = web_get_all["all"]
|
||||
|
||||
fans = [Fan() for _ in range(self.fan_count)]
|
||||
fans = [Fan() for _ in range(self.expected_fans)]
|
||||
if web_get_all:
|
||||
try:
|
||||
spd = web_get_all["fansSpeed"]
|
||||
@@ -262,7 +262,7 @@ class CGMinerA10X(CGMiner, A10X):
|
||||
pass
|
||||
else:
|
||||
round((int(spd) * 6000) / 100)
|
||||
for i in range(self.fan_count):
|
||||
for i in range(self.expected_fans):
|
||||
fans[i].speed = spd
|
||||
|
||||
return fans
|
||||
|
||||
@@ -21,6 +21,6 @@ class Z15(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Z15"
|
||||
self.raw_model = "Z15"
|
||||
self.expected_chips = 3
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -21,7 +21,7 @@ class S17(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S17"
|
||||
self.raw_model = "S17"
|
||||
self.expected_chips = 48
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -29,7 +29,7 @@ class S17(AntMiner): # noqa - ignore ABC method implementation
|
||||
class S17Plus(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.model = "S17+"
|
||||
self.raw_model = "S17+"
|
||||
self.expected_chips = 65
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -38,7 +38,7 @@ class S17Pro(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S17 Pro"
|
||||
self.raw_model = "S17 Pro"
|
||||
self.expected_chips = 48
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -47,6 +47,6 @@ class S17e(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S17e"
|
||||
self.raw_model = "S17e"
|
||||
self.expected_chips = 135
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -21,7 +21,7 @@ class T17(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "T17"
|
||||
self.raw_model = "T17"
|
||||
self.expected_chips = 30
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -30,7 +30,7 @@ class T17Plus(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "T17+"
|
||||
self.raw_model = "T17+"
|
||||
self.expected_chips = 44
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -39,6 +39,6 @@ class T17e(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "T17e"
|
||||
self.raw_model = "T17e"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -21,7 +21,7 @@ class S19(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19"
|
||||
self.raw_model = "S19"
|
||||
self.expected_chips = 76
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -30,7 +30,7 @@ class S19NoPIC(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19 No PIC"
|
||||
self.raw_model = "S19 No PIC"
|
||||
self.expected_chips = 88
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -39,7 +39,7 @@ class S19Pro(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19 Pro"
|
||||
self.raw_model = "S19 Pro"
|
||||
self.expected_chips = 114
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -48,7 +48,7 @@ class S19i(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19i"
|
||||
self.raw_model = "S19i"
|
||||
self.expected_chips = 80
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -57,7 +57,7 @@ class S19Plus(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19+"
|
||||
self.raw_model = "S19+"
|
||||
self.expected_chips = 80
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -66,7 +66,7 @@ class S19ProPlus(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19 Pro+"
|
||||
self.raw_model = "S19 Pro+"
|
||||
self.expected_chips = 120
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -75,7 +75,7 @@ class S19XP(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19 XP"
|
||||
self.raw_model = "S19 XP"
|
||||
self.expected_chips = 110
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -84,7 +84,7 @@ class S19a(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19a"
|
||||
self.raw_model = "S19a"
|
||||
self.expected_chips = 72
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -93,7 +93,7 @@ class S19aPro(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19a Pro"
|
||||
self.raw_model = "S19a Pro"
|
||||
self.expected_chips = 100
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -102,7 +102,7 @@ class S19j(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19j"
|
||||
self.raw_model = "S19j"
|
||||
self.expected_chips = 114
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -111,7 +111,7 @@ class S19jNoPIC(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19j No PIC"
|
||||
self.raw_model = "S19j No PIC"
|
||||
self.expected_chips = 88
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -120,7 +120,7 @@ class S19jPro(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19j Pro"
|
||||
self.raw_model = "S19j Pro"
|
||||
self.expected_chips = 126
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -129,7 +129,7 @@ class S19jProPlus(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19j Pro+"
|
||||
self.raw_model = "S19j Pro+"
|
||||
self.expected_chips = 120
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -138,7 +138,7 @@ class S19kPro(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19k Pro"
|
||||
self.raw_model = "S19k Pro"
|
||||
self.expected_chips = 77
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -147,7 +147,7 @@ class S19L(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19L"
|
||||
self.raw_model = "S19L"
|
||||
self.expected_chips = 76
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -156,7 +156,7 @@ class S19kProNoPIC(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19k Pro No PIC"
|
||||
self.raw_model = "S19k Pro No PIC"
|
||||
self.expected_chips = 77
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -165,7 +165,7 @@ class S19ProHydro(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S19 Pro Hydro"
|
||||
self.raw_model = "S19 Pro Hydro"
|
||||
self.expected_chips = 180
|
||||
self.expected_hashboards = 4
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -21,6 +21,6 @@ class T19(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "T19"
|
||||
self.raw_model = "T19"
|
||||
self.expected_chips = 76
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -21,7 +21,7 @@ class D3(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "D3"
|
||||
self.raw_model = "D3"
|
||||
self.expected_chips = 60
|
||||
self.expected_hashboards = 3
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -21,7 +21,7 @@ class HS3(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "HS3"
|
||||
self.raw_model = "HS3"
|
||||
self.expected_chips = 92
|
||||
self.expected_hashboards = 3
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -20,6 +20,6 @@ class L3Plus(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "L3+"
|
||||
self.raw_model = "L3+"
|
||||
self.expected_chips = 72
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -21,7 +21,7 @@ class DR5(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "DR5"
|
||||
self.raw_model = "DR5"
|
||||
self.expected_chips = 72
|
||||
self.expected_hashboards = 3
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -20,6 +20,6 @@ class L7(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "L7"
|
||||
self.raw_model = "L7"
|
||||
self.expected_chips = 120
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -21,7 +21,7 @@ class E9Pro(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "E9Pro"
|
||||
self.raw_model = "E9Pro"
|
||||
self.expected_chips = 8
|
||||
self.expected_hashboards = 2
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -21,7 +21,7 @@ class S9(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S9"
|
||||
self.raw_model = "S9"
|
||||
self.expected_chips = 63
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -30,7 +30,7 @@ class S9i(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S9i"
|
||||
self.raw_model = "S9i"
|
||||
self.expected_chips = 63
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -39,6 +39,6 @@ class S9j(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S9j"
|
||||
self.raw_model = "S9j"
|
||||
self.expected_chips = 63
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -21,6 +21,6 @@ class T9(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "T9"
|
||||
self.raw_model = "T9"
|
||||
self.expected_chips = 54
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -21,6 +21,6 @@ class Avalon1026(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 1026"
|
||||
self.raw_model = "Avalon 1026"
|
||||
self.expected_chips = 80
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -21,6 +21,6 @@ class Avalon1047(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 1047"
|
||||
self.raw_model = "Avalon 1047"
|
||||
self.expected_chips = 80
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -21,6 +21,6 @@ class Avalon1066(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 1066"
|
||||
self.raw_model = "Avalon 1066"
|
||||
self.expected_chips = 114
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -22,6 +22,6 @@ class Avalon1166Pro(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 1166 Pro"
|
||||
self.raw_model = "Avalon 1166 Pro"
|
||||
self.expected_chips = 120
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -22,6 +22,6 @@ class Avalon1246(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 1246"
|
||||
self.raw_model = "Avalon 1246"
|
||||
self.expected_chips = 120
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -21,7 +21,7 @@ class Avalon721(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 721"
|
||||
self.raw_model = "Avalon 721"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 18
|
||||
self.fan_count = 1
|
||||
|
||||
@@ -21,7 +21,7 @@ class Avalon741(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 741"
|
||||
self.raw_model = "Avalon 741"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 22
|
||||
self.fan_count = 1
|
||||
|
||||
@@ -21,7 +21,7 @@ class Avalon761(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 761"
|
||||
self.raw_model = "Avalon 761"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 18
|
||||
self.fan_count = 1
|
||||
|
||||
@@ -21,7 +21,7 @@ class Avalon821(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 821"
|
||||
self.raw_model = "Avalon 821"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 26
|
||||
self.fan_count = 1
|
||||
|
||||
@@ -21,7 +21,7 @@ class Avalon841(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 841"
|
||||
self.raw_model = "Avalon 841"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 26
|
||||
self.fan_count = 1
|
||||
|
||||
@@ -21,7 +21,7 @@ class Avalon851(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 851"
|
||||
self.raw_model = "Avalon 851"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 26
|
||||
self.fan_count = 1
|
||||
|
||||
@@ -21,7 +21,7 @@ class Avalon921(AvalonMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "Avalon 921"
|
||||
self.raw_model = "Avalon 921"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 26
|
||||
self.fan_count = 1
|
||||
|
||||
@@ -20,7 +20,7 @@ class CK5(GoldshellMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "CK5"
|
||||
self.raw_model = "CK5"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 46
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -20,7 +20,7 @@ class HS5(GoldshellMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "HS5"
|
||||
self.raw_model = "HS5"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 46
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -20,7 +20,7 @@ class KD5(GoldshellMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "KD5"
|
||||
self.raw_model = "KD5"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 46
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -20,7 +20,7 @@ class KDMax(GoldshellMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "KD Max"
|
||||
self.raw_model = "KD Max"
|
||||
self.expected_hashboards = 3
|
||||
self.expected_chips = 84
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -20,4 +20,4 @@ class A10X(InnosiliconMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0") -> None:
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "A10X"
|
||||
self.raw_model = "A10X"
|
||||
|
||||
@@ -21,6 +21,6 @@ class T3HPlus(InnosiliconMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0") -> None:
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "T3H+"
|
||||
self.raw_model = "T3H+"
|
||||
self.expected_chips = 114
|
||||
self.fan_count = 4
|
||||
|
||||
@@ -21,6 +21,6 @@ class M20V10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M20 V10"
|
||||
self.raw_model = "M20 V10"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -21,7 +21,7 @@ class M20PV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M20P V10"
|
||||
self.raw_model = "M20P V10"
|
||||
self.expected_chips = 156
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -30,6 +30,6 @@ class M20PV30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M20P V30"
|
||||
self.raw_model = "M20P V30"
|
||||
self.expected_chips = 148
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M20SV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M20S V10"
|
||||
self.raw_model = "M20S V10"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,7 +32,7 @@ class M20SV20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M20S V20"
|
||||
self.raw_model = "M20S V20"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -41,6 +41,6 @@ class M20SV30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M20S V30"
|
||||
self.raw_model = "M20S V30"
|
||||
self.expected_chips = 140
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M20SPlusV30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M20S+ V30"
|
||||
self.raw_model = "M20S+ V30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M20S+ V30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,6 +23,6 @@ class M21V10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M21 V10"
|
||||
self.raw_model = "M21 V10"
|
||||
self.expected_chips = 33
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M21SV20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M21S V20"
|
||||
self.raw_model = "M21S V20"
|
||||
self.expected_chips = 66
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,7 +32,7 @@ class M21SV60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M21S V60"
|
||||
self.raw_model = "M21S V60"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -41,6 +41,6 @@ class M21SV70(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M21S V70"
|
||||
self.raw_model = "M21S V70"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M21SPlusV20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M21S+ V20"
|
||||
self.raw_model = "M21S+ V20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M21S+ V20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,6 +23,6 @@ class M29V10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M29 V10"
|
||||
self.raw_model = "M29 V10"
|
||||
self.expected_chips = 50
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M30V10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30 V10"
|
||||
self.raw_model = "M30 V10"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,6 +32,6 @@ class M30V20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30 V20"
|
||||
self.raw_model = "M30 V20"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M30KV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30K V10"
|
||||
self.raw_model = "M30K V10"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 240
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M30LV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30L V10"
|
||||
self.raw_model = "M30L V10"
|
||||
self.board_num = 4
|
||||
self.expected_chips = 144
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M30SV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S V10"
|
||||
self.raw_model = "M30S V10"
|
||||
self.expected_chips = 148
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,7 +32,7 @@ class M30SV20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S V20"
|
||||
self.raw_model = "M30S V20"
|
||||
self.expected_chips = 156
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -41,7 +41,7 @@ class M30SV30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S V30"
|
||||
self.raw_model = "M30S V30"
|
||||
self.expected_chips = 164
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -50,7 +50,7 @@ class M30SV40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S V40"
|
||||
self.raw_model = "M30S V40"
|
||||
self.expected_chips = 172
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -59,7 +59,7 @@ class M30SV50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S V50"
|
||||
self.raw_model = "M30S V50"
|
||||
self.expected_chips = 156
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -68,7 +68,7 @@ class M30SV60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S V60"
|
||||
self.raw_model = "M30S V60"
|
||||
self.expected_chips = 164
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -77,7 +77,7 @@ class M30SV70(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S V70"
|
||||
self.raw_model = "M30S V70"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30SV70, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -89,7 +89,7 @@ class M30SV80(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S V80"
|
||||
self.raw_model = "M30S V80"
|
||||
self.expected_chips = 129
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -98,7 +98,7 @@ class M30SVE10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VE10"
|
||||
self.raw_model = "M30S VE10"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -107,7 +107,7 @@ class M30SVE20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VE20"
|
||||
self.raw_model = "M30S VE20"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -116,7 +116,7 @@ class M30SVE30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VE30"
|
||||
self.raw_model = "M30S VE30"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -125,7 +125,7 @@ class M30SVE40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VE40"
|
||||
self.raw_model = "M30S VE40"
|
||||
self.expected_chips = 123
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -134,7 +134,7 @@ class M30SVE50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VE50"
|
||||
self.raw_model = "M30S VE50"
|
||||
self.expected_chips = 129
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -143,7 +143,7 @@ class M30SVE60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VE60"
|
||||
self.raw_model = "M30S VE60"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30SVE60, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -155,7 +155,7 @@ class M30SVE70(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VE70"
|
||||
self.raw_model = "M30S VE70"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30SVE70, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -167,7 +167,7 @@ class M30SVF10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VF10"
|
||||
self.raw_model = "M30S VF10"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -176,7 +176,7 @@ class M30SVF20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VF20"
|
||||
self.raw_model = "M30S VF20"
|
||||
self.expected_chips = 74
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -185,7 +185,7 @@ class M30SVF30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VF30"
|
||||
self.raw_model = "M30S VF30"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -194,7 +194,7 @@ class M30SVG10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VG10"
|
||||
self.raw_model = "M30S VG10"
|
||||
self.expected_chips = 66
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -203,7 +203,7 @@ class M30SVG20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VG20"
|
||||
self.raw_model = "M30S VG20"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -212,7 +212,7 @@ class M30SVG30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VG30"
|
||||
self.raw_model = "M30S VG30"
|
||||
self.expected_chips = 74
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -221,7 +221,7 @@ class M30SVG40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VG40"
|
||||
self.raw_model = "M30S VG40"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -230,7 +230,7 @@ class M30SVH10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VH10"
|
||||
self.raw_model = "M30S VH10"
|
||||
self.expected_chips = 64
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -239,7 +239,7 @@ class M30SVH20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VH20"
|
||||
self.raw_model = "M30S VH20"
|
||||
self.expected_chips = 66
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -248,7 +248,7 @@ class M30SVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VH30"
|
||||
self.raw_model = "M30S VH30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30SVH30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -260,7 +260,7 @@ class M30SVH40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VH40"
|
||||
self.raw_model = "M30S VH40"
|
||||
self.expected_chips = 64
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -269,7 +269,7 @@ class M30SVH50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VH50"
|
||||
self.raw_model = "M30S VH50"
|
||||
self.expected_chips = 66
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -278,7 +278,7 @@ class M30SVH60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VH60"
|
||||
self.raw_model = "M30S VH60"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30SVH60, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -290,6 +290,6 @@ class M30SVI20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S VI20"
|
||||
self.raw_model = "M30S VI20"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M30SPlusV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V10"
|
||||
self.raw_model = "M30S+ V10"
|
||||
self.expected_chips = 215
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,7 +32,7 @@ class M30SPlusV20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V20"
|
||||
self.raw_model = "M30S+ V20"
|
||||
self.expected_chips = 255
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -41,7 +41,7 @@ class M30SPlusV30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V30"
|
||||
self.raw_model = "M30S+ V30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S+ V30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -53,7 +53,7 @@ class M30SPlusV40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V40"
|
||||
self.raw_model = "M30S+ V40"
|
||||
self.expected_chips = 235
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -62,7 +62,7 @@ class M30SPlusV50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V50"
|
||||
self.raw_model = "M30S+ V50"
|
||||
self.expected_chips = 225
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -71,7 +71,7 @@ class M30SPlusV60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V60"
|
||||
self.raw_model = "M30S+ V60"
|
||||
self.expected_chips = 245
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -80,7 +80,7 @@ class M30SPlusV70(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V70"
|
||||
self.raw_model = "M30S+ V70"
|
||||
self.expected_chips = 235
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -89,7 +89,7 @@ class M30SPlusV80(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V80"
|
||||
self.raw_model = "M30S+ V80"
|
||||
self.expected_chips = 245
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -98,7 +98,7 @@ class M30SPlusV90(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V90"
|
||||
self.raw_model = "M30S+ V90"
|
||||
self.expected_chips = 225
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -107,7 +107,7 @@ class M30SPlusV100(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ V100"
|
||||
self.raw_model = "M30S+ V100"
|
||||
self.expected_chips = 215
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -116,7 +116,7 @@ class M30SPlusVE30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VE30"
|
||||
self.raw_model = "M30S+ VE30"
|
||||
self.expected_chips = 148
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -125,7 +125,7 @@ class M30SPlusVE40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VE40"
|
||||
self.raw_model = "M30S+ VE40"
|
||||
self.expected_chips = 156
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -134,7 +134,7 @@ class M30SPlusVE50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VE50"
|
||||
self.raw_model = "M30S+ VE50"
|
||||
self.expected_chips = 164
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -143,7 +143,7 @@ class M30SPlusVE60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VE60"
|
||||
self.raw_model = "M30S+ VE60"
|
||||
self.expected_chips = 172
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -152,7 +152,7 @@ class M30SPlusVE70(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VE70"
|
||||
self.raw_model = "M30S+ VE70"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S+ VE70, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -164,7 +164,7 @@ class M30SPlusVE80(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VE80"
|
||||
self.raw_model = "M30S+ VE80"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S+ VE80, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -176,7 +176,7 @@ class M30SPlusVE90(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VE90"
|
||||
self.raw_model = "M30S+ VE90"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S+ VE90, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -188,7 +188,7 @@ class M30SPlusVE100(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VE100"
|
||||
self.raw_model = "M30S+ VE100"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S+ VE100, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -200,7 +200,7 @@ class M30SPlusVF20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VF20"
|
||||
self.raw_model = "M30S+ VF20"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -209,7 +209,7 @@ class M30SPlusVF30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VF30"
|
||||
self.raw_model = "M30S+ VF30"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -218,7 +218,7 @@ class M30SPlusVG20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VG20"
|
||||
self.raw_model = "M30S+ VG20"
|
||||
self.expected_chips = 82
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -227,7 +227,7 @@ class M30SPlusVG30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VG30"
|
||||
self.raw_model = "M30S+ VG30"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -236,7 +236,7 @@ class M30SPlusVG40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VG40"
|
||||
self.raw_model = "M30S+ VG40"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -245,7 +245,7 @@ class M30SPlusVG50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VG50"
|
||||
self.raw_model = "M30S+ VG50"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -254,7 +254,7 @@ class M30SPlusVG60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VG60"
|
||||
self.raw_model = "M30S+ VG60"
|
||||
self.expected_chips = 86
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -263,7 +263,7 @@ class M30SPlusVH10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VH10"
|
||||
self.raw_model = "M30S+ VH10"
|
||||
self.expected_chips = 64
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -272,7 +272,7 @@ class M30SPlusVH20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VH20"
|
||||
self.raw_model = "M30S+ VH20"
|
||||
self.expected_chips = 66
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -281,7 +281,7 @@ class M30SPlusVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VH30"
|
||||
self.raw_model = "M30S+ VH30"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -290,7 +290,7 @@ class M30SPlusVH40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VH40"
|
||||
self.raw_model = "M30S+ VH40"
|
||||
self.expected_chips = 74
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -299,7 +299,7 @@ class M30SPlusVH50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VH50"
|
||||
self.raw_model = "M30S+ VH50"
|
||||
self.expected_chips = 64
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -308,6 +308,6 @@ class M30SPlusVH60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VH60"
|
||||
self.raw_model = "M30S+ VH60"
|
||||
self.expected_chips = 66
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M30SPlusPlusV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ V10"
|
||||
self.raw_model = "M30S++ V10"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 255
|
||||
self.fan_count = 2
|
||||
@@ -33,7 +33,7 @@ class M30SPlusPlusV20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ V20"
|
||||
self.raw_model = "M30S++ V20"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 255
|
||||
self.fan_count = 2
|
||||
@@ -43,7 +43,7 @@ class M30SPlusPlusVE30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VE30"
|
||||
self.raw_model = "M30S++ VE30"
|
||||
self.expected_chips = 215
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -52,7 +52,7 @@ class M30SPlusPlusVE40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VE40"
|
||||
self.raw_model = "M30S++ VE40"
|
||||
self.expected_chips = 225
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -61,7 +61,7 @@ class M30SPlusPlusVE50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VE50"
|
||||
self.raw_model = "M30S++ VE50"
|
||||
self.expected_chips = 235
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -70,7 +70,7 @@ class M30SPlusPlusVF40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VF40"
|
||||
self.raw_model = "M30S++ VF40"
|
||||
self.expected_chips = 156
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -79,7 +79,7 @@ class M30SPlusPlusVG30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VG30"
|
||||
self.raw_model = "M30S++ VG30"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -88,7 +88,7 @@ class M30SPlusPlusVG40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VG40"
|
||||
self.raw_model = "M30S++ VG40"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -97,7 +97,7 @@ class M30SPlusPlusVG50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VG50"
|
||||
self.raw_model = "M30S++ VG50"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S++ VG50, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -109,7 +109,7 @@ class M30SPlusPlusVH10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH10"
|
||||
self.raw_model = "M30S++ VH10"
|
||||
self.expected_chips = 82
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -118,7 +118,7 @@ class M30SPlusPlusVH20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH20"
|
||||
self.raw_model = "M30S++ VH20"
|
||||
self.expected_chips = 86
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -127,7 +127,7 @@ class M30SPlusPlusVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH30"
|
||||
self.raw_model = "M30S++ VH30"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -136,7 +136,7 @@ class M30SPlusPlusVH40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH40"
|
||||
self.raw_model = "M30S++ VH40"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -145,7 +145,7 @@ class M30SPlusPlusVH50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH50"
|
||||
self.raw_model = "M30S++ VH50"
|
||||
self.expected_chips = 74
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -154,7 +154,7 @@ class M30SPlusPlusVH60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH60"
|
||||
self.raw_model = "M30S++ VH60"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -163,7 +163,7 @@ class M30SPlusPlusVH70(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH70"
|
||||
self.raw_model = "M30S++ VH70"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -172,7 +172,7 @@ class M30SPlusPlusVH80(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH80"
|
||||
self.raw_model = "M30S++ VH80"
|
||||
self.expected_chips = 74
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -181,7 +181,7 @@ class M30SPlusPlusVH90(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH90"
|
||||
self.raw_model = "M30S++ VH90"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -190,7 +190,7 @@ class M30SPlusPlusVH100(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VH100"
|
||||
self.raw_model = "M30S++ VH100"
|
||||
self.expected_chips = 82
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -199,7 +199,7 @@ class M30SPlusPlusVJ20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VJ20"
|
||||
self.raw_model = "M30S++ VJ20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S++ VJ20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -211,7 +211,7 @@ class M30SPlusPlusVJ30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M30S++ VJ30"
|
||||
self.raw_model = "M30S++ VJ30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S++ VJ30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M31V10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31 V10"
|
||||
self.raw_model = "M31 V10"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,6 +32,6 @@ class M31V20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31 V20"
|
||||
self.raw_model = "M31 V20"
|
||||
self.expected_chips = 74
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M31HV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31H V10"
|
||||
self.raw_model = "M31H V10"
|
||||
self.expected_chips = 114
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -32,7 +32,7 @@ class M31HV40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31H V40"
|
||||
self.raw_model = "M31H V40"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 136
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,6 +23,6 @@ class M31LV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31L V10"
|
||||
self.raw_model = "M31L V10"
|
||||
self.expected_chips = 114
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M31SV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S V10"
|
||||
self.raw_model = "M31S V10"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,7 +32,7 @@ class M31SV20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S V20"
|
||||
self.raw_model = "M31S V20"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -41,7 +41,7 @@ class M31SV30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S V30"
|
||||
self.raw_model = "M31S V30"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -50,7 +50,7 @@ class M31SV40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S V40"
|
||||
self.raw_model = "M31S V40"
|
||||
self.expected_chips = 123
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -59,7 +59,7 @@ class M31SV50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S V50"
|
||||
self.raw_model = "M31S V50"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -68,7 +68,7 @@ class M31SV60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S V60"
|
||||
self.raw_model = "M31S V60"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -77,7 +77,7 @@ class M31SV70(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S V70"
|
||||
self.raw_model = "M31S V70"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -86,7 +86,7 @@ class M31SV80(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S V80"
|
||||
self.raw_model = "M31S V80"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M31SV80, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -98,7 +98,7 @@ class M31SV90(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S V90"
|
||||
self.raw_model = "M31S V90"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -107,7 +107,7 @@ class M31SVE10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S VE10"
|
||||
self.raw_model = "M31S VE10"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -116,7 +116,7 @@ class M31SVE20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S VE20"
|
||||
self.raw_model = "M31S VE20"
|
||||
self.expected_chips = 74
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -125,7 +125,7 @@ class M31SVE30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S VE30"
|
||||
self.raw_model = "M31S VE30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M31SVE30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M31SEV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31SE V10"
|
||||
self.raw_model = "M31SE V10"
|
||||
self.expected_chips = 82
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,7 +32,7 @@ class M31SEV20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31SE V20"
|
||||
self.raw_model = "M31SE V20"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -41,6 +41,6 @@ class M31SEV30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31SE V30"
|
||||
self.raw_model = "M31SE V30"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M31SPlusV10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V10"
|
||||
self.raw_model = "M31S+ V10"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,7 +32,7 @@ class M31SPlusV20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V20"
|
||||
self.raw_model = "M31S+ V20"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -41,7 +41,7 @@ class M31SPlusV30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V30"
|
||||
self.raw_model = "M31S+ V30"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -50,7 +50,7 @@ class M31SPlusV40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V40"
|
||||
self.raw_model = "M31S+ V40"
|
||||
self.expected_chips = 123
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -59,7 +59,7 @@ class M31SPlusV50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V50"
|
||||
self.raw_model = "M31S+ V50"
|
||||
self.expected_chips = 148
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -68,7 +68,7 @@ class M31SPlusV60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V60"
|
||||
self.raw_model = "M31S+ V60"
|
||||
self.expected_chips = 156
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -77,7 +77,7 @@ class M31SPlusV80(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V80"
|
||||
self.raw_model = "M31S+ V80"
|
||||
self.expected_chips = 129
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -86,7 +86,7 @@ class M31SPlusV90(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V90"
|
||||
self.raw_model = "M31S+ V90"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -95,7 +95,7 @@ class M31SPlusV100(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V100"
|
||||
self.raw_model = "M31S+ V100"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -104,7 +104,7 @@ class M31SPlusVE10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VE10"
|
||||
self.raw_model = "M31S+ VE10"
|
||||
self.expected_chips = 82
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -113,7 +113,7 @@ class M31SPlusVE20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VE20"
|
||||
self.raw_model = "M31S+ VE20"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -122,7 +122,7 @@ class M31SPlusVE30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VE30"
|
||||
self.raw_model = "M31S+ VE30"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -131,7 +131,7 @@ class M31SPlusVE40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VE40"
|
||||
self.raw_model = "M31S+ VE40"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -140,7 +140,7 @@ class M31SPlusVE50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VE50"
|
||||
self.raw_model = "M31S+ VE50"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -149,7 +149,7 @@ class M31SPlusVE60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VE60"
|
||||
self.raw_model = "M31S+ VE60"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S+ VE60, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -161,7 +161,7 @@ class M31SPlusVE80(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VE80"
|
||||
self.raw_model = "M31S+ VE80"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S+ VE80, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -173,7 +173,7 @@ class M31SPlusVF20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VF20"
|
||||
self.raw_model = "M31S+ VF20"
|
||||
self.expected_chips = 66
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -182,7 +182,7 @@ class M31SPlusVF30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VF30"
|
||||
self.raw_model = "M31S+ VF30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M30S+ VF30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -194,7 +194,7 @@ class M31SPlusVG20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VG20"
|
||||
self.raw_model = "M31S+ VG20"
|
||||
self.expected_chips = 66
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -203,7 +203,7 @@ class M31SPlusVG30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ VG30"
|
||||
self.raw_model = "M31S+ VG30"
|
||||
self.expected_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -212,7 +212,7 @@ class M31SPlusV30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V30"
|
||||
self.raw_model = "M31S+ V30"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -221,6 +221,6 @@ class M31SPlusV40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S+ V40"
|
||||
self.raw_model = "M31S+ V40"
|
||||
self.expected_chips = 123
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M32V10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M32 V10"
|
||||
self.raw_model = "M32 V10"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -32,6 +32,6 @@ class M32V20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M32 V20"
|
||||
self.raw_model = "M32 V20"
|
||||
self.expected_chips = 74
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -21,6 +21,6 @@ class M32S(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M32S"
|
||||
self.raw_model = "M32S"
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M33V10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33 V10"
|
||||
self.raw_model = "M33 V10"
|
||||
self.expected_chips = 33
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -32,7 +32,7 @@ class M33V20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33 V20"
|
||||
self.raw_model = "M33 V20"
|
||||
self.expected_chips = 62
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -41,6 +41,6 @@ class M33V30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33 V30"
|
||||
self.raw_model = "M33 V30"
|
||||
self.expected_chips = 66
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M33SVG30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33S VG30"
|
||||
self.raw_model = "M33S VG30"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 116
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M33SPlusVG20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33S+ VG20"
|
||||
self.raw_model = "M33S+ VG20"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 112
|
||||
self.fan_count = 0
|
||||
@@ -33,7 +33,7 @@ class M33SPlusVH20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33S+ VH20"
|
||||
self.raw_model = "M33S+ VH20"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 100
|
||||
self.fan_count = 0
|
||||
@@ -43,7 +43,7 @@ class M33SPlusVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33S+ VH30"
|
||||
self.raw_model = "M33S+ VH30"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 0 # slot1 116, slot2 106, slot3 116, slot4 106
|
||||
warnings.warn(
|
||||
|
||||
@@ -23,7 +23,7 @@ class M33SPlusPlusVH20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33S++ VH20"
|
||||
self.raw_model = "M33S++ VH20"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 112
|
||||
self.fan_count = 0
|
||||
@@ -33,7 +33,7 @@ class M33SPlusPlusVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33S++ VH30"
|
||||
self.raw_model = "M33S++ VH30"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
@@ -46,7 +46,7 @@ class M33SPlusPlusVG40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M33S++ VG40"
|
||||
self.raw_model = "M33S++ VG40"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 174
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -21,7 +21,7 @@ class M34SPlusVE10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M34S+ VE10"
|
||||
self.raw_model = "M34S+ VE10"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 116
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M36SVE10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M36S VE10"
|
||||
self.raw_model = "M36S VE10"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 114
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M36SPlusVG30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M36S+ VG30"
|
||||
self.raw_model = "M36S+ VG30"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 108
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M36SPlusPlusVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M36S++ VH30"
|
||||
self.raw_model = "M36S++ VH30"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 80
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M39V10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M39 V10"
|
||||
self.raw_model = "M39 V10"
|
||||
self.expected_chips = 50
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -32,7 +32,7 @@ class M39V20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M39 V20"
|
||||
self.raw_model = "M39 V20"
|
||||
self.expected_chips = 54
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -41,6 +41,6 @@ class M39V30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M39 V30"
|
||||
self.raw_model = "M39 V30"
|
||||
self.expected_chips = 68
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M50VE30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VE30"
|
||||
self.raw_model = "M50 VE30"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 255
|
||||
self.fan_count = 2
|
||||
@@ -33,7 +33,7 @@ class M50VG30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VG30"
|
||||
self.raw_model = "M50 VG30"
|
||||
self.expected_chips = 156
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -42,7 +42,7 @@ class M50VH10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VH10"
|
||||
self.raw_model = "M50 VH10"
|
||||
self.expected_chips = 86
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -51,7 +51,7 @@ class M50VH20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VH20"
|
||||
self.raw_model = "M50 VH20"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -60,7 +60,7 @@ class M50VH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VH30"
|
||||
self.raw_model = "M50 VH30"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -69,7 +69,7 @@ class M50VH40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VH40"
|
||||
self.raw_model = "M50 VH40"
|
||||
self.expected_chips = 84
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -78,7 +78,7 @@ class M50VH50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VH50"
|
||||
self.raw_model = "M50 VH50"
|
||||
self.expected_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -87,7 +87,7 @@ class M50VH60(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VH60"
|
||||
self.raw_model = "M50 VH60"
|
||||
self.expected_chips = 84
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -96,7 +96,7 @@ class M50VH70(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VH70"
|
||||
self.raw_model = "M50 VH70"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50 VH70, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -108,7 +108,7 @@ class M50VH80(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VH80"
|
||||
self.raw_model = "M50 VH80"
|
||||
self.expected_chips = 111
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -117,7 +117,7 @@ class M50VJ10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VJ10"
|
||||
self.raw_model = "M50 VJ10"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50 VJ10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -129,7 +129,7 @@ class M50VJ20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VJ20"
|
||||
self.raw_model = "M50 VJ20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50 VJ20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -141,7 +141,7 @@ class M50VJ30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50 VJ30"
|
||||
self.raw_model = "M50 VJ30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50 VJ30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M50SVJ10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S VJ10"
|
||||
self.raw_model = "M50S VJ10"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S VJ10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -35,7 +35,7 @@ class M50SVJ20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S VJ20"
|
||||
self.raw_model = "M50S VJ20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S VJ20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -47,7 +47,7 @@ class M50SVJ30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S VJ30"
|
||||
self.raw_model = "M50S VJ30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S VJ30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -59,7 +59,7 @@ class M50SVH10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S VH10"
|
||||
self.raw_model = "M50S VH10"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S VH10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -71,7 +71,7 @@ class M50SVH20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S VH20"
|
||||
self.raw_model = "M50S VH20"
|
||||
self.expected_chips = 135
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -80,7 +80,7 @@ class M50SVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S VH30"
|
||||
self.raw_model = "M50S VH30"
|
||||
self.expected_chips = 156
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -89,7 +89,7 @@ class M50SVH40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S VH40"
|
||||
self.raw_model = "M50S VH40"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S VH40, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -101,7 +101,7 @@ class M50SVH50(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S VH50"
|
||||
self.raw_model = "M50S VH50"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S VH50, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M50SPlusVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S+ VH30"
|
||||
self.raw_model = "M50S+ VH30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S+ VH30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -35,7 +35,7 @@ class M50SPlusVH40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S+ VH40"
|
||||
self.raw_model = "M50S+ VH40"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S+ VH40, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -47,7 +47,7 @@ class M50SPlusVJ30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S+ VJ30"
|
||||
self.raw_model = "M50S+ VJ30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S+ VJ30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -59,6 +59,6 @@ class M50SPlusVK20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S+ VK20"
|
||||
self.raw_model = "M50S+ VK20"
|
||||
self.expected_chips = 117
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M50SPlusPlusVK10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S++ VK10"
|
||||
self.raw_model = "M50S++ VK10"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S+ VK10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -35,7 +35,7 @@ class M50SPlusPlusVK20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S++ VK20"
|
||||
self.raw_model = "M50S++ VK20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M50S+ VK20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -47,6 +47,6 @@ class M50SPlusPlusVK30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M50S++ VK30"
|
||||
self.raw_model = "M50S++ VK30"
|
||||
self.expected_chips = 76
|
||||
self.fan_count = 2
|
||||
|
||||
@@ -23,7 +23,7 @@ class M53VH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M53 VH30"
|
||||
self.raw_model = "M53 VH30"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 128
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M53SVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M53S VH30"
|
||||
self.raw_model = "M53S VH30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M53S VH30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M53SPlusVJ30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M53S+ VJ30"
|
||||
self.raw_model = "M53S+ VJ30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M53S+ VJ30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M56VH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M56 VH30"
|
||||
self.raw_model = "M56 VH30"
|
||||
self.expected_hashboards = 4
|
||||
self.expected_chips = 108
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M56SVH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M56S VH30"
|
||||
self.raw_model = "M56S VH30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M56S VH30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M56SPlusVJ30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M56S+ VJ30"
|
||||
self.raw_model = "M56S+ VJ30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M56S+ VJ30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M59VH30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M59 VH30"
|
||||
self.raw_model = "M59 VH30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M59 VH30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M60VK10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M60 VK10"
|
||||
self.raw_model = "M60 VK10"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M60 VK10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -35,7 +35,7 @@ class M60VK20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M60 VK20"
|
||||
self.raw_model = "M60 VK20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M60 VK20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -47,7 +47,7 @@ class M60VK30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M60 VK30"
|
||||
self.raw_model = "M60 VK30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M60 VK30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -59,7 +59,7 @@ class M60VK40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M60 VK40"
|
||||
self.raw_model = "M60 VK40"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M60 VK40, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M60SVK10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M60S VK10"
|
||||
self.raw_model = "M60S VK10"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M60S VK10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -35,7 +35,7 @@ class M60SVK20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M60S VK20"
|
||||
self.raw_model = "M60S VK20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M60S VK20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -47,7 +47,7 @@ class M60SVK30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M60S VK30"
|
||||
self.raw_model = "M60S VK30"
|
||||
self.expected_hashboards = 3
|
||||
self.expected_chips = 78
|
||||
self.fan_count = 2
|
||||
@@ -57,7 +57,7 @@ class M60SVK40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M60S VK40"
|
||||
self.raw_model = "M60S VK40"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M60S VK40, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M63VK10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M63 VK10"
|
||||
self.raw_model = "M63 VK10"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M63 VK10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -35,7 +35,7 @@ class M63VK20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M63 VK20"
|
||||
self.raw_model = "M63 VK20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M63 VK20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -47,7 +47,7 @@ class M63VK30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M63 VK30"
|
||||
self.raw_model = "M63 VK30"
|
||||
self.expected_chips = 68
|
||||
self.expected_hashboards = 4
|
||||
self.fan_count = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ class M63SVK10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M63S VK10"
|
||||
self.raw_model = "M63S VK10"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M63S VK10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -35,7 +35,7 @@ class M63SVK20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M63S VK20"
|
||||
self.raw_model = "M63S VK20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M63S VK20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -47,7 +47,7 @@ class M63SVK30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M63S VK30"
|
||||
self.raw_model = "M63S VK30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M63S VK30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M66VK20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M66 VK20"
|
||||
self.raw_model = "M66 VK20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M66 VK20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -35,7 +35,7 @@ class M66VK30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M66 VK30"
|
||||
self.raw_model = "M66 VK30"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M66 VK30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -23,7 +23,7 @@ class M66SVK20(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M66S VK20"
|
||||
self.raw_model = "M66S VK20"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M66S VK20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
@@ -35,7 +35,7 @@ class M66SVK30(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M66S VK30"
|
||||
self.raw_model = "M66S VK30"
|
||||
self.expected_chips = 96
|
||||
self.expected_hashboards = 4
|
||||
self.fan_count = 0
|
||||
@@ -45,7 +45,7 @@ class M66SVK40(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M66S VK40"
|
||||
self.raw_model = "M66S VK40"
|
||||
self.expected_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M66 VK30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
|
||||
@@ -56,7 +56,6 @@ class MinersTest(unittest.TestCase):
|
||||
"hostname",
|
||||
"is_mining",
|
||||
"mac",
|
||||
"model",
|
||||
"expected_hashrate",
|
||||
"uptime",
|
||||
"wattage",
|
||||
|
||||
Reference in New Issue
Block a user