diff --git a/pyasic/miners/backends/vnish.py b/pyasic/miners/backends/vnish.py index 0875c74d..4a560288 100644 --- a/pyasic/miners/backends/vnish.py +++ b/pyasic/miners/backends/vnish.py @@ -147,6 +147,22 @@ class VNish(VNishFirmware, BMMiner): except KeyError: pass + async def fault_light_off(self) -> bool: + result = await self.web.find_miner() + if result is not None: + if result.get("on") is False: + return True + else: + await self.web.find_miner() + + async def fault_light_on(self) -> bool: + result = await self.web.find_miner() + if result is not None: + if result.get("on") is True: + return True + else: + await self.web.find_miner() + async def _get_hostname(self, web_summary: dict = None) -> str: if web_summary is None: web_info = await self.web.info() diff --git a/pyasic/web/vnish.py b/pyasic/web/vnish.py index 17fd9e46..32f08f8a 100644 --- a/pyasic/web/vnish.py +++ b/pyasic/web/vnish.py @@ -140,3 +140,6 @@ class VNishWebAPI(BaseWebAPI): async def autotune_presets(self) -> dict: return await self.send_command("autotune/presets") + + async def find_miner(self) -> dict: + return await self.send_command("find-miner", privileged=True)