CJNE / ha-myenergi

Home Assistant integration for MyEnergi devices
MIT License
147 stars 33 forks source link

Platform myenergi does not generate unique IDs #375

Open RCGrahamWilmott opened 1 year ago

RCGrahamWilmott commented 1 year ago

Version of the custom_component

0.0.23 - latest version on HACS

Configuration

I used the UI so can not see any YAML config. Log is:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:554
Integration: Sensor (documentation, issues)
First occurred: 09:53:11 (2 occurrences)
Last logged: 09:53:11

Platform myenergi does not generate unique IDs. ID XXXXXXXX-firmware_version already exists - ignoring sensor.myenergi_home_hub_firmware
Platform myenergi does not generate unique IDs. ID XXXXXXXX-serial_number already exists - ignoring sensor.myenergi_home_hub_serial_number

Describe the bug

A clear and concise description of what the bug is. I'm getting these errors in my log. Everything seems to work fine, but just wanted to make sure this is logged. (I did search, but couldn't find any open issues / anything in the wiki / etc)

Debug log


Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:554
Integration: Sensor (documentation, issues)
First occurred: 09:53:11 (2 occurrences)
Last logged: 09:53:11

Platform myenergi does not generate unique IDs. ID XXXXXXXX-firmware_version already exists - ignoring sensor.myenergi_home_hub_firmware
Platform myenergi does not generate unique IDs. ID XXXXXXXX-serial_number already exists - ignoring sensor.myenergi_home_hub_serial_number
chrisandsally commented 1 year ago

I have the same issue, thanks for posting

t785634 commented 1 year ago

I also have the same problem. has someone already found a solution?

RCGrahamWilmott commented 1 year ago

I'm still seeing it in my logs, but as far as I can tell, it does not affect anything.

t785634 commented 1 year ago

However, I don't get any values ​​for how many kWh was loaded into my car because I get this error message.

emufan commented 1 year ago

I have three of such lines, so not only the two from the opening description:

Platform myenergi does not generate unique IDs. ID XXXXXX-firmware_version already exists - ignoring sensor.myenergi_hub_hub_firmware
Platform myenergi does not generate unique IDs. ID XXXXXX8-serial_number already exists - ignoring sensor.myenergi_hub_hub_serial_number
Platform myenergi does not generate unique IDs. ID XXXXXX-energy_green already exists - ignoring sensor.myenergi_hub_green_energy_today
trizmark commented 1 year ago

This issues is cause by the vHub functionality of myenergi devices. In my case, my libbi is my virtual hub. When the integration generates the unique IDs for each entity, it ends up with the same UID for the vHub and the actual device due to the generation algorithm. The error doesn't impact the functionality - you'll simply be missing these entities from one of your devices (either the vHub or the device that acts as the hub).

As part of adding libbi support to the integration, I have fixed this issue. The fix will be included in 0.0.24.