keshavdv / victron-hacs

Home Assistant plug-in for Victron Instant Readout compatible devices
46 stars 16 forks source link

Integration installed ok but no devices or entities showing #84

Closed Alby247 closed 1 year ago

Alby247 commented 1 year ago

Version of the custom_component

Just installed it via HACS today so using the latest version.

HAOS is also fully up to date.

Running on an RPi4b 8Gb

Error log

With debug logging turned on

2023-05-15 06:13:08.957 DEBUG (MainThread) [custom_components.victron_ble.device] Parsing Victron BLE advertisement data: {737: b'\x10\x02\x81\xa3\x02\xdbZV4\xe8\x86\xfb\x16\xea\x0c\xfb\x99\xb6)\x9e\xda\xe9\xb7'} 2023-05-15 06:13:08.966 DEBUG (MainThread) [custom_components.victron_ble.device] Handle Victron BLE advertisement data: {'remaining_mins': 65535, 'aux_mode': <AuxMode.STARTER_VOLTAGE: 0>, 'current': 0.0, 'voltage': 12.59, 'consumed_ah': 0.0, 'soc': 100.0, 'alarm': 0, 'starter_voltage': 12.63} 2023-05-15 06:13:08.967 ERROR (MainThread) [custom_components.victron_ble] Unexpected error updating SmartBMV ute data: (<VictronSensor.STARTER_BATTERY_VOLTAGE: 'starter_battery_voltage'>, <Units.ELECTRIC_POTENTIAL_VOLT: 'V'>) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 278, in async_handle_update new_data = self.update_method(update) File "/config/custom_components/victron_ble/sensor.py", line 151, in sensor_update_to_bluetooth_data_update entity_descriptions={ File "/config/custom_components/victron_ble/sensor.py", line 154, in ): SENSOR_DESCRIPTIONS[ KeyError: (<VictronSensor.STARTER_BATTERY_VOLTAGE: 'starter_battery_voltage'>, <Units.ELECTRIC_POTENTIAL_VOLT: 'V'>) 2023-05-15 06:13:12.158 DEBUG (MainThread) [custom_components.victron_ble.config_flow] <home_assistant_bluetooth.models.BluetoothServiceInfoBleak object at 0x7f79133040> 2023-05-15 06:15:07.840 DEBUG (MainThread) [custom_components.victron_ble.device] Parsing Victron BLE advertisement data: {737: b'\x10\x02\x81\xa3\x02S[V0\x02s\xd5\xb6V)\x0c\x18)\xb1\xb0)\x96\xca'} 2023-05-15 06:15:07.845 DEBUG (MainThread) [custom_components.victron_ble.device] Handle Victron BLE advertisement data: {'remaining_mins': 65535, 'aux_mode': <AuxMode.STARTER_VOLTAGE: 0>, 'current': 0.0, 'voltage': 12.59, 'consumed_ah': 0.0, 'soc': 100.0, 'alarm': 0, 'starter_voltage': 12.63} 2023-05-15 06:15:07.847 ERROR (MainThread) [custom_components.victron_ble] Unexpected error updating SmartBMV ute data: (<VictronSensor.STARTER_BATTERY_VOLTAGE: 'starter_battery_voltage'>, <Units.ELECTRIC_POTENTIAL_VOLT: 'V'>)

Describe the bug

I've installed the integration and after a restart it picked up my Victron BMV712, prefilled the name and MAC address.

I sourced the advertising key by connecting with the Victron Connect app in Ubuntu then reading the sqlite file.

mac C2:D1:93:07:D1:E8

key 5669259f1c76524bca63b87aa01e6c50

I'm not getting any device or entities showing up in HA, and the error message above is showing up repeatedly.

Restarted HA and hard restart the device, refreshed browser cache.

Not sure if it' something I'm doing wrong or not?

Alby247 commented 1 year ago

Update. Noticed the errors were all associated with Auxmode:Starter_voltage.

So I disabled this option in the BMV (using the Victron connect app on my phone). There are now no errors in the HA logs.

I still can't see any device or entity I can use in HA though. Deleted then reinstalled the integration, no change.

Alby247 commented 1 year ago

After dealing with the error above I restarted HA several times, and it has now picked up the battery percent etc entities.

They are all showing as unavailable though.

Alby247 commented 1 year ago

Solved, it was my bluetooth connection at fault.

That error with the aux battery was something though might pay to check that code.

Thanks so much for building this integration, it's fantastic that I can now connect my Victron devices to HA!