Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Devices/Entities added #94

Open
bvovk opened this issue Aug 19, 2023 · 11 comments · May be fixed by #97
Open

No Devices/Entities added #94

bvovk opened this issue Aug 19, 2023 · 11 comments · May be fixed by #97

Comments

@bvovk
Copy link

bvovk commented Aug 19, 2023

Hi,

thank you for your work!

I was able to retrieve the necessary data but the integration doesn't create any entities.

The address/key data must be OK as your CLI tool (victron read addr@key) is able to read the data provided by Victron equipment.

I am using the ESP32 to scan the BLE and llso the ESPhome (victron-ble) log shows all the provided values.

It seems I'm missing something here, but am at a loss how to proceed...

B.

@Boots4747
Copy link

Same here, the integration doesnt create an entity

@wasn-eu
Copy link

wasn-eu commented Aug 28, 2023

same here. The Smart Shunt is found but with no entitites

@bvovk
Copy link
Author

bvovk commented Aug 28, 2023

I was ultimately successful, but couldn't resolve the issue directly, here's the story:

https://community.home-assistant.io/t/victron-energy-vedirect-bluetooth/20726/172

Recent version of Victron Connect also provides the authentication keys - no Linux workaround necessary!

Ultimately, the most important thing is that it works.

@wasn-eu
Copy link

wasn-eu commented Aug 28, 2023

your solution is to use an other integration.
so the problem here is not solved.

great that the other integration is working for you

@wasn-eu
Copy link

wasn-eu commented Aug 28, 2023

this is the error in HA:

`Logger: custom_components.victron_ble
Source: custom_components/victron_ble/sensor.py:154
Integration: Victron BLE (documentation, issues)
First occurred: 13:05:56 (185860 occurrences)
Last logged: 22:10:37

Unexpected error updating SmartShunt data: (<VictronSensor.MIDPOINT_VOLTAGE: 'midpoint_voltage'>, <Units.ELECTRIC_POTENTIAL_VOLT: 'V'>)
Unexpected error updating DD:F2:B0:C4:D6:1D data: (<VictronSensor.MIDPOINT_VOLTAGE: 'midpoint_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.MIDPOINT_VOLTAGE: 'midpoint_voltage'>, <Units.ELECTRIC_POTENTIAL_VOLT: 'V'>)`

@david-collett
Copy link

I have the same issue. After adding a discovered smarthunt, no entities are created and the log is filled with the below.

homeassistant  | KeyError: (<VictronSensor.STARTER_BATTERY_VOLTAGE: 'starter_battery_voltage'>, <Units.ELECTRIC_POTENTIAL_VOLT: 'V'>)
homeassistant  | 2023-08-30 11:53:50.588 ERROR (MainThread) [custom_components.victron_ble] Unexpected error updating SmartShunt HQ2104BRD42 data: (<VictronSensor.STARTER_BATTERY_VOLTAGE: 'starter_battery_voltage'>, <Units.ELECTRIC_POTENTIAL_VOLT: 'V'>)
homeassistant  | Traceback (most recent call last):
homeassistant  |   File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 278, in async_handle_update
homeassistant  |     new_data = self.update_method(update)
homeassistant  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
homeassistant  |   File "/config/custom_components/victron_ble/sensor.py", line 151, in sensor_update_to_bluetooth_data_update
homeassistant  |     entity_descriptions={
homeassistant  |                         ^
homeassistant  |   File "/config/custom_components/victron_ble/sensor.py", line 154, in <dictcomp>
homeassistant  |     ): SENSOR_DESCRIPTIONS[
homeassistant  |        ^^^^^^^^^^^^^^^^^^^^

@david-collett
Copy link

In the two reports above (with logs), it appears to simply be SENSOR_DESCRIPTIONS is incomplete and doesnt have entries for MIDPOINT_VOLTAGE and STARTER_BATTERY_VOLTAGE. Perhaps not surprising as these are configurable functions of the additional sensor input. I'd say the author has not encountered these configurations yet. I will have a go an adding them and producing a PR.

@wasn-eu
Copy link

wasn-eu commented Aug 30, 2023

just added yout lines of code manually and now i have all entitites for my smartshunt.
thank you very much

@pfwilliam
Copy link

pfwilliam commented Sep 8, 2023

EDIT: I figured it out :D thanks for the code @david-collett, and I also added Amp as unit to my external device load, not sure why that just said None, but anyways now it works. happy days!

@wasn-eu can you write what you did in short ? im a bit new still to all this git stuff, so unsure which code to pop where :)
I have the same issue with my Smart Solar 75V 15A not showing any entities.

This error originated from a custom integration.

Logger: custom_components.victron_ble
Source: custom_components/victron_ble/sensor.py:154
Integration: Victron BLE (documentation, issues)
First occurred: 08:59:29 (818 occurrences)
Last logged: 09:34:03

Unexpected error updating SmartSolar 75V 15Amp 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[
^^^^^^^^^^^^^^^^^^^^
KeyError: (<VictronSensor.EXTERNAL_DEVICE_LOAD: 'external_device_load'>, <Units.ELECTRIC_CURRENT_AMPERE: 'A'>)

@klehnst
Copy link

klehnst commented Feb 7, 2024

@pfwilliam @david-collett I also have the same problem, but with the SmartShunt and aux port, could you help me solve the problem?

@pfwilliam
Copy link

pfwilliam commented Feb 7, 2024

@pfwilliam @david-collett I also have the same problem, but with the SmartShunt and aux port, could you help me solve the problem?

just see what the error message you have says, and go into the file its complaining about and see if you can figure out what is wrong. just check the lines that is in the error msg, usually the issue is close by.

the below image is my file after updating it, and i think it was the highlighted that was stated with some other value than Amps... sorry, dont entirely remember what i did.. will try to document better next time :D good luck!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants