keshavdv / victron-hacs

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

mppt connect gone / no entities #99

Open gkathan opened 9 months ago

gkathan commented 9 months ago

hi, I had my mppt 75/15 integrated successfully and saw values coming from the entity ... but yesterday suddenly the connect was gone / lost ... tried to remove the integration and re-add it with no success ... quite puzzling as it still works fine when I directly connect via victron-connect app any hints?

gkathan commented 9 months ago

...having fiddled around now to understand my issue better - the current state looks like:

2023-09-18 17:03:47.024 DEBUG (MainThread) [custom_components.victron_ble.device] Parsing Victron BLE advertisement data: {737: b"\x10\x02S\xa0\x01\xed/\xce'\x82\xbb\x93\x1a\xae\x9aS\n\x1afk"} 2023-09-18 17:03:47.026 DEBUG (MainThread) [custom_components.victron_ble.device] Handle Victron BLE advertisement data: {'charge_state': <OperationMode.OFF: 0>, 'battery_voltage': 13.32, 'battery_charging_current': 0.0, 'yield_today': 0, 'solar_power': 0, 'external_device_load': 65025}

2023-09-18 17:03:47.027 ERROR (MainThread) [custom_components.victron_ble] Unexpected error updating smartsolar hamburgT3 data: (<VictronSensor.EXTERNAL_DEVICE_LOAD: 'external_device_load'>, <Units.ELECTRIC_CURRENT_AMPERE: 'A'>) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 535, 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[

coinprotagonist commented 9 months ago

I also have the MPPT 75/15 - what did you put for the address field and where did you find the "Advertisement Key"?

I thought this connected over bluetooth so where would it have an IP address?

herrfeuer commented 9 months ago

You have to connect it with the Cellphone APP first, then click the Gear Wheel, Top next to the Device Name, in Settings Window click the 3 Dots -> Product info, scroll down to Instant readout details, Encryption Data > Show MAC Adress is the Address you need, Encryption Key is the Key.

But sadly its not will Crash then if the Load Current is not 0.

16:31:01.306 ERROR (MainThread) [custom_components.victron_ble] Unexpected error updating SmartSolar HQ2230AMMYX data: (<VictronSensor.EXTERNAL_DEVICE_LOAD: 'external_device_load'>, <Units.ELECTRIC_CURRENT_AMPERE: 'A'>) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 555, 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.EXTERNAL_DEVICE_LOAD: 'external_device_load'>, <Units.ELECTRIC_CURRENT_AMPERE: 'A'>)

I tried it to fix by myself, but my python skills aren't that good. It would have been working in earlier versions, but the the last changes may broke it.

jamezpolley commented 6 months ago

@herrfeuer's change #101 works for me.