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