Compare commits

...

29 Commits

Author SHA1 Message Date
UpstreamData
efd7c9bf87 version: bump version number. 2023-06-12 10:15:19 -06:00
UpstreamData
708d48dcc7 bug: fix caching, and update references to MinerFactory() to miner_factory 2023-06-12 10:14:20 -06:00
UpstreamData
44d6e4cdd4 feature: add caching to miner factory. 2023-06-12 09:44:47 -06:00
UpstreamData
b823e13694 refactor: refactor the format of miner types. 2023-06-09 11:42:25 -06:00
UpstreamData
442b21810d bug: fix not instantiating some web sessions properly. 2023-06-08 16:23:00 -06:00
UpstreamData
a2553aab9d bug: fix some naming issues, and add timeout to getting miner model. 2023-06-08 16:14:11 -06:00
UpstreamData
7cef0b3d3c feature: refactor get_miner to allow models to be selected as strings then selected in the top level get_miner function. 2023-06-08 09:33:55 -06:00
UpstreamData
6875ef54bd feature: add Avalonminer support in update miner factory, and add support for A1166 and A1246. 2023-06-07 15:53:07 -06:00
UpstreamData
22f2e2edcd bug: remove some redundant .upper() calls. 2023-06-07 13:46:18 -06:00
UpstreamData
3b1ad46a1a bug: remove some redundant .upper() calls. 2023-06-07 13:45:32 -06:00
UpstreamData
0b9df0f7c4 feature: refactor miner class list to be much more readable. 2023-06-07 13:44:50 -06:00
UpstreamData
c56686a18d feature: refactor to aiohttp and fix a lot of bugs with factory. Still needs support for some miners. 2023-06-07 11:37:52 -06:00
UpstreamData
d6a42238d0 feature: Start refactor to new style of get_miner. Needs testing and stability fixes. 2023-06-05 09:03:49 -06:00
UpstreamData
a2bb8b5d9b version: bump version number. 2023-06-02 09:29:42 -06:00
UpstreamData
62aaf36fd7 bug: re-order config sent to S19 to be consistent with stock. 2023-06-02 09:28:50 -06:00
UpstreamData
63023650a9 version: bump version number. 2023-06-01 09:57:21 -06:00
UpstreamData
0025c613f0 bug: fix 2 AA's in AANTMINER. 2023-06-01 09:56:54 -06:00
UpstreamData
e4ec3b2b28 version: bump version number. 2023-06-01 09:45:26 -06:00
UpstreamData
08af02a394 bug: fix wrong constructor for S19Pro+. 2023-06-01 09:45:05 -06:00
UpstreamData
afca497d8a version: bump version number. 2023-06-01 09:03:31 -06:00
UpstreamData
d50896a896 bug: add support for S19ProPlus 2023-06-01 09:02:54 -06:00
UpstreamData
117737afb5 version: bump version number. 2023-05-29 11:40:56 -06:00
UpstreamData
eabae92da6 bug: fix some issues with S19j88NoPic on braiinsOS. 2023-05-29 11:40:08 -06:00
Upstream Data
f816551d7a version: bump version number. 2023-05-25 21:10:04 -06:00
Upstream Data
4e3ea4eabb feature: add support for M50S++ models. 2023-05-25 21:08:47 -06:00
UpstreamData
74c13806fb bug: fix incorrect variable name in avalonminers. 2023-05-23 15:07:33 -06:00
UpstreamData
934d469def version: bump version number. 2023-05-23 09:37:23 -06:00
UpstreamData
0c563ef538 bug: Fix bad type hinting on ABCMeta instead of type. 2023-05-23 09:36:50 -06:00
Upstream Data
ecc76d09af bug: add chip count for M32V10. 2023-05-21 19:38:37 -06:00
346 changed files with 1770 additions and 4061 deletions

View File

