From 3fd1b41bec12a5d4ea669ac6b311c668d88789f2 Mon Sep 17 00:00:00 2001 From: UpstreamData Date: Mon, 29 Aug 2022 09:52:35 -0600 Subject: [PATCH] add support for whatsminer VH60 --- docs/miners/supported_types.md | 1 + docs/miners/whatsminer/M3X.md | 12 ++++++++++-- pyasic/data/error_codes/whatsminer.py | 1 + .../miners/_types/whatsminer/M3X/M30S_Plus_Plus.py | 13 +++++++++++-- pyasic/miners/_types/whatsminer/M3X/__init__.py | 7 ++++++- .../miners/whatsminer/btminer/M3X/M30S_Plus_Plus.py | 7 +++++++ pyasic/miners/whatsminer/btminer/M3X/__init__.py | 1 + 7 files changed, 37 insertions(+), 5 deletions(-) diff --git a/docs/miners/supported_types.md b/docs/miners/supported_types.md index 56b038c0..3bdd09f4 100644 --- a/docs/miners/supported_types.md +++ b/docs/miners/supported_types.md @@ -37,6 +37,7 @@ Supported miner types are here on this list. If your miner (or miner version) i * [M30S++][pyasic.miners.whatsminer.btminer.M3X.M30S_Plus_Plus.BTMinerM30SPlusPlus]: * [VG30][pyasic.miners.whatsminer.btminer.M3X.M30S_Plus_Plus.BTMinerM30SPlusPlusVG30] * [VG40][pyasic.miners.whatsminer.btminer.M3X.M30S_Plus_Plus.BTMinerM30SPlusPlusVG40] + * [VH60][pyasic.miners.whatsminer.btminer.M3X.M30S_Plus_Plus.BTMinerM30SPlusPlusVH60] * [M31S][pyasic.miners.whatsminer.btminer.M3X.M31S.BTMinerM31S] * [M31S+][pyasic.miners.whatsminer.btminer.M3X.M31S_Plus.BTMinerM31SPlus]: * [VE20][pyasic.miners.whatsminer.btminer.M3X.M31S_Plus.BTMinerM31SPlusVE20] diff --git a/docs/miners/whatsminer/M3X.md b/docs/miners/whatsminer/M3X.md index de77be8c..7dda1b65 100644 --- a/docs/miners/whatsminer/M3X.md +++ b/docs/miners/whatsminer/M3X.md @@ -89,7 +89,7 @@ show_root_heading: false heading_level: 4 -## M30S+VG40 +## M30S++VG40 ::: pyasic.miners.whatsminer.btminer.M3X.M30S_Plus_Plus.BTMinerM30SPlusPlusVG40 handler: python @@ -97,6 +97,14 @@ show_root_heading: false heading_level: 4 +## M30S++VH60 + +::: pyasic.miners.whatsminer.btminer.M3X.M30S_Plus_Plus.BTMinerM30SPlusPlusVH60 + handler: python + options: + show_root_heading: false + heading_level: 4 + ## M31S @@ -130,7 +138,7 @@ show_root_heading: false heading_level: 4 -## M32 +## M32V20 ::: pyasic.miners.whatsminer.btminer.M3X.M32.BTMinerM32V20 handler: python diff --git a/pyasic/data/error_codes/whatsminer.py b/pyasic/data/error_codes/whatsminer.py index b7593819..55effa3a 100644 --- a/pyasic/data/error_codes/whatsminer.py +++ b/pyasic/data/error_codes/whatsminer.py @@ -152,6 +152,7 @@ ERROR_CODES = { 2020: "Pool 0 connection failed.", 2021: "Pool 1 connection failed.", 2022: "Pool 2 connection failed.", + 2023: "Pool 3 connection failed.", 2030: "High rejection rate on pool.", 2040: "The pool does not support asicboost mode.", 2310: "Hashrate is too low.", diff --git a/pyasic/miners/_types/whatsminer/M3X/M30S_Plus_Plus.py b/pyasic/miners/_types/whatsminer/M3X/M30S_Plus_Plus.py index 6505cd8c..0ed26d4c 100644 --- a/pyasic/miners/_types/whatsminer/M3X/M30S_Plus_Plus.py +++ b/pyasic/miners/_types/whatsminer/M3X/M30S_Plus_Plus.py @@ -28,7 +28,7 @@ class M30SPlusPlusVG30(BaseMiner): def __init__(self, ip: str): super().__init__() self.ip = ip - self.model = "M30S++ V30" + self.model = "M30S++ VG30" self.nominal_chips = 111 self.fan_count = 2 @@ -37,6 +37,15 @@ class M30SPlusPlusVG40(BaseMiner): def __init__(self, ip: str): super().__init__() self.ip = ip - self.model = "M30S++ V40" + self.model = "M30S++ VG40" self.nominal_chips = 117 self.fan_count = 2 + + +class M30SPlusPlusVH60(BaseMiner): + def __init__(self, ip: str): + super().__init__() + self.ip = ip + self.model = "M30S++ VH60" + self.nominal_chips = 78 + self.fan_count = 2 diff --git a/pyasic/miners/_types/whatsminer/M3X/__init__.py b/pyasic/miners/_types/whatsminer/M3X/__init__.py index 6fa6e528..3829ec5b 100644 --- a/pyasic/miners/_types/whatsminer/M3X/__init__.py +++ b/pyasic/miners/_types/whatsminer/M3X/__init__.py @@ -14,7 +14,12 @@ from .M30S import M30S, M30SVE10, M30SVE20, M30SVG20, M30SV50 from .M30S_Plus import M30SPlus, M30SPlusVG60, M30SPlusVE40, M30SPlusVF20 -from .M30S_Plus_Plus import M30SPlusPlus, M30SPlusPlusVG30, M30SPlusPlusVG40 +from .M30S_Plus_Plus import ( + M30SPlusPlus, + M30SPlusPlusVG30, + M30SPlusPlusVG40, + M30SPlusPlusVH60, +) from .M31S import M31S from .M31S_Plus import M31SPlus, M31SPlusVE20 diff --git a/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus_Plus.py index 16562f00..d232c440 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus_Plus.py +++ b/pyasic/miners/whatsminer/btminer/M3X/M30S_Plus_Plus.py @@ -17,6 +17,7 @@ from pyasic.miners._types import ( # noqa - Ignore access to _module M30SPlusPlus, M30SPlusPlusVG40, M30SPlusPlusVG30, + M30SPlusPlusVH60, ) @@ -36,3 +37,9 @@ class BTMinerM30SPlusPlusVG40(BTMiner, M30SPlusPlusVG40): def __init__(self, ip: str) -> None: super().__init__(ip) self.ip = ip + + +class BTMinerM30SPlusPlusVH60(BTMiner, M30SPlusPlusVH60): + def __init__(self, ip: str) -> None: + super().__init__(ip) + self.ip = ip diff --git a/pyasic/miners/whatsminer/btminer/M3X/__init__.py b/pyasic/miners/whatsminer/btminer/M3X/__init__.py index df141ba4..6d94f60e 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/__init__.py +++ b/pyasic/miners/whatsminer/btminer/M3X/__init__.py @@ -29,6 +29,7 @@ from .M30S_Plus_Plus import ( BTMinerM30SPlusPlus, BTMinerM30SPlusPlusVG40, BTMinerM30SPlusPlusVG30, + BTMinerM30SPlusPlusVH60, ) from .M31S import BTMinerM31S