Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9d5e7b206 | ||
|
|
2d8c7eb4fd | ||
|
|
f69e07fe68 | ||
|
|
84aab38954 | ||
|
|
dcf37481bd | ||
|
|
1a9cca84d5 |
@@ -77,6 +77,7 @@ details {
|
||||
<ul>
|
||||
<li><a href="../whatsminer/M3X/#m30svf20">VF20</a></li>
|
||||
<li><a href="../whatsminer/M3X/#m30sve40">VE40</a></li>
|
||||
<li><a href="../whatsminer/M3X/#m30svg40">VG40</a></li>
|
||||
<li><a href="../whatsminer/M3X/#m30svg60">VG60</a></li>
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
@@ -65,6 +65,14 @@
|
||||
show_root_heading: false
|
||||
heading_level: 4
|
||||
|
||||
## M30S+VG40
|
||||
|
||||
::: pyasic.miners.whatsminer.btminer.M3X.M30S_Plus.BTMinerM30SPlusVG40
|
||||
handler: python
|
||||
options:
|
||||
show_root_heading: false
|
||||
heading_level: 4
|
||||
|
||||
## M30S+VG60
|
||||
|
||||
::: pyasic.miners.whatsminer.btminer.M3X.M30S_Plus.BTMinerM30SPlusVG60
|
||||
|
||||
@@ -28,7 +28,7 @@ from pyasic.errors import APIError
|
||||
from pyasic.miners.base import BaseMiner
|
||||
from pyasic.settings import PyasicSettings
|
||||
|
||||
#TODO: Fix quota splitting in get data
|
||||
|
||||
class BOSMiner(BaseMiner):
|
||||
def __init__(self, ip: str) -> None:
|
||||
super().__init__(ip)
|
||||
@@ -327,7 +327,7 @@ class BOSMiner(BaseMiner):
|
||||
if board["Status"] not in [
|
||||
"Stable",
|
||||
"Testing performance profile",
|
||||
"Tuning individual chips"
|
||||
"Tuning individual chips",
|
||||
]:
|
||||
_error = board["Status"].split(" {")[0]
|
||||
_error = _error[0].lower() + _error[1:]
|
||||
@@ -471,6 +471,16 @@ class BOSMiner(BaseMiner):
|
||||
data.pool_2_user = pool_2_user
|
||||
|
||||
if quota:
|
||||
if not quota == "0":
|
||||
cfg = await self.get_config()
|
||||
if cfg:
|
||||
if len(cfg.pool_groups) > 1:
|
||||
quota = (
|
||||
str(cfg.pool_groups[0].quota)
|
||||
+ "/"
|
||||
+ str(cfg.pool_groups[1].quota)
|
||||
)
|
||||
|
||||
data.pool_split = str(quota)
|
||||
|
||||
if tunerstatus:
|
||||
@@ -558,9 +568,13 @@ class BOSMiner(BaseMiner):
|
||||
data.hostname = query_data["bos"]["hostname"]
|
||||
|
||||
try:
|
||||
if query_data["bosminer"]["info"]["workSolver"]["realHashrate"].get("mhs1M"):
|
||||
if query_data["bosminer"]["info"]["workSolver"]["realHashrate"].get(
|
||||
"mhs1M"
|
||||
):
|
||||
data.hashrate = round(
|
||||
query_data["bosminer"]["info"]["workSolver"]["realHashrate"]["mhs1M"]
|
||||
query_data["bosminer"]["info"]["workSolver"]["realHashrate"][
|
||||
"mhs1M"
|
||||
]
|
||||
/ 1000000,
|
||||
2,
|
||||
)
|
||||
@@ -571,9 +585,13 @@ class BOSMiner(BaseMiner):
|
||||
if query_data.get("bosminer"):
|
||||
if query_data["bosminer"].get("info"):
|
||||
if query_data["bosminer"]["info"].get("workSolver"):
|
||||
boards = query_data["bosminer"]["info"]["workSolver"].get("childSolvers")
|
||||
boards = query_data["bosminer"]["info"]["workSolver"].get(
|
||||
"childSolvers"
|
||||
)
|
||||
if boards:
|
||||
offset = 6 if int(boards[0]["name"]) in [6, 7, 8] else int(boards[0]["name"])
|
||||
offset = (
|
||||
6 if int(boards[0]["name"]) in [6, 7, 8] else int(boards[0]["name"])
|
||||
)
|
||||
for hb in boards:
|
||||
_id = int(hb["name"]) - offset
|
||||
|
||||
@@ -600,24 +618,33 @@ class BOSMiner(BaseMiner):
|
||||
if hb["tuner"]["statusMessages"][0] not in [
|
||||
"Stable",
|
||||
"Testing performance profile",
|
||||
"Tuning individual chips"
|
||||
"Tuning individual chips",
|
||||
]:
|
||||
data.errors.append(
|
||||
BraiinsOSError(f"Slot {_id} {hb['tuner']['statusMessages'][0]}")
|
||||
BraiinsOSError(
|
||||
f"Slot {_id} {hb['tuner']['statusMessages'][0]}"
|
||||
)
|
||||
)
|
||||
try:
|
||||
data.wattage = query_data["bosminer"]["info"]["workSolver"]["power"]["approxConsumptionW"]
|
||||
data.wattage = query_data["bosminer"]["info"]["workSolver"]["power"][
|
||||
"approxConsumptionW"
|
||||
]
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
data.wattage = 0
|
||||
try:
|
||||
data.wattage_limit = query_data["bosminer"]["info"]["workSolver"]["power"]["limitW"]
|
||||
data.wattage_limit = query_data["bosminer"]["info"]["workSolver"]["power"][
|
||||
"limitW"
|
||||
]
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
|
||||
|
||||
for n in range(self.fan_count):
|
||||
try:
|
||||
setattr(data, f"fan_{n + 1}", query_data["bosminer"]["info"]["fans"][n]["rpm"])
|
||||
setattr(
|
||||
data,
|
||||
f"fan_{n + 1}",
|
||||
query_data["bosminer"]["info"]["fans"][n]["rpm"],
|
||||
)
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
|
||||
@@ -632,7 +659,11 @@ class BOSMiner(BaseMiner):
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
try:
|
||||
data.pool_1_url = groups[0]["pools"][0]["url"]
|
||||
data.pool_1_url = (
|
||||
groups[0]["pools"][0]["url"]
|
||||
.replace("stratum+tcp://", "")
|
||||
.replace("stratum2+tcp://", "")
|
||||
)
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
try:
|
||||
@@ -640,7 +671,11 @@ class BOSMiner(BaseMiner):
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
try:
|
||||
data.pool_2_url = groups[0]["pools"][1]["url"]
|
||||
data.pool_2_url = (
|
||||
groups[0]["pools"][1]["url"]
|
||||
.replace("stratum+tcp://", "")
|
||||
.replace("stratum2+tcp://", "")
|
||||
)
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
data.quota = 0
|
||||
@@ -650,7 +685,11 @@ class BOSMiner(BaseMiner):
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
try:
|
||||
data.pool_1_url = groups[0]["pools"][0]["url"]
|
||||
data.pool_1_url = (
|
||||
groups[0]["pools"][0]["url"]
|
||||
.replace("stratum+tcp://", "")
|
||||
.replace("stratum2+tcp://", "")
|
||||
)
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
try:
|
||||
@@ -658,11 +697,19 @@ class BOSMiner(BaseMiner):
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
try:
|
||||
data.pool_2_url = groups[1]["pools"][0]["url"]
|
||||
data.pool_2_url = (
|
||||
groups[1]["pools"][0]["url"]
|
||||
.replace("stratum+tcp://", "")
|
||||
.replace("stratum2+tcp://", "")
|
||||
)
|
||||
except (TypeError, KeyError, ValueError, IndexError):
|
||||
pass
|
||||
if groups[0]["strategy"].get("quota"):
|
||||
data.quota = str(groups[0]["strategy"]["quota"]) + "/" + str(groups[1]["strategy"]["quota"])
|
||||
data.pool_split = (
|
||||
str(groups[0]["strategy"]["quota"])
|
||||
+ "/"
|
||||
+ str(groups[1]["strategy"]["quota"])
|
||||
)
|
||||
|
||||
data.fault_light = await self.check_light()
|
||||
|
||||
|
||||
@@ -32,6 +32,14 @@ class M30SPlusVG60(BaseMiner): # noqa - ignore ABC method implementation
|
||||
self.nominal_chips = 86
|
||||
self.fan_count = 2
|
||||
|
||||
class M30SPlusVG40(BaseMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str):
|
||||
super().__init__()
|
||||
self.ip = ip
|
||||
self.model = "M30S+ VG40"
|
||||
self.nominal_chips = 105
|
||||
self.fan_count = 2
|
||||
|
||||
|
||||
class M30SPlusVE40(BaseMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str):
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
from .M30S import M30S, M30SV50, M30SVE10, M30SVE20, M30SVG20
|
||||
from .M30S_Plus import M30SPlus, M30SPlusVE40, M30SPlusVF20, M30SPlusVG60
|
||||
from .M30S_Plus import M30SPlus, M30SPlusVE40, M30SPlusVF20, M30SPlusVG60, M30SPlusVG40
|
||||
from .M30S_Plus_Plus import (
|
||||
M30SPlusPlus,
|
||||
M30SPlusPlusVG30,
|
||||
|
||||
@@ -183,6 +183,7 @@ MINER_CLASSES = {
|
||||
"BTMiner": BTMinerM30SPlus,
|
||||
"F20": BTMinerM30SPlusVF20,
|
||||
"E40": BTMinerM30SPlusVE40,
|
||||
"G40": BTMinerM30SPlusVG40,
|
||||
"G60": BTMinerM30SPlusVG60,
|
||||
},
|
||||
"M30S++": {
|
||||
|
||||
@@ -18,6 +18,7 @@ from pyasic.miners._types import ( # noqa - Ignore access to _module
|
||||
M30SPlusVE40,
|
||||
M30SPlusVF20,
|
||||
M30SPlusVG60,
|
||||
M30SPlusVG40,
|
||||
)
|
||||
|
||||
|
||||
@@ -39,6 +40,12 @@ class BTMinerM30SPlusVE40(BTMiner, M30SPlusVE40):
|
||||
self.ip = ip
|
||||
|
||||
|
||||
class BTMinerM30SPlusVG40(BTMiner, M30SPlusVG40):
|
||||
def __init__(self, ip: str) -> None:
|
||||
super().__init__(ip)
|
||||
self.ip = ip
|
||||
|
||||
|
||||
class BTMinerM30SPlusVG60(BTMiner, M30SPlusVG60):
|
||||
def __init__(self, ip: str) -> None:
|
||||
super().__init__(ip)
|
||||
|
||||
@@ -23,6 +23,7 @@ from .M30S_Plus import (
|
||||
BTMinerM30SPlus,
|
||||
BTMinerM30SPlusVE40,
|
||||
BTMinerM30SPlusVF20,
|
||||
BTMinerM30SPlusVG40,
|
||||
BTMinerM30SPlusVG60,
|
||||
)
|
||||
from .M30S_Plus_Plus import (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pyasic"
|
||||
version = "0.24.1"
|
||||
version = "0.24.4"
|
||||
description = "A set of modules for interfacing with many common types of ASIC bitcoin miners, using both their API and SSH."
|
||||
authors = ["UpstreamData <brett@upstreamdata.ca>"]
|
||||
repository = "https://github.com/UpstreamData/pyasic"
|
||||
|
||||
Reference in New Issue
Block a user