@@ -215,7 +215,7 @@ class _PoolGroup:
return pools
def as_x17(self, user_suffix: str = None) -> dict:
"""Convert the data in this class to a list usable by an X5 device.
"""Convert the data in this class to a list usable by an X17 device.
Parameters:
user_suffix: The suffix to append to username.
@@ -547,11 +547,11 @@ class MinerConfig:
"""
logging.debug(f"MinerConfig - (As X19) - Generating X19 config")
cfg = {
"pools": self.pool_groups[0].as_x19(user_suffix=user_suffix),
"bitmain-fan-ctrl": False,
"bitmain-fan-pwn": "100",
"freq-level": "100",
"miner-mode": str(self.miner_mode.value),
"freq-level": "100"
"pools": self.pool_groups[0].as_x19(user_suffix=user_suffix),
}
if not self.temp_mode == "auto":

View File

@@ -19,21 +19,8 @@ from typing import List, Union
from pyasic.errors import APIError
from pyasic.miners import AnyMiner
from pyasic.miners.backends import ( # noqa - Ignore access to _module
AntminerModern,
BOSMiner,
BTMiner,
)
from pyasic.miners.btc._types import ( # noqa - Ignore access to _module
S9,
S17,
T17,
S17e,
S17Plus,
S17Pro,
T17e,
T17Plus,
)
from pyasic.miners.backends import AntminerModern, BOSMiner, BTMiner
from pyasic.miners.types import S9, S17, T17, S17e, S17Plus, S17Pro, T17e, T17Plus
FAN_USAGE = 50 # 50 W per fan

View File

@@ -18,9 +18,9 @@ import ipaddress
from typing import Union
from pyasic.miners.base import AnyMiner, BaseMiner
from pyasic.miners.miner_factory import MinerFactory
from pyasic.miners.miner_factory import miner_factory
# abstracted version of get miner that is easier to access
async def get_miner(ip: Union[ipaddress.ip_address, str]) -> AnyMiner:
return await MinerFactory().get_miner(ip)
return await miner_factory.get_miner(ip)

View File

@@ -14,10 +14,21 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.btc._types import S17e # noqa - Ignore access to _module
from .X17 import BMMinerX17
from pyasic.miners.backends import AntminerOld
from pyasic.miners.types import S17, S17e, S17Plus, S17Pro
class BMMinerS17e(BMMinerX17, S17e):
class BMMinerS17(AntminerOld, S17):
pass
class BMMinerS17Plus(AntminerOld, S17Plus):
pass
class BMMinerS17Pro(AntminerOld, S17Pro):
pass
class BMMinerS17e(AntminerOld, S17e):
pass

View File

@@ -15,9 +15,16 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerOld
from pyasic.miners.ltc._types import L3Plus # noqa - Ignore access to _module
from pyasic.miners.types import T17, T17e, T17Plus
class BMMinerL3Plus(AntminerOld, L3Plus):
def __init__(self, ip: str, api_ver: str = "0.0.0"):
super().__init__(ip, api_ver)
class BMMinerT17(AntminerOld, T17):
pass
class BMMinerT17Plus(AntminerOld, T17Plus):
pass
class BMMinerT17e(AntminerOld, T17e):
pass

View File

@@ -0,0 +1,18 @@
# ------------------------------------------------------------------------------
# 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 .S17 import BMMinerS17, BMMinerS17e, BMMinerS17Plus, BMMinerS17Pro
from .T17 import BMMinerT17, BMMinerT17e, BMMinerT17Plus

View File

@@ -15,10 +15,55 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerModern
from pyasic.miners.btc._types import S19jPro # noqa - Ignore access to _module
from pyasic.miners.types import (
S19,
S19L,
S19XP,
S19a,
S19aPro,
S19j,
S19jNoPIC,
S19jPro,
S19Pro,
S19ProPlus,
)
# noqa - Ignore access to _module
class BMMinerS19(AntminerModern, S19):
pass
class BMMinerS19Pro(AntminerModern, S19Pro):
pass
class BMMinerS19ProPlus(AntminerModern, S19ProPlus):
pass
class BMMinerS19XP(AntminerModern, S19XP):
pass
class BMMinerS19a(AntminerModern, S19a):
pass
class BMMinerS19aPro(AntminerModern, S19aPro):
pass
class BMMinerS19j(AntminerModern, S19j):
pass
class BMMinerS19jNoPIC(AntminerModern, S19jNoPIC):
pass
class BMMinerS19jPro(AntminerModern, S19jPro):
pass
class BMMinerS19L(AntminerModern, S19L):
pass

View File

@@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerModern
from pyasic.miners.btc._types import T19 # noqa - Ignore access to _module
from pyasic.miners.types import T19
# noqa - Ignore access to _module

View File

@@ -14,10 +14,16 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from .S17 import S17
from .S17_Plus import S17Plus
from .S17_Pro import S17Pro
from .S17e import S17e
from .T17 import T17
from .T17_Plus import T17Plus
from .T17e import T17e
from .S19 import (
BMMinerS19,
BMMinerS19a,
BMMinerS19aPro,
BMMinerS19j,
BMMinerS19jNoPIC,
BMMinerS19jPro,
BMMinerS19L,
BMMinerS19Pro,
BMMinerS19ProPlus,
BMMinerS19XP,
)
from .T19 import BMMinerT19

View File

@@ -15,10 +15,10 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerModern
from pyasic.miners.hns._types import HS3 # noqa - Ignore access to _module
from pyasic.miners.types import HS3
class CGMinerHS3(AntminerModern, HS3):
class BMMinerHS3(AntminerModern, HS3):
def __init__(self, ip: str, api_ver: str = "0.0.0"):
super().__init__(ip, api_ver)
self.supports_shutdown = False

View File

@@ -14,8 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.backends import CGMinerAvalon # noqa - Ignore access to _module
from pyasic.miners.backends import AntminerOld
from pyasic.miners.types import L3Plus
class CGMinerA8X(CGMinerAvalon):
class BMMinerL3Plus(AntminerOld, L3Plus):
pass

View File

@@ -13,5 +13,5 @@
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from .T3H_Plus import InnosiliconT3HPlus
from .HS3 import BMMinerHS3
from .L3 import BMMinerL3Plus

View File

@@ -14,7 +14,7 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerModern
from pyasic.miners.ltc._types import L7 # noqa - Ignore access to _module
from pyasic.miners.types import L7
class BMMinerL7(AntminerModern, L7):

View File

@@ -15,10 +15,10 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerModern
from pyasic.miners.etc._types import E9Pro # noqa - Ignore access to _module
from pyasic.miners.types import E9Pro
class CGMinerE9Pro(AntminerModern, E9Pro):
class BMMinerE9Pro(AntminerModern, E9Pro):
def __init__(self, ip: str, api_ver: str = "0.0.0"):
super().__init__(ip, api_ver)
self.supports_shutdown = False

View File

@@ -15,8 +15,16 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import BMMiner
from pyasic.miners.btc._types import S9i # noqa - Ignore access to _module
from pyasic.miners.types import S9, S9i, S9j
class BMMinerS9(BMMiner, S9):
pass
class BMMinerS9i(BMMiner, S9i):
pass
class BMMinerS9j(BMMiner, S9j):
pass

View File

@@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import BMMiner
from pyasic.miners.btc._types import T9 # noqa - Ignore access to _module
from pyasic.miners.types import T9
class BMMinerT9(BMMiner, T9):

View File

@@ -14,7 +14,6 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from .S9 import BMMinerS9
from .S9i import BMMinerS9i
from .S9j import BMMinerS9j
from .E9 import BMMinerE9Pro
from .S9 import BMMinerS9, BMMinerS9i, BMMinerS9j
from .T9 import BMMinerT9

View File

@@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from .X3 import *
from .X7 import *
from .X9 import *
from .X17 import *
from .X19 import *

View File

@@ -15,8 +15,20 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import BOSMiner
from pyasic.miners.btc._types import S17Plus # noqa - Ignore access to _module
from pyasic.miners.types import S17, S17e, S17Plus, S17Pro
class BOSMinerS17(BOSMiner, S17):
pass
class BOSMinerS17Plus(BOSMiner, S17Plus):
pass
class BOSMinerS17Pro(BOSMiner, S17Pro):
pass
class BOSMinerS17e(BOSMiner, S17e):
pass

View File

@@ -15,8 +15,16 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import BOSMiner
from pyasic.miners.btc._types import T17Plus # noqa - Ignore access to _module
from pyasic.miners.types import T17, T17e, T17Plus
class BOSMinerT17(BOSMiner, T17):
pass
class BOSMinerT17Plus(BOSMiner, T17Plus):
pass
class BOSMinerT17e(BOSMiner, T17e):
pass

View File

@@ -0,0 +1,18 @@
# ------------------------------------------------------------------------------
# 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 .S17 import BOSMinerS17, BOSMinerS17e, BOSMinerS17Plus, BOSMinerS17Pro
from .T17 import BOSMinerT17, BOSMinerT17e, BOSMinerT17Plus

View File

@@ -15,7 +15,23 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import BOSMiner
from pyasic.miners.btc._types import S19jPro # noqa - Ignore access to _module
from pyasic.miners.types import S19, S19j, S19jNoPIC, S19jPro, S19Pro
class BOSMinerS19(BOSMiner, S19):
pass
class BOSMinerS19Pro(BOSMiner, S19Pro):
pass
class BOSMinerS19j(BOSMiner, S19j):
pass
class BOSMinerS19jNoPIC(BOSMiner, S19jNoPIC):
pass
class BOSMinerS19jPro(BOSMiner, S19jPro):

View File

@@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import BOSMiner
from pyasic.miners.btc._types import T19 # noqa - Ignore access to _module
from pyasic.miners.types import T19
class BOSMinerT19(BOSMiner, T19):

View File

@@ -14,8 +14,11 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from .S19 import BOSMinerS19
from .S19_Pro import BOSMinerS19Pro
from .S19j import BOSMinerS19j
from .S19j_Pro import BOSMinerS19jPro
from .S19 import (
BOSMinerS19,
BOSMinerS19j,
BOSMinerS19jNoPIC,
BOSMinerS19jPro,
BOSMinerS19Pro,
)
from .T19 import BOSMinerT19

View File

@@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import BOSMiner
from pyasic.miners.btc._types import S9 # noqa - Ignore access to _module
from pyasic.miners.types import S9
class BOSMinerS9(BOSMiner, S9):

View File

@@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerOld
from pyasic.miners.zec._types import Z15 # noqa - Ignore access to _module
from pyasic.miners.types import Z15
class CGMinerZ15(AntminerOld, Z15):

View File

@@ -13,9 +13,8 @@
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerOld
from pyasic.miners.dsh._types import D3 # noqa - Ignore access to _module
from pyasic.miners.types import D3
class CGMinerD3(AntminerOld, D3):

View File

@@ -13,4 +13,5 @@
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from .D3 import CGMinerD3

View File

@@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerOld
from pyasic.miners.dcr._types import DR5 # noqa - Ignore access to _module
from pyasic.miners.types import DR5
class CGMinerDR5(AntminerOld, DR5):

View File

@@ -13,4 +13,7 @@
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from .X3 import *
from .X5 import *
from .X15 import *

View File

@@ -20,8 +20,8 @@ import asyncssh
from pyasic.data import HashBoard
from pyasic.errors import APIError
from pyasic.miners.backends import Hiveon # noqa - Ignore access to _module
from pyasic.miners.btc._types import T9 # noqa - Ignore access to _module
from pyasic.miners.backends import Hiveon
from pyasic.miners.types import T9
class HiveonT9(Hiveon, T9):

View File

@@ -14,8 +14,32 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.backends import VNish # noqa - Ignore access to _module
from pyasic.miners.btc._types import S19jPro # noqa - Ignore access to _module
from pyasic.miners.backends import VNish
from pyasic.miners.types import S19, S19XP, S19a, S19aPro, S19j, S19jPro, S19Pro
class VNishS19(VNish, S19):
pass
class VNishS19Pro(VNish, S19Pro):
pass
class VNishS19XP(VNish, S19XP):
pass
class VNishS19a(VNish, S19a):
pass
class VNishS19aPro(VNish, S19aPro):
pass
class VNishS19j(VNish, S19j):
pass
class VNishS19jPro(VNish, S19jPro):

View File

@@ -14,8 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.backends import CGMinerAvalon # noqa - Ignore access to _module
from pyasic.miners.backends import VNish
from pyasic.miners.types import T19
class CGMinerA7X(CGMinerAvalon):
class VNishT19(VNish, T19):
pass

View 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 .S19 import (
VNishS19,
VNishS19a,
VNishS19aPro,
VNishS19j,
VNishS19jPro,
VNishS19Pro,
VNishS19XP,
)
from .T19 import VNishT19

View File

@@ -15,7 +15,7 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import VNish
from pyasic.miners.ltc._types import L3Plus # noqa - Ignore access to _module
from pyasic.miners.types import L3Plus
class VnishL3Plus(VNish, L3Plus):

View File

@@ -14,4 +14,4 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from .T3X import *
from .L3 import VnishL3Plus

View File

@@ -14,4 +14,5 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from .X3 import *
from .X19 import *

View File

@@ -14,10 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.btc._types import Avalon1026 # noqa - Ignore access to _module
from .A10X import CGMinerA10X
from pyasic.miners.backends import CGMinerAvalon
from pyasic.miners.types import Avalon1026
class CGMinerAvalon1026(CGMinerA10X, Avalon1026):
class CGMinerAvalon1026(CGMinerAvalon, Avalon1026):
pass

View File

@@ -14,10 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.btc._types import Avalon1047 # noqa - Ignore access to _module
from .A10X import CGMinerA10X
from pyasic.miners.backends import CGMinerAvalon
from pyasic.miners.types import Avalon1047
class CGMinerAvalon1047(CGMinerA10X, Avalon1047):
class CGMinerAvalon1047(CGMinerAvalon, Avalon1047):
pass

View File

@@ -14,10 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.btc._types import Avalon1066 # noqa - Ignore access to _module
from .A10X import CGMinerA10X
from pyasic.miners.backends import CGMinerAvalon
from pyasic.miners.types import Avalon1066
class CGMinerAvalon1066(CGMinerA10X, Avalon1066):
class CGMinerAvalon1066(CGMinerAvalon, Avalon1066):
pass

View File

@@ -14,10 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.btc._types import S17Plus # noqa - Ignore access to _module
from .X17 import BMMinerX17
from pyasic.miners.backends import CGMinerAvalon
from pyasic.miners.types import Avalon1166Pro
class BMMinerS17Plus(BMMinerX17, S17Plus):
class CGMinerAvalon1166Pro(CGMinerAvalon, Avalon1166Pro):
pass

View File

@@ -0,0 +1,17 @@
# ------------------------------------------------------------------------------
# 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 .A1166 import CGMinerAvalon1166Pro

View File

@@ -14,10 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.btc._types import T17e # noqa - Ignore access to _module
from .X17 import BMMinerX17
from pyasic.miners.backends import CGMinerAvalon
from pyasic.miners.types import Avalon1246
class BMMinerT17e(BMMinerX17, T17e):
class CGMinerAvalon1246(CGMinerAvalon, Avalon1246):
pass

View File

@@ -0,0 +1,17 @@
# ------------------------------------------------------------------------------
# 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 .A1246 import CGMinerAvalon1246

View File

@@ -14,10 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.btc._types import S17 # noqa - Ignore access to _module
from .X17 import BMMinerX17
from pyasic.miners.backends import CGMinerAvalon
from pyasic.miners.types import Avalon721
class BMMinerS17(BMMinerX17, S17):
class CGMinerAvalon721(CGMinerAvalon, Avalon721):
pass

View File

@@ -14,10 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.btc._types import T17 # noqa - Ignore access to _module
from .X17 import BMMinerX17
from pyasic.miners.backends import CGMinerAvalon
from pyasic.miners.types import Avalon741
class BMMinerT17(BMMinerX17, T17):
class CGMinerAvalon741(CGMinerAvalon, Avalon741):
pass

View File

@@ -14,8 +14,9 @@
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.backends import CGMinerAvalon # noqa - Ignore access to _module
from pyasic.miners.backends import CGMinerAvalon
from pyasic.miners.types import Avalon761
class CGMinerA10X(CGMinerAvalon):
class CGMinerAvalon761(CGMinerAvalon, Avalon761):
pass

View 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 CGMinerAvalon
from pyasic.miners.types import Avalon821
class CGMinerAvalon821(CGMinerAvalon, Avalon821):
pass

View 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 CGMinerAvalon
from pyasic.miners.types import Avalon841
class CGMinerAvalon841(CGMinerAvalon, Avalon841):
pass

View 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 CGMinerAvalon
from pyasic.miners.types import Avalon851
class CGMinerAvalon851(CGMinerAvalon, Avalon851):
pass

View 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 CGMinerAvalon
from pyasic.miners.types import Avalon921
class CGMinerAvalon921(CGMinerAvalon, Avalon921):
pass

View File

@@ -18,3 +18,5 @@ from .A7X import *
from .A8X import *
from .A9X import *
from .A10X import *
from .A11X import *
from .A12X import *

View File

@@ -40,7 +40,7 @@ class BaseMiner(ABC):
self.model = None
# physical attributes
self.ideal_hashboards = 3
self.nominal_chips = 1
self.nominal_chips = 0
self.fan_count = 2
# data gathering locations
self.data_locations = None

View File

@@ -1,19 +0,0 @@
# ------------------------------------------------------------------------------
# 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 .antminer import *
from .avalonminer import *
from .innosilicon import *
from .whatsminer import *

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S17(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 = "S17"
self.nominal_chips = 48
self.fan_count = 4

View File

@@ -1,25 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S17Plus(AntMiner): # noqa - ignore ABC method implementation
def __init__(self, ip: str, api_ver: str = "0.0.0"):
super().__init__(ip, api_ver)
self.model = "S17+"
self.nominal_chips = 65
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S17e(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 = "S17e"
self.nominal_chips = 135
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 T17(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 = "T17"
self.nominal_chips = 30
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 T17e(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 = "T17e"
self.nominal_chips = 78
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S19(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 = "S19"
self.nominal_chips = 76
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S19Pro(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 = "S19 Pro"
self.nominal_chips = 114
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S19XP(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 = "S19 XP"
self.nominal_chips = 110
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S19a(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 = "S19a"
self.nominal_chips = 72
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S19aPro(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 = "S19a Pro"
self.nominal_chips = 100
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S19j(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 = "S19j"
self.nominal_chips = 114
self.fan_count = 4

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S19jPro(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 = "S19j Pro"
self.nominal_chips = 126
self.fan_count = 4

View File

@@ -1,25 +0,0 @@
# ------------------------------------------------------------------------------
# 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 .S19 import S19
from .S19_Pro import S19Pro
from .S19_XP import S19XP
from .S19a import S19a
from .S19a_Pro import S19aPro
from .S19j import S19j
from .S19j_Pro import S19jPro
from .S19L import S19L
from .T19 import T19

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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 S9(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 = "S9"
self.nominal_chips = 63
self.fan_count = 2

View File

@@ -1,26 +0,0 @@
# ------------------------------------------------------------------------------
# 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

View File

@@ -1,18 +0,0 @@
# ------------------------------------------------------------------------------
# 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 .X9 import *
from .X17 import *
from .X19 import *

View File

@@ -1,23 +0,0 @@
# ------------------------------------------------------------------------------
# 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.btc._types import T17Plus # noqa - Ignore access to _module
from .X17 import BMMinerX17
class BMMinerT17Plus(BMMinerX17, T17Plus):
pass

View File

@@ -1,83 +0,0 @@
# ------------------------------------------------------------------------------
# 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 typing import Union
from pyasic.miners.backends import BMMiner
from pyasic.web.antminer import AntminerOldWebAPI
class BMMinerX17(BMMiner):
def __init__(self, ip: str, api_ver: str = "0.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
self.web = AntminerOldWebAPI(ip)
async def get_mac(self) -> Union[str, None]:
try:
data = await self.web.get_system_info()
if data:
return data["macaddr"]
except KeyError:
pass
async def fault_light_on(self) -> bool:
# this should time out, after it does do a check
await self.web.blink(blink=True)
try:
data = await self.web.get_blink_status()
if data:
if data["isBlinking"]:
self.light = True
except KeyError:
pass
return self.light
async def fault_light_off(self) -> bool:
await self.web.blink(blink=False)
try:
data = await self.web.get_blink_status()
if data:
if not data["isBlinking"]:
self.light = False
except KeyError:
pass
return self.light
async def reboot(self) -> bool:
data = await self.web.reboot()
if data:
return True
return False
async def get_fault_light(self) -> bool:
if self.light:
return self.light
try:
data = await self.web.get_blink_status()
if data:
self.light = data["isBlinking"]
except KeyError:
pass
return self.light
async def get_hostname(self) -> Union[str, None]:
try:
data = await self.web.get_system_info()
if data:
return data["hostname"]
except KeyError:
pass

View File

@@ -1,23 +0,0 @@
# ------------------------------------------------------------------------------
# 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 .S17 import BMMinerS17
from .S17_Plus import BMMinerS17Plus
from .S17_Pro import BMMinerS17Pro
from .S17e import BMMinerS17e
from .T17 import BMMinerT17
from .T17_Plus import BMMinerT17Plus
from .T17e import BMMinerT17e

View File

@@ -1,24 +0,0 @@
# ------------------------------------------------------------------------------
# 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 AntminerModern
from pyasic.miners.btc._types import S19 # noqa - Ignore access to _module
# noqa - Ignore access to _module
class BMMinerS19(AntminerModern, S19):
pass

View File

@@ -1,22 +0,0 @@
# ------------------------------------------------------------------------------
# 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 AntminerModern
from pyasic.miners.btc._types import S19L # noqa - Ignore access to _module
class BMMinerS19L(AntminerModern, S19L):
pass

View File

@@ -1,24 +0,0 @@
# ------------------------------------------------------------------------------
# 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 AntminerModern
from pyasic.miners.btc._types import S19Pro # noqa - Ignore access to _module
# noqa - Ignore access to _module
class BMMinerS19Pro(AntminerModern, S19Pro):
pass

View File

@@ -1,24 +0,0 @@
# ------------------------------------------------------------------------------
# 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 AntminerModern
from pyasic.miners.btc._types import S19XP # noqa - Ignore access to _module
# noqa - Ignore access to _module
class BMMinerS19XP(AntminerModern, S19XP):
pass

View File

@@ -1,24 +0,0 @@
# ------------------------------------------------------------------------------
# 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 AntminerModern
from pyasic.miners.btc._types import S19a # noqa - Ignore access to _module
# noqa - Ignore access to _module
class BMMinerS19a(AntminerModern, S19a):
pass

View File

@@ -1,24 +0,0 @@
# ------------------------------------------------------------------------------
# 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 AntminerModern
from pyasic.miners.btc._types import S19aPro # noqa - Ignore access to _module
# noqa - Ignore access to _module
class BMMinerS19aPro(AntminerModern, S19aPro):
pass

View File

@@ -1,24 +0,0 @@
# ------------------------------------------------------------------------------
# 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 AntminerModern
from pyasic.miners.btc._types import S19j # noqa - Ignore access to _module
# noqa - Ignore access to _module
class BMMinerS19j(AntminerModern, S19j):
pass

View File

@@ -1,25 +0,0 @@
# ------------------------------------------------------------------------------
# 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 .S19 import BMMinerS19
from .S19_Pro import BMMinerS19Pro
from .S19_XP import BMMinerS19XP
from .S19a import BMMinerS19a
from .S19a_Pro import BMMinerS19aPro
from .S19j import BMMinerS19j
from .S19j_Pro import BMMinerS19jPro
from .S19L import BMMinerS19L
from .T19 import BMMinerT19

View File

@@ -1,43 +0,0 @@
# ------------------------------------------------------------------------------
# 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 typing import Union
from pyasic.miners.backends import BMMiner
from pyasic.miners.btc._types import S9 # noqa - Ignore access to _module
from pyasic.web.S9 import S9WebAPI
class BMMinerS9(BMMiner, S9):
def __init__(self, ip: str, api_ver: str = "0.0.0") -> None:
super().__init__(ip, api_ver=api_ver)
self.ip = ip
self.web = S9WebAPI(ip)
async def get_mac(self) -> Union[str, None]:
try:
data = await self.web.get_system_info()
if data:
return data["macaddr"]
except KeyError:
pass
try:
data = await self.web.get_network_info()
if data:
return data["macaddr"]
except KeyError:
pass

View File

@@ -1,22 +0,0 @@
# ------------------------------------------------------------------------------
# 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

View File

@@ -1,22 +0,0 @@
# ------------------------------------------------------------------------------
# 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 BOSMiner
from pyasic.miners.btc._types import S17 # noqa - Ignore access to _module
class BOSMinerS17(BOSMiner, S17):
pass

View File

@@ -1,22 +0,0 @@
# ------------------------------------------------------------------------------
# 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 BOSMiner
from pyasic.miners.btc._types import S17Pro # noqa - Ignore access to _module
class BOSMinerS17Pro(BOSMiner, S17Pro):
pass

View File

@@ -1,22 +0,0 @@
# ------------------------------------------------------------------------------
# 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 BOSMiner
from pyasic.miners.btc._types import S17e # noqa - Ignore access to _module
class BOSMinerS17e(BOSMiner, S17e):
pass

View File

@@ -1,22 +0,0 @@
# ------------------------------------------------------------------------------
# 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 BOSMiner
from pyasic.miners.btc._types import T17 # noqa - Ignore access to _module
class BOSMinerT17(BOSMiner, T17):
pass

Some files were not shown because too many files have changed in this diff Show More