Improve PyASIC S9 BOS+ Data Handling
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:
- Set up a S9 BOS+ miner with BraiinsOS firmware.
- Use PyASIC to scan and call
get_data()orget_config(). - 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
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.
Hi @b-rowan, just following up , get_data() and get_config() still fail on S9 BOS+ due to float temperatures causing a ValidationError. Any guidance on handling this safely would be greatly appreciated. Thanks!