Skip to content

Improve PyASIC S9 BOS+ Data Handling #367

@priyashuu

Description

@priyashuu

Describe the bug
While working with PyASIC to connect an S9 BOS+ miner, I encountered an issue where get_data() and get_config() fail because the temperature value returned is a float (e.g., 74.8) while PyASIC expects an integer. This causes a pydantic_core.ValidationError and prevents data retrieval.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a S9 BOS+ miner with BraiinsOS firmware.
  2. Use PyASIC to scan and call get_data() or get_config().
  3. Observe the crash due to the float temperature value.

Expected behavior
PyASIC should handle float temperatures gracefully (e.g., round to int) or at least retrieve other miner data without crashing.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Windows 12th gen
  • Python Version: 3.12
  • PyASIC Version: latest

Miner Information (If applicable):

  • Type: S9
  • Firmware Type: BraiinsOS (BOS+)
  • Firmware Version: 2021-12-21-0-2499d162-21.12-plus

Additional context

  • I’d like to work on adding safe handling for float temperatures to allow full data retrieval from S9 BOS+ without modifying PyASIC source.
  • Currently, partial data can only be retrieved with custom wrapper logic.

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