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