rstrouse / ESPSomfy-RTS

A controller for Somfy RTS shades and blinds
The Unlicense
428 stars 32 forks source link

Can't change existing device configuration from IP to mDNS when the integration has re-discovered the device via mDNS in H-A #369

Closed Particpant closed 1 month ago

Particpant commented 1 month ago

Hardware

LilyGO T-Internet POE

Firmware version

v2.4.3

Application version

v2.4.3

What happened? What did you expect to happen?

Updated from 2.4.2 (FW and HACS) to 2.4.3. I had configured my device via ip address, but after reboot, the ESP was re-discovered at it's mDNS address. I decided to re-configure the already-set up HA device to use the mDNS domain, but it was blocked in the HA UI with "Unknown Error" after clicking submit in the configuration dialogue. I had to finish setup of the "discovered" device, and delete it to update the config. Oddly, after doing that and another HA restart, the ESPSomfyRTS was rediscovered again.

Sorry, I couldn't reproduce the issue as described, aside from the rediscovery after a restart with debug logging on, but I've attached what I've got.

Thanks again for the fantastic software!

How to reproduce it (step by step)

1. Set up ESPSomfyRTS device (via discovery or manually) in H-A on a version before 2.4.3 (I believe my initial install was in the early 2.3.x range) and have it set up via IP address.
2. Upgrade to 2.4.3.
3. Note the ESPSomfyRTS is discovered as a duplicate device in H-A.
4. Try to reconfigure the existing HA device to use mDNS. Note that there's an error when doing so.
5. Set up the "new" device, and then delete it.
6. Reconfigure the existing device to use the mDNS name.
7. Note after restart, the ESP is still rediscovered via mDNS.

Logs

2024-05-13 09:53:26.612 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] ESPSomfy RTS Setting up entities
2024-05-13 09:53:26.766 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] ESPSomfy RTS Socket was opened
2024-05-13 09:53:26.767 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] ESPSomfy RTS Already Configured
2024-05-13 09:53:26.767 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:26.768 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:26.785 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:26.786 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:26.833 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:26.834 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:27.600 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:27.601 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:27.602 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:29.113 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:32.136 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:32.141 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:32.141 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:37.760 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] ESPSomfy RTS Setting up entities
2024-05-13 09:53:37.762 ERROR (MainThread) [homeassistant.components.cover] Platform espsomfy_rts does not generate unique IDs. ID espsomfy_EB7810_1 already exists - ignoring cover.right_shade
2024-05-13 09:53:37.763 ERROR (MainThread) [homeassistant.components.cover] Platform espsomfy_rts does not generate unique IDs. ID espsomfy_EB7810_2 already exists - ignoring cover.left_shade
2024-05-13 09:53:37.763 ERROR (MainThread) [homeassistant.components.cover] Platform espsomfy_rts does not generate unique IDs. ID espsomfy_EB7810_group1 already exists - ignoring cover.front_shades
2024-05-13 09:53:37.765 ERROR (MainThread) [homeassistant.components.update] Platform espsomfy_rts does not generate unique IDs. ID update_espsomfy_EB7810 already exists - ignoring update.firmware_update
2024-05-13 09:53:37.767 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID host_name_espsomfy_EB7810 already exists - ignoring sensor.hostname
2024-05-13 09:53:37.767 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID chip_model_espsomfy_EB7810 already exists - ignoring sensor.chip_type
2024-05-13 09:53:37.767 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID conn_type_espsomfy_EB7810 already exists - ignoring sensor.connection
2024-05-13 09:53:37.768 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID eth_speed_espsomfy_EB7810 already exists - ignoring sensor.connection_speed
2024-05-13 09:53:37.768 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID eth_full_duplex_espsomfy_EB7810 already exists - ignoring sensor.full_duplex
2024-05-13 09:53:37.768 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID free_memory_espsomfy_EB7810 already exists - ignoring sensor.free_memory
2024-05-13 09:53:37.774 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID max_memory_espsomfy_EB7810 already exists - ignoring sensor.max_memory
2024-05-13 09:53:37.775 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID min_memory_espsomfy_EB7810 already exists - ignoring sensor.min_memory
2024-05-13 09:53:37.775 ERROR (MainThread) [homeassistant.components.sensor] Platform espsomfy_rts does not generate unique IDs. ID ip_addresss_espsomfy_EB7810 already exists - ignoring sensor.ip_address
2024-05-13 09:53:37.777 ERROR (MainThread) [homeassistant.components.button] Platform espsomfy_rts does not generate unique IDs. ID reboot_espsomfy_EB7810 already exists - ignoring button.reboot_esp_device
2024-05-13 09:53:37.777 ERROR (MainThread) [homeassistant.components.button] Platform espsomfy_rts does not generate unique IDs. ID backup_espsomfy_EB7810 already exists - ignoring button.backup_espsomfy_rts
2024-05-13 09:53:37.852 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] ESPSomfy RTS Socket was opened
2024-05-13 09:53:37.853 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] ESPSomfy RTS Already Configured
2024-05-13 09:53:37.853 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:37.855 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:37.872 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:37.880 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:37.881 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:37.883 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:38.128 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:38.135 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:38.135 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:38.135 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:38.135 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:38.136 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:39.643 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:39.649 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Manually updated espsomfy_rts data
2024-05-13 09:53:46.034 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Stopping event thread
2024-05-13 09:53:46.039 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Joining event thread
2024-05-13 09:53:46.040 DEBUG (MainThread) [custom_components.espsomfy_rts.controller] Event thread joined
rstrouse commented 1 month ago

This is because of a change in the v2.4.3 of the HA component. I released 2.4.4 yesterday to fix this issue. The integration was not finding the original unique id assigned.

Particpant commented 1 month ago

That fixed it, thanks!