Compare commits

...

8 Commits

Author SHA1 Message Date
UpstreamData
f5e15b4046 version: bump version number. 2023-06-19 16:10:34 -06:00
UpstreamData
e14df696ee feature: add partial support for M50S+VK20 2023-06-19 16:10:00 -06:00
UpstreamData
ce5dfad850 version: bump version number. 2023-06-12 13:04:11 -06:00
UpstreamData
5cb45390be bug: add chip count for avalon 1246. 2023-06-12 13:03:41 -06:00
UpstreamData
b5216a24a6 version: bump version number. 2023-06-12 12:47:58 -06:00
UpstreamData
dd175ff3a2 bug: fix an issue with 2020 versions of Braiins OS not identifying correctly. 2023-06-12 12:47:38 -06:00
UpstreamData
9b504a3157 version: bump version number. 2023-06-12 12:42:16 -06:00
UpstreamData
0bc3bf20ee bug: fix possible missing models. 2023-06-12 12:41:50 -06:00
10 changed files with 39 additions and 11 deletions

View File

@@ -370,7 +370,9 @@ class BOSMiner(BaseMiner):
return result.upper().strip()
async def get_model(self) -> Optional[str]:
return self.model + " (BOS)"
if self.model is not None:
return self.model + " (BOS)"
return "? (BOS)"
async def get_version(
self, api_version: dict = None, graphql_version: dict = None

View File

@@ -26,4 +26,6 @@ class Hiveon(BMMiner):
self.api_type = "Hiveon"
async def get_model(self) -> Optional[str]:
return self.model + " (Hiveon)"
if self.model is not None:
return self.model + " (Hiveon)"
return "? (Hiveon)"

View File

@@ -58,7 +58,9 @@ class VNish(BMMiner):
self.data_locations = VNISH_DATA_LOC
async def get_model(self) -> Optional[str]:
return self.model + " (VNISH)"
if self.model is not None:
return self.model + " (VNish)"
return "? (VNish)"
async def restart_backend(self) -> bool:
data = await self.web.restart_vnish()

View File

@@ -263,6 +263,7 @@ MINER_CLASSES = {
"M50S+VH30": BTMinerM50SPlusVH30,
"M50S+VH40": BTMinerM50SPlusVH40,
"M50S+VJ30": BTMinerM50SPlusVJ30,
"M50S+VK20": BTMinerM50SPlusVK20,
"M50S++VK10": BTMinerM50SPlusPlusVK10,
"M50S++VK20": BTMinerM50SPlusPlusVK20,
"M50S++VK30": BTMinerM50SPlusPlusVK30,
@@ -749,7 +750,9 @@ class MinerFactory:
async def get_miner_model_braiins_os(self, ip: str) -> Optional[str]:
sock_json_data = await self.send_api_command(ip, "devdetails")
try:
miner_model = sock_json_data["DEVDETAILS"][0]["Model"]
miner_model = sock_json_data["DEVDETAILS"][0]["Model"].replace(
"Bitmain ", ""
)
return miner_model
except (TypeError, LookupError):

View File

@@ -23,7 +23,5 @@ class Avalon1246(AvalonMiner): # noqa - ignore ABC method implementation
super().__init__(ip, api_ver)
self.ip = ip
self.model = "Avalon 1246"
warnings.warn(
f"Unknown chip count for miner type {self.model}, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
)
self.nominal_chips = 120
self.fan_count = 4

View File

@@ -53,3 +53,15 @@ class M50SPlusVJ30(WhatsMiner): # noqa - ignore ABC method implementation
"Unknown chip count for miner type M50S+ VJ30, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
)
self.fan_count = 2
class M50SPlusVK20(WhatsMiner): # noqa - ignore ABC method implementation
def __init__(self, ip: str, api_ver: str = "0.0.0"):
super().__init__(ip, api_ver)
self.ip = ip
self.model = "M50S+ VK20"
self.nominal_chips = 0
warnings.warn(
"Unknown chip count for miner type M50S+ VK20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
)
self.fan_count = 2

View File

@@ -38,7 +38,7 @@ from .M50S import (
M50SVJ20,
M50SVJ30,
)
from .M50S_Plus import M50SPlusVH30, M50SPlusVH40, M50SPlusVJ30
from .M50S_Plus import M50SPlusVH30, M50SPlusVH40, M50SPlusVJ30, M50SPlusVK20
from .M50S_Plus_Plus import M50SPlusPlusVK10, M50SPlusPlusVK20, M50SPlusPlusVK30
from .M53 import M53VH30
from .M53S import M53SVH30

View File

@@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import M5X
from pyasic.miners.types import M50SPlusVH30, M50SPlusVH40, M50SPlusVJ30
from pyasic.miners.types import M50SPlusVH30, M50SPlusVH40, M50SPlusVJ30, M50SPlusVK20
class BTMinerM50SPlusVH30(M5X, M50SPlusVH30):
@@ -28,3 +28,7 @@ class BTMinerM50SPlusVH40(M5X, M50SPlusVH40):
class BTMinerM50SPlusVJ30(M5X, M50SPlusVJ30):
pass
class BTMinerM50SPlusVK20(M5X, M50SPlusVK20):
pass

View File

@@ -38,7 +38,12 @@ from .M50S import (
BTMinerM50SVJ20,
BTMinerM50SVJ30,
)
from .M50S_Plus import BTMinerM50SPlusVH30, BTMinerM50SPlusVH40, BTMinerM50SPlusVJ30
from .M50S_Plus import (
BTMinerM50SPlusVH30,
BTMinerM50SPlusVH40,
BTMinerM50SPlusVJ30,
BTMinerM50SPlusVK20,
)
from .M50S_Plus_Plus import (
BTMinerM50SPlusPlusVK10,
BTMinerM50SPlusPlusVK20,

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyasic"
version = "0.33.23"
version = "0.34.3"
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"