diff --git a/pyasic/miners/antminer/luxos/X19/S19.py b/pyasic/miners/antminer/luxos/X19/S19.py new file mode 100644 index 00000000..b6ce5f01 --- /dev/null +++ b/pyasic/miners/antminer/luxos/X19/S19.py @@ -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 LUXMiner +from pyasic.miners.models import S19 + + +class LUXMinerS19(LUXMiner, S19): + pass diff --git a/pyasic/miners/antminer/luxos/X19/__init__.py b/pyasic/miners/antminer/luxos/X19/__init__.py new file mode 100644 index 00000000..274b8b64 --- /dev/null +++ b/pyasic/miners/antminer/luxos/X19/__init__.py @@ -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 .S19 import LUXMinerS19 diff --git a/pyasic/miners/antminer/luxos/__init__.py b/pyasic/miners/antminer/luxos/__init__.py index b41c483b..1a30dbbe 100644 --- a/pyasic/miners/antminer/luxos/__init__.py +++ b/pyasic/miners/antminer/luxos/__init__.py @@ -15,3 +15,4 @@ # ------------------------------------------------------------------------------ from .X9 import * +from .X19 import * diff --git a/pyasic/miners/antminer/vnish/X7/L7.py b/pyasic/miners/antminer/vnish/X7/L7.py new file mode 100644 index 00000000..6c0f1a44 --- /dev/null +++ b/pyasic/miners/antminer/vnish/X7/L7.py @@ -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 VNish +from pyasic.miners.models import L7 + + +class VnishL7(VNish, L7): + pass diff --git a/pyasic/miners/antminer/vnish/X7/__init__.py b/pyasic/miners/antminer/vnish/X7/__init__.py new file mode 100644 index 00000000..b7d5e6db --- /dev/null +++ b/pyasic/miners/antminer/vnish/X7/__init__.py @@ -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 .L7 import VnishL7 diff --git a/pyasic/miners/antminer/vnish/__init__.py b/pyasic/miners/antminer/vnish/__init__.py index 0b4464e9..ff03545c 100644 --- a/pyasic/miners/antminer/vnish/__init__.py +++ b/pyasic/miners/antminer/vnish/__init__.py @@ -15,5 +15,6 @@ # ------------------------------------------------------------------------------ from .X3 import * +from .X7 import * from .X17 import * from .X19 import * diff --git a/pyasic/miners/backends/braiins_os.py b/pyasic/miners/backends/braiins_os.py index 5557610d..64bc97aa 100644 --- a/pyasic/miners/backends/braiins_os.py +++ b/pyasic/miners/backends/braiins_os.py @@ -35,6 +35,7 @@ from pyasic.miners.data import ( from pyasic.rpc.bosminer import BOSMinerRPCAPI from pyasic.ssh.braiins_os import BOSMinerSSH from pyasic.web.braiins_os import BOSerWebAPI, BOSMinerWebAPI +from pyasic.web.braiins_os.proto.braiins.bos.v1 import SaveAction BOSMINER_DATA_LOC = DataLocations( **{ @@ -691,7 +692,9 @@ class BOSer(BaseMiner): async def set_power_limit(self, wattage: int) -> bool: try: - result = await self.web.set_power_target(wattage) + result = await self.web.set_power_target( + wattage, save_action=SaveAction.SAVE_ACTION_SAVE_AND_FORCE_APPLY + ) except APIError: return False diff --git a/pyasic/miners/factory.py b/pyasic/miners/factory.py index 05848e8b..1e42fd1b 100644 --- a/pyasic/miners/factory.py +++ b/pyasic/miners/factory.py @@ -373,7 +373,9 @@ MINER_CLASSES = { }, MinerTypes.VNISH: { None: VNish, + "L3+": VnishL3Plus, "ANTMINER L3+": VnishL3Plus, + "ANTMINER L7": VnishL7, "ANTMINER S17+": VNishS17Plus, "ANTMINER S17 PRO": VNishS17Pro, "ANTMINER S19": VNishS19, @@ -404,6 +406,7 @@ MINER_CLASSES = { MinerTypes.LUX_OS: { None: LUXMiner, "ANTMINER S9": LUXMinerS9, + "ANTMINER S19": LUXMinerS19, }, MinerTypes.AURADINE: { None: type("GoldshellUnknown", (Auradine, AuradineMake), {}),