feature: add support for Hiveon S19j Pro

This commit is contained in:
Upstream Data
2024-11-28 14:38:30 -07:00
parent edb77e9cd8
commit 93fa02412a
7 changed files with 220 additions and 29 deletions

View File

@@ -78,17 +78,6 @@ class HiveonT9(Hiveon, T9):
### DATA GATHERING FUNCTIONS (get_{some_data}) ###
##################################################
async def get_mac(self):
try:
mac = (
(await self.send_ssh_command("cat /sys/class/net/eth0/address"))
.strip()
.upper()
)
return mac
except (TypeError, ValueError, asyncssh.Error, OSError, AttributeError):
pass
async def _get_hashboards(self, rpc_stats: dict = None) -> List[HashBoard]:
hashboards = [
HashBoard(slot=board, expected_chips=self.expected_chips)
@@ -133,23 +122,6 @@ class HiveonT9(Hiveon, T9):
return hashboards
async def _get_wattage(self, rpc_stats: dict = None) -> Optional[int]:
if not rpc_stats:
try:
rpc_stats = await self.rpc.stats()
except APIError:
pass
if rpc_stats:
boards = rpc_stats.get("STATS")
try:
wattage_raw = boards[1]["chain_power"]
except (KeyError, IndexError):
pass
else:
# parse wattage position out of raw data
return round(float(wattage_raw.split(" ")[0]))
async def _get_env_temp(self, rpc_stats: dict = None) -> Optional[float]:
env_temp_list = []
board_map = {