Update miner data and fix various bugs related to the fix. (#47)
* feature: fix influxdb data. * bug: fix an issue with some avalon stats parsing. * bug: add chip count for 1166 Pro. * bug: fix some issues with bosminer scanning and some data bugs. * bug: remove print statement. * bug: fix failed data gathering multicommand via graphql. * feature: add partial support for M50S+VK20 * version: bump version number. * bug: add chip count for M50S+VK20. * version: bump version number. * bug: attempt to fix offset check issue on BOS+. * bug: fix NoneType subscription on BOS+. * bug: add support for Vnish S17+. * bug: remove web references for Avalons. * bug: add support for VNish S17Pro. * bug: Try secondary identification method for antminers. * feature: fix a bunch of functionality for avalonminers. * bug: fix avalonminer fan speed being set as str. * bug: fix fans speeds being represented as strings. * bug: fix some get_fan formatting. * docs: update supported miners list, and fix A10X model name. * docs: update MinerData docstrings. * docs: update factory documentation.
This commit is contained in:
@@ -31,10 +31,8 @@ class BOSMinerWebAPI(BaseWebAPI):
|
||||
if isinstance(graphql_command, dict):
|
||||
data = []
|
||||
for key in graphql_command:
|
||||
if graphql_command[key]:
|
||||
if graphql_command[key] is not None:
|
||||
parsed = self.parse_command(graphql_command[key])
|
||||
if key.startswith("... on"):
|
||||
parsed = parsed.replace(",", "")
|
||||
data.append(key + parsed)
|
||||
else:
|
||||
data.append(key)
|
||||
@@ -80,10 +78,20 @@ class BOSMinerWebAPI(BaseWebAPI):
|
||||
|
||||
command = merge(*commands)
|
||||
data = await self.send_command(command)
|
||||
if not data:
|
||||
data = {}
|
||||
data["multicommand"] = False
|
||||
return data
|
||||
if data is not None:
|
||||
if data.get("data") is None:
|
||||
try:
|
||||
commands = list(commands)
|
||||
# noinspection PyTypeChecker
|
||||
commands.remove({"bos": {"faultLight": None}})
|
||||
command = merge(*commands)
|
||||
data = await self.send_command(command)
|
||||
except LookupError:
|
||||
pass
|
||||
if not data:
|
||||
data = {}
|
||||
data["multicommand"] = False
|
||||
return data
|
||||
|
||||
async def auth(self, client: httpx.AsyncClient) -> None:
|
||||
url = f"http://{self.ip}/graphql"
|
||||
|
||||
Reference in New Issue
Block a user