diff --git a/docs/miners/supported_types.md b/docs/miners/supported_types.md index c1ef4a4c..27a35437 100644 --- a/docs/miners/supported_types.md +++ b/docs/miners/supported_types.md @@ -59,6 +59,8 @@ details { + +
M3X Series:
diff --git a/docs/miners/whatsminer/M3X.md b/docs/miners/whatsminer/M3X.md index 2c69f90f..c8b72b7f 100644 --- a/docs/miners/whatsminer/M3X.md +++ b/docs/miners/whatsminer/M3X.md @@ -193,3 +193,19 @@ options: show_root_heading: false heading_level: 4 + +## M34S+ + +::: pyasic.miners.whatsminer.btminer.M3X.M34S_Plus.BTMinerM34SPlus + handler: python + options: + show_root_heading: false + heading_level: 4 + +## M34S+VE10 + +::: pyasic.miners.whatsminer.btminer.M3X.M34S_Plus.BTMinerM34SPlusVE10 + handler: python + options: + show_root_heading: false + heading_level: 4 diff --git a/pyasic/miners/_types/whatsminer/M3X/M34S_Plus.py b/pyasic/miners/_types/whatsminer/M3X/M34S_Plus.py new file mode 100644 index 00000000..64182846 --- /dev/null +++ b/pyasic/miners/_types/whatsminer/M3X/M34S_Plus.py @@ -0,0 +1,34 @@ +# Copyright 2022 Upstream Data Inc +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from pyasic.miners.base import BaseMiner + + +class M34SPlus(BaseMiner): + def __init__(self, ip: str): + super().__init__() + self.ip = ip + self.model = "M34S+" + # TODO: has 4 boards instead of 3 + self.nominal_chips = 464 + self.fan_count = 2 + + +class M34SPlusVE10(BaseMiner): + def __init__(self, ip: str): + super().__init__() + self.ip = ip + self.model = "M34S+ VE10" + self.nominal_chips = 464 + self.fan_count = 2 diff --git a/pyasic/miners/_types/whatsminer/M3X/__init__.py b/pyasic/miners/_types/whatsminer/M3X/__init__.py index 85cceed8..4955a7aa 100644 --- a/pyasic/miners/_types/whatsminer/M3X/__init__.py +++ b/pyasic/miners/_types/whatsminer/M3X/__init__.py @@ -34,3 +34,4 @@ from .M31S_Plus import ( from .M32 import M32, M32V20 from .M32S import M32S +from .M34S_Plus import M34SPlus, M34SPlusVE10 diff --git a/pyasic/miners/miner_factory.py b/pyasic/miners/miner_factory.py index 3e110369..e9433267 100644 --- a/pyasic/miners/miner_factory.py +++ b/pyasic/miners/miner_factory.py @@ -216,6 +216,11 @@ MINER_CLASSES = { "BTMiner": BTMinerM32, "20": BTMinerM32V20, }, + "M34S+": { + "Default": BTMinerM34SPlus, + "BTMiner": BTMinerM34SPlus, + "E10": BTMinerM34SPlusVE10, + }, "M50": { "Default": BTMinerM50, "BTMiner": BTMinerM50, diff --git a/pyasic/miners/whatsminer/btminer/M3X/M34S_Plus.py b/pyasic/miners/whatsminer/btminer/M3X/M34S_Plus.py new file mode 100644 index 00000000..af65a3a2 --- /dev/null +++ b/pyasic/miners/whatsminer/btminer/M3X/M34S_Plus.py @@ -0,0 +1,31 @@ +# Copyright 2022 Upstream Data Inc +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from pyasic.miners._backends import BTMiner # noqa - Ignore access to _module +from pyasic.miners._types import ( + M34SPlus, + M34SPlusVE10, +) # noqa - Ignore access to _module + + +class BTMinerM34SPlus(BTMiner, M34SPlus): + def __init__(self, ip: str) -> None: + super().__init__(ip) + self.ip = ip + + +class BTMinerM34SPlusVE10(BTMiner, M34SPlusVE10): + 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 53f85bc7..a09eb79d 100644 --- a/pyasic/miners/whatsminer/btminer/M3X/__init__.py +++ b/pyasic/miners/whatsminer/btminer/M3X/__init__.py @@ -45,3 +45,4 @@ from .M31S_Plus import ( from .M32 import BTMinerM32, BTMinerM32V20 from .M32S import BTMinerM32S +from .M34S_Plus import BTMinerM34SPlus, BTMinerM34SPlusVE10