Skip to content

BOS miners are not accurately reporting "is_mining" #328

@womj

Description

@womj

Describe the bug
BOS miners are not accurately reporting "is_mining"

To Reproduce
Steps to reproduce the behavior:

  1. Get data on a bos miner that is stopped or started

Expected behavior
stopped miners should report is_mining false

Desktop (please complete the following information):

  • POPOS 22.04

Miner Information (If applicable):

  • Any BOS+ v 2024-12-03-0-f4c282cd-24.09.1-plus
    Additional context
    narrowed the issue down to braiins_os.py line 1080
async def _is_mining(self, rpc_devdetails: dict = None) -> Optional[bool]:
        print("is mining", rpc_devdetails)
        if rpc_devdetails is None:
            try:
                rpc_devdetails = await self.rpc.send_command(
                    "devdetails", ignore_errors=True, allow_warning=False
                )
            except APIError:
                pass

        if rpc_devdetails is not None:
            try:
                return not rpc_devdetails["STATUS"][0]["Msg"] == "Unavailable"
            except LookupError:
                pass

rpc_devdetails returning as

Running

is mining {'STATUS': [{'STATUS': 'S', 'When': 1744221151, 'Code': 69, 'Msg': 'Device Details', 'Description': 'BOSer boser-buildroot 0.1.0-e05df053'}], 'DEVDETAILS': [{'Chips': 108, 'Cores': 137808, 'DEVDETAILS': 0, 'Device Path': '', 'Driver': '', 'Frequency': 267, 'ID': 1, 'Kernel': '', 'Model': 'Antminer T21', 'Name': 'HashchainManager 1', 'Voltage': -51.4888718209661}, {'Chips': 108, 'Cores': 137808, 'DEVDETAILS': 1, 'Device Path': '', 'Driver': '', 'Frequency': 267, 'ID': 2, 'Kernel': '', 'Model': 'Antminer T21', 'Name': 'HashchainManager 2', 'Voltage': -51.4888718209661}, {'Chips': 108, 'Cores': 137808, 'DEVDETAILS': 2, 'Device Path': '', 'Driver': '', 'Frequency': 267, 'ID': 3, 'Kernel': '', 'Model': 'Antminer T21', 'Name': 'HashchainManager 3', 'Voltage': -51.4888718209661}], 'id': 1}

Stopped

is mining {'STATUS': [{'STATUS': 'S', 'When': 1744221042, 'Code': 69, 'Msg': 'Device Details', 'Description': 'BOSer boser-buildroot 0.1.0-e05df053'}], 'DEVDETAILS': [{'Chips': 108, 'Cores': 137808, 'DEVDETAILS': 0, 'Device Path': '', 'Driver': '', 'Frequency': 50, 'ID': 1, 'Kernel': '', 'Model': 'Antminer T21', 'Name': 'HashchainManager 1', 'Voltage': -51.55757927783486}, {'Chips': 108, 'Cores': 137808, 'DEVDETAILS': 1, 'Device Path': '', 'Driver': '', 'Frequency': 50, 'ID': 2, 'Kernel': '', 'Model': 'Antminer T21', 'Name': 'HashchainManager 2', 'Voltage': -51.55757927783486}, {'Chips': 108, 'Cores': 137808, 'DEVDETAILS': 2, 'Device Path': '', 'Driver': '', 'Frequency': 50, 'ID': 3, 'Kernel': '', 'Model': 'Antminer T21', 'Name': 'HashchainManager 3', 'Voltage': -51.55757927783486}], 'id': 1}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions