Battery Protect no instant readout in fail / off state

Hi,

The battery protection system does not have a VE direct port, so I’m using the BLE Instant Readout feature along with this library (GitHub - keshavdv/victron-ble: A Python API to parse Victron Instant Readout BLE advertisements) to retrieve data. As long as the battery protect is operating normally (Voltage > Shutdown), everything works well. However, the issue arises when it enters shutdown mode; it stops sending the instant readout data.

While normal Bluetooth functionality through the Victron app on my phone continues to work, I cannot utilize this specific feature because it is not publicly available.

Does anyone have any ideas? Perhaps someone from Victron could see this and consider updating the firmware for the battery protect. I would appreciate any suggestions on how to overcome this issue.

Thank you!

Hi,

What happens with the instant readout in VictronConnect when the battery protect goes into shutdown mode? Is the instant readout data then still visible in VictronConnect?

And what is the firmware version of the battery protect?

With kind regards,
Thiemo van Engelen

Hi Thiemo,

Thank you for the quick response. Regarding your questions:

I am a few days away from being able to provide the exact firmware version. However, I consistently check for updates on all my devices through the Victron Connect app, so it should be the latest version.

Even when the device is in shutdown mode, I can still connect to it fully using the Victron Connect app, and everything functions properly.

The Victron BLE library stops receiving instant readout values when the voltage drops, but as soon as the voltage is high enough, I begin receiving information from the device again via the victron-ble library.

I hope this information helps.

Best regards.
Konrad

Hi Konrad,

When the device is in shutdown mode, are the values of the battery protect like voltage still visible in the main device list in VictronConnect (so without selecting it and actually connecting to it)?
This is what I meant with whether the Instant readout still works in VictronConnect when the device is in shutdown mode.

If this is the case then it is a problem in the Victron BLE library (which to be clear it NOT written or maintained by us).

With kind regards,
Thiemo van Engelen

Hi Thiemo,

Thanks for your response, and I checked it further, and the issue is the Victron-BLE library.
In the moment the battery protect turns off, it have an issue with parsing the response.

So this ticket can be marked as solved, because victron can not do anything.
I’m fully aware that this is a third party library.

Just for others as info. As soon as the battery protect turns off, the library have an parsing issue see below.

ValueError: 0 is not a valid OutputState
ERROR:asyncio:Exception in callback CentralManagerDelegate.did_discover_peripheral(<CBCentralMan...x600002e70420>, <CBPeripheral... disconnected>, {
    kCBAdvD...409.748201";
}, -57)
handle: <Handle CentralManagerDelegate.did_discover_peripheral(<CBCentralMan...x600002e70420>, <CBPeripheral... disconnected>, {
    kCBAdvD...409.748201";
}, -57)>
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bleak/backends/corebluetooth/CentralManagerDelegate.py", line 265, in did_discover_peripheral
    callback(peripheral, advertisementData, RSSI)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bleak/backends/corebluetooth/scanner.py", line 152, in callback
    self.call_detection_callbacks(device, advertisement_data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/bleak/backends/scanner.py", line 247, in call_detection_callbacks
    callback(device, advertisement_data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/victron_ble/scanner.py", line 39, in _detection_callback
    self.callback(device, data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/victron_ble/scanner.py", line 108, in callback
    parsed = device.parse(raw_data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/victron_ble/devices/base.py", line 1046, in parse
    parsed = self.parse_decrypted(decrypted)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/victron_ble/devices/smart_battery_protect.py", line 90, in parse_decrypted
    OutputState(output_state) if output_state != 0xFF else None
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/enum.py", line 385, in __call__
    return cls.__new__(cls, value)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/enum.py", line 710, in __new__
    raise ve_exc
ValueError: 0 is not a valid OutputState

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.