diff --git a/pyasic/data/__init__.py b/pyasic/data/__init__.py index 8b48a41a..be3a74c8 100644 --- a/pyasic/data/__init__.py +++ b/pyasic/data/__init__.py @@ -51,6 +51,7 @@ class MinerData(BaseModel): hostname: The network hostname of the miner as a str. hashrate: The hashrate of the miner in TH/s as a float. Calculated automatically. expected_hashrate: The factory nominal hashrate of the miner in TH/s as a float. + sticker_hashrate: The factory sticker hashrate of the miner as a float. hashboards: A list of [`HashBoard`][pyasic.data.HashBoard]s on the miner with their statistics. temperature_avg: The average temperature across the boards. Calculated automatically. env_temp: The environment temps as a float. @@ -90,6 +91,9 @@ class MinerData(BaseModel): # hashrate raw_hashrate: AlgoHashRateType = Field(exclude=True, default=None, repr=False) + # sticker + sticker_hashrate: AlgoHashRateType | None = None + # expected expected_hashrate: AlgoHashRateType | None = None expected_hashboards: int | None = None diff --git a/pyasic/miners/backends/hammer.py b/pyasic/miners/backends/hammer.py index 42141a4c..7a9bb507 100644 --- a/pyasic/miners/backends/hammer.py +++ b/pyasic/miners/backends/hammer.py @@ -356,7 +356,9 @@ class BlackMiner(StockFirmware): if rpc_stats is not None: try: - expected_rate = self.expected_hashrate + expected_rate = rpc_stats["STATS"][1].get("total_rateideal") + if expected_rate is None: + expected_rate = self.sticker_hashrate try: rate_unit = rpc_stats["STATS"][1]["rate_unit"] except KeyError: diff --git a/pyasic/miners/hammer/blackminer/DX/D10.py b/pyasic/miners/hammer/blackminer/DX/D10.py index 82318463..ba4e270d 100644 --- a/pyasic/miners/hammer/blackminer/DX/D10.py +++ b/pyasic/miners/hammer/blackminer/DX/D10.py @@ -3,5 +3,5 @@ from pyasic.miners.device.models import D10 class HammerD10(BlackMiner, D10): - expected_hashrate = 5000 + sticker_hashrate = 5000 pass