added power limit vs power draw in get_data

This commit is contained in:
upstreamdata
2022-07-07 14:34:21 -06:00
parent 082240bdb6
commit 3ec147990b
4 changed files with 12 additions and 3 deletions

View File

@@ -17,7 +17,8 @@ class MinerData:
:param center_board_chip_temp: The temp of the center board chips as an int.
:param right_board_temp: The temp of the right PCB as an int.
:param right_board_chip_temp: The temp of the right board chips as an int.
:param wattage: Wattage of the miner as an int.
:param wattage: Current power draw of the miner as an int.
:param wattage_limit: Power limit of the miner as an int.
:param fan_1: The speed of the first fan as an int.
:param fan_2: The speed of the second fan as an int.
:param fan_3: The speed of the third fan as an int.
@@ -48,6 +49,7 @@ class MinerData:
right_board_temp: int = 0
right_board_chip_temp: int = 0
wattage: int = 0
wattage_limit: int = 0
fan_1: int = -1
fan_2: int = -1
fan_3: int = -1

View File

@@ -381,7 +381,10 @@ class BOSMiner(BaseMiner):
tuner = tunerstatus[0].get("TUNERSTATUS")
if tuner:
if len(tuner) > 0:
wattage = tuner[0].get("PowerLimit")
wattage = tuner[0].get("ApproximateMinerPowerConsumption")
wattage_limit = tuner[0].get("PowerLimit")
if wattage_limit:
data.wattage_limit = wattage_limit
if wattage:
data.wattage = wattage

View File

@@ -160,6 +160,7 @@ class BTMiner(BaseMiner):
wattage = summary_data[0].get("Power")
if wattage:
data.wattage = round(wattage)
data.wattage_limit = round(wattage)
if devs:
temp_data = devs.get("DEVS")