added mac addresses to get_data

This commit is contained in:
UpstreamData
2022-06-03 14:28:59 -06:00
parent 895a5b7ac8
commit d3a71c5a93
18 changed files with 190 additions and 1 deletions

View File

@@ -93,18 +93,24 @@ class BTMiner(BaseMiner):
try:
model = await self.get_model()
hostname = await self.get_hostname()
mac = await self.get_mac()
except APIError:
logging.warning(f"Failed to get hostname and model: {self}")
logging.warning(f"Failed to get hostname, mac, and model: {self}")
model = None
data.model = "Whatsminer"
hostname = None
data.hostname = "Whatsminer"
mac = None
if model:
data.model = model
if hostname:
data.hostname = hostname
if mac:
data.mac = mac
miner_data = None
for i in range(DATA_RETRIES):
try: