StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
620 stars 111 forks source link

[BUG] Massive failing light state load #555

Open MisfitPunisher opened 3 years ago

MisfitPunisher commented 3 years ago

Hi friends.

Im experiencing a strange issue with my shelly4has integration. Some of my devices appears without light sensor. I did not change the device type on the shelly app. Some of the devices at last are well loaded, but the others keep without having information about the light state.

Maybe is some kind of gorgeous lag on loading the devs information. Seems to be some kind of fail when loads the information from the shelly cloud (yes, the server and key are right defined), because the failing devices are the same than I have defined as a room on the shelly app (the failing devs fully match with some shelly app room defined devices). I try to do an integration reload, or fully host reboot, and the problem persists.

Captura de pantalla 2021-05-12 a les 11 56 50

Here you can see the rooms in HA and Shelly App: Captura de pantalla 2021-05-12 a les 12 06 30

MENJADOR ROOM Captura de pantalla 2021-05-12 a les 12 07 36

LAVABO ROOM Captura de pantalla 2021-05-12 a les 12 11 17

Are some of you experiencing that issue? there's a simple way to make it work?

Thanks!

Enric

Environment

Describe the bug

Steps to Reproduce

Expected behavior

Screenshots

Traceback/Error logs

Additional context

MisfitPunisher commented 3 years ago

