Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e2d3aeebd | ||
|
|
0cead26872 | ||
|
|
706844264b | ||
|
|
3257af975a | ||
|
|
83a4f86e15 |
@@ -182,7 +182,10 @@ If you are sure you want to use this command please use API.send_command("{comma
|
||||
writer.write(data)
|
||||
logging.debug(f"{self} - ([Hidden] Send Bytes) - Draining")
|
||||
await writer.drain()
|
||||
ret_data = await asyncio.wait_for(reader.read(4096), timeout=timeout)
|
||||
try:
|
||||
ret_data = await asyncio.wait_for(reader.read(4096), timeout=timeout)
|
||||
except ConnectionAbortedError:
|
||||
return b"{}"
|
||||
try:
|
||||
# Fix for stupid whatsminer bug, reboot/restart seem to not load properly in the loop
|
||||
# have to receive, save the data, check if there is more data by reading with a short timeout
|
||||
|
||||
@@ -256,7 +256,7 @@ class BaseMiner(ABC):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def get_hashboards(self, *args, **kwargs) -> list[HashBoard]:
|
||||
async def get_hashboards(self, *args, **kwargs) -> List[HashBoard]:
|
||||
"""Get hashboard data from the miner in the form of [`HashBoard`][pyasic.data.HashBoard].
|
||||
|
||||
Returns:
|
||||
|
||||
26
pyasic/miners/btc/_types/antminer/X9/S9j.py
Normal file
26
pyasic/miners/btc/_types/antminer/X9/S9j.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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.makes import AntMiner
|
||||
|
||||
|
||||
class S9j(AntMiner): # 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 = "S9j"
|
||||
self.nominal_chips = 63
|
||||
self.fan_count = 2
|
||||
@@ -16,4 +16,5 @@
|
||||
|
||||
from .S9 import S9
|
||||
from .S9i import S9i
|
||||
from .S9j import S9j
|
||||
from .T9 import T9
|
||||
|
||||
22
pyasic/miners/btc/antminer/bmminer/X9/S9j.py
Normal file
22
pyasic/miners/btc/antminer/bmminer/X9/S9j.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# 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 BMMiner
|
||||
from pyasic.miners.btc._types import S9j # noqa - Ignore access to _module
|
||||
|
||||
|
||||
class BMMinerS9j(BMMiner, S9j):
|
||||
pass
|
||||
@@ -16,4 +16,5 @@
|
||||
|
||||
from .S9 import BMMinerS9
|
||||
from .S9i import BMMinerS9i
|
||||
from .S9j import BMMinerS9j
|
||||
from .T9 import BMMinerT9
|
||||
|
||||
@@ -83,6 +83,10 @@ MINER_CLASSES = {
|
||||
"Default": BMMinerS9i,
|
||||
"BMMiner": BMMinerS9i,
|
||||
},
|
||||
"ANTMINER S9J": {
|
||||
"Default": BMMinerS9j,
|
||||
"BMMiner": BMMinerS9j,
|
||||
},
|
||||
"ANTMINER T9": {
|
||||
"Default": BMMinerT9,
|
||||
"BMMiner": BMMinerT9,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pyasic"
|
||||
version = "0.33.11"
|
||||
version = "0.33.13"
|
||||
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