dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
480 stars 116 forks source link

Only one device is discovered by HA #156

Closed Blueforcer closed 7 months ago

Blueforcer commented 1 year ago

I have two identical devices and each get a own id with device.setUniqueId(mac, sizeof(mac));

unfortunally only one device is registered in HA at a time. I need to delete the first one in in order register the second device.

in HA logs i found this when i try to register the second one:

2023-03-27 23:19:10.475 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID battery already exists - ignoring sensor.battery
2023-03-27 23:19:10.479 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID temperature already exists - ignoring sensor.temperature
2023-03-27 23:19:10.480 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID huminity already exists - ignoring sensor.humidity
2023-03-27 23:19:10.482 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID illuminance already exists - ignoring sensor.illuminance

what is wrong here?

justind000 commented 1 year ago

Check out issue #124 and #149

Each device must have a unique id and each sensor name must be globally unique, regardless of the device name they are associated with.

Blueforcer commented 1 year ago

Thanks, I will try that