Here you can see, once I reload the HA, it all disappears :( Captura de pantalla 2021-05-12 a les 12 44 02

MisfitPunisher commented 3 years ago

I have this output in the core log:

**2021-05-12 17:30:50 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry configuration.yaml for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 269, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 72, in async_setup_entry return await hass.data[DOMAIN].async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry raise ValueError("Config entry has already been setup!") ValueError: Config entry has already been setup! 2021-05-12 17:30:50 ERROR (MainThread) [homeassistant.components.sensor] Platform shelly does not generate unique IDs. ID sensor.version is already used by sensor.shelly_version - ignoring sensor.shelly_version 2021-05-12 17:30:50 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry configuration.yaml for switch Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 269, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/usr/src/homeassistant/homeassistant/components/switch/init.py", line 74, in async_setup_entry return await hass.data[DOMAIN].async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry raise ValueError("Config entry has already been setup!") ValueError: Config entry has already been setup! 2021-05-12 17:30:50 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry configuration.yaml for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 269, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/usr/src/homeassistant/homeassistant/components/binary_sensor/init.py", line 139, in async_setup_entry return await hass.data[DOMAIN].async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry raise ValueError("Config entry has already been setup!") ValueError: Config entry has already been setup! 2021-05-12 17:30:50 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_111E44 is already used by switch.shelly_shsw_1_111e44 - ignoring .shelly_shsw_1_111e44 2021-05-12 17:30:50 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_111E44_switch is already used by binary_sensor.shelly_shsw_1_111e44_switch - ignoring .shelly_shsw_1_111e44_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_117561 is already used by switch.shelly_shsw_1_117561 - ignoring .shelly_shsw_1_117561 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_117561_switch is already used by binary_sensor.shelly_shsw_1_117561_switch - ignoring .shelly_shsw_1_117561_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_111281 is already used by switch.shelly_shsw_1_111281 - ignoring .shelly_shsw_1_111281 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_111281_switch is already used by binary_sensor.shelly_shsw_1_111281_switch - ignoring .shelly_shsw_1_111281_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_116B59 is already used by switch.shelly_shsw_1_116b59 - ignoring .shelly_shsw_1_116b59 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_116B59_switch is already used by binary_sensor.shelly_shsw_1_116b59_switch - ignoring .shelly_shsw_1_116b59_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_116B90 is already used by switch.shelly_shsw_1_116b90 - ignoring .shelly_shsw_1_116b90 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_116B90_switch is already used by binary_sensor.shelly_shsw_1_116b90_switch - ignoring .shelly_shsw_1_116b90_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_B94FCD-1_switch is already used by binary_sensor.shelly_shsw_25_b94fcd_1_switch - ignoring .shelly_shsw_25_b94fcd_1_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_B94FCD-2_switch is already used by binary_sensor.shelly_shsw_25_b94fcd_2_switch - ignoring .shelly_shsw_25_b94fcd_2_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_11557A is already used by switch.shelly_shsw_1_11557a - ignoring .shelly_shsw_1_11557a 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_11557A_switch is already used by binary_sensor.shelly_shsw_1_11557a_switch - ignoring .shelly_shsw_1_11557a_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry configuration.yaml for light Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 269, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 420, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 164, in async_setup_entry raise ValueError("Config entry has already been setup!") ValueError: Config entry has already been setup! 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.light] Platform shelly does not generate unique IDs. ID shelly_SHDM-1_F3D2BF is already used by light.shelly_shdm_1_f3d2bf - ignoring .shelly_shdm_1_f3d2bf 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHDM-1_F3D2BF-1_switch is already used by binary_sensor.shelly_shdm_1_f3d2bf_1_switch - ignoring .shelly_shdm_1_f3d2bf_1_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHDM-1_F3D2BF-2_switch is already used by binary_sensor.shelly_shdm_1_f3d2bf_2_switch - ignoring .shelly_shdm_1_f3d2bf_2_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.sensor] Platform shelly does not generate unique IDs. ID shelly_SHDM-1_F3D2BF_current_consumption is already used by sensor.shelly_shdm_1_f3d2bf_current_consumption - ignoring .shelly_shdm_1_f3d2bf_current_consumption 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_10F1F5-1_switch is already used by binary_sensor.shelly_shsw_25_10f1f5_1_switch - ignoring .shelly_shsw_25_10f1f5_1_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_10F1F5-2_switch is already used by binary_sensor.shelly_shsw_25_10f1f5_2_switch - ignoring .shelly_shsw_25_10f1f5_2_switch 2021-05-12 17:30:51 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_11124D_switch is already used by binary_sensor.shelly_shsw_1_11124d_switch - ignoring .shelly_shsw_1_11124d_switch 2021-05-12 17:30:52 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_112123_switch is already used by binary_sensor.shelly_shsw_1_112123_switch - ignoring .shelly_shsw_1_112123_switch 2021-05-12 17:30:52 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_111868 is already used by switch.shelly_shsw_1_111868 - ignoring .shelly_shsw_1_111868 2021-05-12 17:30:52 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_111868_switch is already used by binary_sensor.shelly_shsw_1_111868_switch - ignoring .shelly_shsw_1_111868_switch 2021-05-12 17:30:52 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHEM_B9E3BB is already used by switch.shelly_shem_b9e3bb - ignoring .shelly_shem_b9e3bb 2021-05-12 17:30:52 ERROR (MainThread) [homeassistant.components.sensor] Platform shelly does not generate unique IDs. ID shelly_SHEM_B9E3BB-1_current_consumption is already used by sensor.shelly_shem_b9e3bb_1_current_consumption - ignoring .shelly_shem_b9e3bb_1_current_consumption 2021-05-12 17:30:52 ERROR (MainThread) [homeassistant.components.sensor] Platform shelly does not generate unique IDs. ID shelly_SHEM_B9E3BB-2_current_consumption is already used by sensor.shelly_shem_b9e3bb_2_current_consumption - ignoring .shelly_shem_b9e3bb_2_current_consumption 2021-05-12 17:30:52 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_109843_switch is already used by binary_sensor.shelly_shsw_1_109843_switch - ignoring .shelly_shsw_1_109843_switch 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-1 is already used by switch.shelly_shsw_44_f639ed_1 - ignoring .shelly_shsw_44_f639ed_1 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-1_current_consumption is already used by sensor.shelly_shsw_44_f639ed_1_current_consumption - ignoring .shelly_shsw_44_f639ed_1_current_consumption 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-1_switch is already used by binary_sensor.shelly_shsw_44_f639ed_1_switch - ignoring .shelly_shsw_44_f639ed_1_switch 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-2 is already used by switch.shelly_shsw_44_f639ed_2 - ignoring .shelly_shsw_44_f639ed_2 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-2_current_consumption is already used by sensor.shelly_shsw_44_f639ed_2_current_consumption - ignoring .shelly_shsw_44_f639ed_2_current_consumption 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-2_switch is already used by binary_sensor.shelly_shsw_44_f639ed_2_switch - ignoring .shelly_shsw_44_f639ed_2_switch 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-3 is already used by switch.shelly_shsw_44_f639ed_3 - ignoring .shelly_shsw_44_f639ed_3 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-3_current_consumption is already used by sensor.shelly_shsw_44_f639ed_3_current_consumption - ignoring .shelly_shsw_44_f639ed_3_current_consumption 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-3_switch is already used by binary_sensor.shelly_shsw_44_f639ed_3_switch - ignoring .shelly_shsw_44_f639ed_3_switch 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-4 is already used by switch.shelly_shsw_44_f639ed_4 - ignoring .shelly_shsw_44_f639ed_4 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-4_current_consumption is already used by sensor.shelly_shsw_44_f639ed_4_current_consumption - ignoring .shelly_shsw_44_f639ed_4_current_consumption 2021-05-12 17:30:53 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-44_F639ED-4_switch is already used by binary_sensor.shelly_shsw_44_f639ed_4_switch - ignoring .shelly_shsw_44_f639ed_4_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_E8DB84AAB3CA-1_switch is already used by binary_sensor.shelly_shsw_25_e8db84aab3ca_1_switch - ignoring .shelly_shsw_25_e8db84aab3ca_1_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_E8DB84AAB3CA-2_switch is already used by binary_sensor.shelly_shsw_25_e8db84aab3ca_2_switch - ignoring .shelly_shsw_25_e8db84aab3ca_2_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.light] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_117856 is already used by light.shelly_shsw_1_117856 - ignoring .shelly_shsw_1_117856 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_117856_switch is already used by binary_sensor.shelly_shsw_1_117856_switch - ignoring .shelly_shsw_1_117856_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.light] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_116BA5 is already used by light.shelly_shsw_1_116ba5 - ignoring .shelly_shsw_1_116ba5 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_116BA5_switch is already used by binary_sensor.shelly_shsw_1_116ba5_switch - ignoring .shelly_shsw_1_116ba5_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.light] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_11560D is already used by light.shelly_shsw_1_11560d - ignoring .shelly_shsw_1_11560d 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_11560D_switch is already used by binary_sensor.shelly_shsw_1_11560d_switch - ignoring .shelly_shsw_1_11560d_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_C47A3B-1_switch is already used by binary_sensor.shelly_shsw_25_c47a3b_1_switch - ignoring .shelly_shsw_25_c47a3b_1_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_C47A3B-2_switch is already used by binary_sensor.shelly_shsw_25_c47a3b_2_switch - ignoring .shelly_shsw_25_c47a3b_2_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_E8DB84AA2B48-1_switch is already used by binary_sensor.shelly_shsw_25_e8db84aa2b48_1_switch - ignoring .shelly_shsw_25_e8db84aa2b48_1_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_E8DB84AA2B48-2_switch is already used by binary_sensor.shelly_shsw_25_e8db84aa2b48_2_switch - ignoring .shelly_shsw_25_e8db84aa2b48_2_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.switch] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_116B98 is already used by switch.shelly_shsw_1_116b98 - ignoring .shelly_shsw_1_116b98 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_116B98_switch is already used by binary_sensor.shelly_shsw_1_116b98_switch - ignoring .shelly_shsw_1_116b98_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.light] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_115882 is already used by light.shelly_shsw_1_115882 - ignoring .shelly_shsw_1_115882 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_115882_switch is already used by binary_sensor.shelly_shsw_1_115882_switch - ignoring .shelly_shsw_1_115882_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_10F6D4-1_switch is already used by binary_sensor.shelly_shsw_25_10f6d4_1_switch - ignoring .shelly_shsw_25_10f6d4_1_switch 2021-05-12 17:30:54 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-25_10F6D4-2_switch is already used by binary_sensor.shelly_shsw_25_10f6d4_2_switch - ignoring .shelly_shsw_25_10f6d4_2_switch 2021-05-12 17:30:55 ERROR (MainThread) [homeassistant.components.light] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_11753E is already used by light.shelly_shsw_1_11753e - ignoring .shelly_shsw_1_11753e 2021-05-12 17:30:55 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform shelly does not generate unique IDs. ID shelly_SHSW-1_11753E_switch is already used by binary_sensor.shelly_shsw_1_11753e_switch - ignoring .shelly_shsw_1_11753e_switch**

Baldo81 commented 3 years ago

I'm experiencing the same issue. Randomly on HA boot few of my shellys are unavailable like yours.

frosenlind commented 3 years ago

I had the same, have you tried just reloading the integration?

Edit: when I reload the integration it works again.

Baldo81 commented 3 years ago

I had the same, have you tried just reloading the integration?

Edit: when I reload the integration it works again.

Yes of course, it doesn’t work.