rstrouse / ESPSomfy-RTS-HA

Control your somfy shades in Home Assistant
The Unlicense
102 stars 9 forks source link

New device discovered #60

Closed 011V32 closed 1 month ago

011V32 commented 1 month ago

Since the last update v2.4.3 my device get's discovered as a new device. image

rstrouse commented 1 month ago

I'll have a look. I just noticed this on my prod system. It looks like the PR I merged changed around the ids and you really cannot test the zeroconf stuff on the dev platform. It is turned off for some reason.

rstrouse commented 1 month ago

I rolled back some of the changes from that PR. It looks like a mis-understanding as to what is unique from the ESP32 and the embedded chip Id. I will be pushing a v2.4.4 soon but you can simply not look at it or install the version that is currently in main. HACS no longer lets me install drafts without them becoming releases.

rstrouse commented 1 month ago

I just decided to publish v2.4.4 because the main install from HACS no longer works. HACS devs are removing the dropdown selector for specific versions. Booooooooh!

chemelli74 commented 1 month ago

I just decided to publish v2.4.4 because the main install from HACS no longer works. HACS devs are removing the dropdown selector for specific versions. Booooooooh!

I still have it :

image

chemelli74 commented 1 month ago

And with 2.4.4 I see 2 devices:

image

rstrouse commented 1 month ago

Delete the one with no entities. This is tagged to the undecorated chip id.

EDIT: The dropdown in HACS is still there but it does not download from the main repo. If you select it. It will sometimes appear that it is going to work but it will still download the latest release when you hit download.

chemelli74 commented 1 month ago

Delete the one with no entities. This is tagged to the undecorated chip id.

Doing so it will just rediscover a "new" device, and if you confirm it then you are back to the screenshot above with 2 entries :-(

chemelli74 commented 1 month ago

My log reports:

2024-05-14 19:47:25.822 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up espsomfy_rts.binary_sensor
2024-05-14 19:47:25.823 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform espsomfy_rts does not generate unique IDs. ID wind_espsomfy_B47D1C_1 already exists - ignoring binary_sensor.tenda
2024-05-14 19:47:25.823 INFO (MainThread) [homeassistant.components.cover] Setting up espsomfy_rts.cover
2024-05-14 19:47:25.823 ERROR (MainThread) [homeassistant.components.cover] Platform espsomfy_rts does not generate unique IDs. ID espsomfy_B47D1C_1 already exists - ignoring cover.tenda
2024-05-14 19:47:25.824 INFO (MainThread) [homeassistant.components.switch] Setting up espsomfy_rts.switch
2024-05-14 19:47:25.824 INFO (MainThread) [homeassistant.components.update] Setting up espsomfy_rts.update
2024-05-14 19:47:25.824 ERROR (MainThread) [homeassistant.components.update] Platform espsomfy_rts does not generate unique IDs. ID update_espsomfy_B47D1C already exists - ignoring update.firmware_update
2024-05-14 19:47:25.824 INFO (MainThread) [homeassistant.components.sensor] Setting up espsomfy_rts.sensor
2024-05-14 19:47:25.826 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID host_name_espsomfy_B47D1C already exists - ignoring sensor.hostname
2024-05-14 19:47:25.826 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID chip_model_espsomfy_B47D1C already exists - ignoring sensor.chip_type
2024-05-14 19:47:25.826 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID conn_type_espsomfy_B47D1C already exists - ignoring sensor.connection
2024-05-14 19:47:25.826 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID wifi_sensor_espsomfy_B47D1C already exists - ignoring sensor.wifi_strength
2024-05-14 19:47:25.826 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID wifi_ssid_espsomfy_B47D1C already exists - ignoring sensor.wifi_ssid
2024-05-14 19:47:25.826 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID wifi_channel_espsomfy_B47D1C already exists - ignoring sensor.wifi_channel
2024-05-14 19:47:25.827 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID free_memory_espsomfy_B47D1C already exists - ignoring sensor.free_memory
2024-05-14 19:47:25.827 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID max_memory_espsomfy_B47D1C already exists - ignoring sensor.max_memory
2024-05-14 19:47:25.827 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID min_memory_espsomfy_B47D1C already exists - ignoring sensor.min_memory
2024-05-14 19:47:25.827 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID ip_addresss_espsomfy_B47D1C already exists - ignoring sensor.ip_address
2024-05-14 19:47:25.827 INFO (MainThread) [homeassistant.components.button] Setting up espsomfy_rts.button
2024-05-14 19:47:25.827 ERROR (MainThread) [homeassistant.components.button] Platform espsomfy_rts does not generate unique IDs. ID reboot_espsomfy_B47D1C already exists - ignoring button.reboot_esp_device
2024-05-14 19:47:25.828 ERROR (MainThread) [homeassistant.components.button] Platform espsomfy_rts does not generate unique IDs. ID backup_espsomfy_B47D1C already exists - ignoring button.backup_espsomfy_rts
rstrouse commented 1 month ago

Ah you added this after I merged your PR that set the unique id to the series number generated in the ESP32 chip id. I had forgotten why the chip id needs a prefix. If you delete the one with the shades attached and configure the other one it will be in sync. The entities will be recreated with the original ids. Hence the does not generate unique ids messages you are seeing in the logs.

Once you do that it will now recognize the existing id and abort appropriately but still update the proper IP address if it changes.

chemelli74 commented 1 month ago

The device was added several weeks ago, with a older version.

Anyway, removed everything, restarted HA and then waited for discovery and added back. All fine here.

I don't close the issue because I'm not the original author.

rstrouse commented 1 month ago

I don't close the issue because I'm not the original author.

Thanks. I'll wait for @011V32 to close this.

011V32 commented 1 month ago

It is solved with the latest version 👍 Thx