Compare commits

..

5 Commits

Author SHA1 Message Date
Upstream Data
b8a6063838 version: bumnp version number. 2023-08-26 10:57:40 -06:00
Upstream Data
bcba2be524 bug: remove bad await calls to httpx response.json(). 2023-08-26 10:56:53 -06:00
UpstreamData
f7187d2017 bug: add chip count for M29V10. 2023-08-25 08:58:34 -06:00
Upstream Data
d91b7c4406 version: bump version number. 2023-08-07 17:02:50 -06:00
Upstream Data
248a7e6d69 bug: fix some WM models reporting https first and being identified as BOS+. 2023-08-07 17:02:26 -06:00
3 changed files with 7 additions and 12 deletions

View File

@@ -486,7 +486,7 @@ class MinerFactory:
"location", ""
):
return MinerTypes.WHATSMINER
if "Braiins OS" in web_text or 'href="/cgi-bin/luci"' in web_text:
if "Braiins OS" in web_text:
return MinerTypes.BRAIINS_OS
if "cloud-box" in web_text:
return MinerTypes.GOLDSHELL
@@ -775,15 +775,13 @@ class MinerFactory:
f"http://{ip}/api/auth",
data={"username": "admin", "password": "admin"},
)
auth = (await auth_req.json())["jwt"]
auth = auth_req.json()["jwt"]
web_data = await (
await session.post(
web_data = (await session.post(
f"http://{ip}/api/type",
headers={"Authorization": "Bearer " + auth},
data={},
)
).json()
)).json()
return web_data["type"]
except (httpx.HTTPError, LookupError):
pass
@@ -806,7 +804,7 @@ class MinerFactory:
json={"query": "{bosminer {info{modelName}}}"},
)
if d.status_code == 200:
json_data = await d.json()
json_data = d.json()
miner_model = json_data["data"]["bosminer"]["info"]["modelName"]
return miner_model
except (httpx.HTTPError, LookupError):

View File

@@ -24,8 +24,5 @@ class M29V10(WhatsMiner): # noqa - ignore ABC method implementation
super().__init__(ip, api_ver)
self.ip = ip
self.model = "M29 V10"
self.nominal_chips = 0
warnings.warn(
"Unknown chip count for miner type M29V10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
)
self.nominal_chips = 50
self.fan_count = 2

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyasic"
version = "0.37.5"
version = "0.37.7"
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"