Compare commits

..

4 Commits

Author SHA1 Message Date
UpstreamData
b5216a24a6 version: bump version number. 2023-06-12 12:47:58 -06:00
UpstreamData
dd175ff3a2 bug: fix an issue with 2020 versions of Braiins OS not identifying correctly. 2023-06-12 12:47:38 -06:00
UpstreamData
9b504a3157 version: bump version number. 2023-06-12 12:42:16 -06:00
UpstreamData
0bc3bf20ee bug: fix possible missing models. 2023-06-12 12:41:50 -06:00
5 changed files with 13 additions and 5 deletions

View File

@@ -370,7 +370,9 @@ class BOSMiner(BaseMiner):
return result.upper().strip()
async def get_model(self) -> Optional[str]:
return self.model + " (BOS)"
if self.model is not None:
return self.model + " (BOS)"
return "? (BOS)"
async def get_version(
self, api_version: dict = None, graphql_version: dict = None

View File

@@ -26,4 +26,6 @@ class Hiveon(BMMiner):
self.api_type = "Hiveon"
async def get_model(self) -> Optional[str]:
return self.model + " (Hiveon)"
if self.model is not None:
return self.model + " (Hiveon)"
return "? (Hiveon)"

View File

@@ -58,7 +58,9 @@ class VNish(BMMiner):
self.data_locations = VNISH_DATA_LOC
async def get_model(self) -> Optional[str]:
return self.model + " (VNISH)"
if self.model is not None:
return self.model + " (VNish)"
return "? (VNish)"
async def restart_backend(self) -> bool:
data = await self.web.restart_vnish()

View File

@@ -749,7 +749,9 @@ class MinerFactory:
async def get_miner_model_braiins_os(self, ip: str) -> Optional[str]:
sock_json_data = await self.send_api_command(ip, "devdetails")
try:
miner_model = sock_json_data["DEVDETAILS"][0]["Model"]
miner_model = sock_json_data["DEVDETAILS"][0]["Model"].replace(
"Bitmain ", ""
)
return miner_model
except (TypeError, LookupError):

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyasic"
version = "0.33.23"
version = "0.34.1"
description = "A set of modules for interfacing with many common types of ASIC bitcoin miners, using both their API and SSH."
authors = ["UpstreamData <brett@upstreamdata.ca>"]
repository = "https://github.com/UpstreamData/pyasic"