Compare commits

...

2 Commits

Author SHA1 Message Date
Upstream Data
2d057ca9f6 version: bump version number. 2023-02-11 19:45:03 -07:00
Upstream Data
b71b23d2a0 bug: add a check for power_on in reboot check. 2023-02-11 19:44:26 -07:00
2 changed files with 4 additions and 4 deletions

View File

@@ -245,13 +245,13 @@ class BTMinerAPI(BaseMinerAPI):
try:
data = await self._send_bytes(enc_command, timeout)
except (asyncio.CancelledError, asyncio.TimeoutError) as e:
if command["cmd"] in ["reboot", "restart"]:
if command["cmd"] in ["reboot", "restart", "power_on"]:
logging.info(
f"{self} - (reboot/restart) - Whatsminers currently break this. "
f"{self} - (reboot/restart/power_on) - Whatsminers currently break this. "
f"Ignoring exception. Command probably worked."
)
# FAKING IT HERE
data = b'{"STATUS": "S", "When": 1670966423, "Code": 131, "Msg": "API command OK", "Description": "Reboot"}'
data = b'{"STATUS": "S", "When": 1670966423, "Code": 131, "Msg": "API command OK", "Description": "Reboot/restart/power_on"}'
else:
raise APIError("No data was returned from the API.")

View File

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