Skip to content

Instantly share code, notes, and snippets.

@keshavdv
Created December 24, 2022 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keshavdv/ff5ae4d40f272310219d1378f07831b8 to your computer and use it in GitHub Desktop.
Save keshavdv/ff5ae4d40f272310219d1378f07831b8 to your computer and use it in GitHub Desktop.
In [1]: from victron_ble.devices import BatteryMonitor
In [2]: BatteryMonitor("0da694539597f9cf6c613cde60d7bf05").parse(bytes.fromhex("1000a4a302dd150dcb9e53d33077462b49356741b04bc1"))
Out[2]:
{'remaining_mins': 65535,
'aux_mode': 2,
'aux': 29565,
'current': 2097151,
'voltage': 12.22,
'consumed_ah': 6553.5,
'soc': 102.3,
'alarm': {'low_voltage': False,
'high_voltage': False,
'low_soc': False,
'low_starter_voltage': False,
'high_starter_voltage': False,
'low_temperature': False,
'high_temperature': False,
'mid_voltage': False}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment