Hoping someone can help me out. After having problems with my Shelly Plus 1’s and my Shelly 2PM’s going offline/becoming unavailable periodically, I went ahead and made sure that:
- I had set the CoIoT settings including changing the client from mcast to unicast
- opening the 5386/udp port in the docker compose
- enabling access point roaming on all the shelly devices
And I’m still periodically getting the error:
shelly <switch id> failed, state: {'turn': 'on'}, error: DeviceConnectionError()
Or sometimes the switch does turn on but only after approx 3-5seconds delay. I have captured the debug output during one of these delays. See below. Does anything look out of the ordinary there? Does anyone have any other ideas? Googling this reveals this is a widespread issue with this integration, however some people have been able to resolve it by following one or several of the steps I outlined above.
2023-12-18 06:27:30.223 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id E0C074
2023-12-18 06:27:30.223 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyrgbw2-E0C074: 0
2023-12-18 06:27:30.223 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyrgbw2-E0C074 data
2023-12-18 06:27:30.223 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_0
2023-12-18 06:27:30.223 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_1
2023-12-18 06:27:30.223 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_2
2023-12-18 06:27:30.223 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block light_3
2023-12-18 06:27:30.223 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2023-12-18 06:27:30.754 DEBUG (MainThread) [aioshelly.block_device.device] aiohttp response: {'ison': True, 'has_timer': False, 'timer_started': 0, 'timer_duration': 0, 'timer_remaining': 0, 'overpower': False, 'overtemperature': False, 'is_valid': True, 'source': 'http'}
2023-12-18 06:27:30.762 DEBUG (MainThread) [aioshelly.block_device.device] aiohttp response: {'ison': True, 'has_timer': False, 'timer_started': 0, 'timer_duration': 0, 'timer_remaining': 0, 'overpower': False, 'overtemperature': False, 'is_valid': True, 'source': 'http'}
2023-12-18 06:27:31.098 DEBUG (MainThread) [aioshelly.block_device.coap] CoapMessage: ip=<private>, type=CoapType.PERIODIC(30), options={11: b's', 3332: b'SHSW-25#3494546F111C#2', 3412: b'\x96\x00', 3420: b'\xb2\n'}, payload={'G': [[0, 9103, 1], [0, 1101, 1], [0, 1201, 1], [0, 2101, 0], [0, 2102, ''], [0, 2103, 0], [0, 2201, 0], [0, 2202, ''], [0, 2203, 0], [0, 4101, 12.86], [0, 4103, 5095], [0, 6102, 0], [0, 4201, 2.39], [0, 4203, 8889], [0, 6202, 0], [0, 3104, 55.64], [0, 6101, 0], [0, 9101, 'relay'], [0, 4108, 242.4]]}
2023-12-18 06:27:31.098 DEBUG (MainThread) [aioshelly.block_device.coap] Calling CoAP message update for device id 6F111C
2023-12-18 06:27:31.099 DEBUG (MainThread) [homeassistant.components.shelly] Push update failures for shellyswitch25-3494546F111C: 0
2023-12-18 06:27:31.099 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shellyswitch25-3494546F111C data
2023-12-18 06:27:31.099 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2023-12-18 06:27:31.099 DEBUG (MainThread) [homeassistant.components.shelly] Skipping block event
2023-12-18 06:27:31.099 DEBUG (MainThread) [homeassistant.components.shelly] Skipping non-input event block device