I have a Shelly 1L. One of the switch inputs is in detached mode and I have an automation setup I’m HA to turn on another light.
I am using the native Shelly integration
I have configured the CoIoT with unicast to home assistant. (This improved the time from 20 sec to 1 sec)
I have a UniFi edge router and the shellies are on a seperate vlan to HA.
I have the mDNS repeater configured.
Any ideas how to improve the performance?
I don’t want to set up MQTT if I don’t have to…
I am currently dealing with the same issue on an i3, where the delay ranges from 1 to as much as 7s. One input is used in HA, the other uses Shelly direct device communication, and the direct comm latency appears to be around 50ms
I have not had time to see if it is a delay in getting the coap packet to HA (doubtful given DDC latency) or in processing the packet
With correctly configured Shelly devices, the delay should not be noticeable (measured in ms).
Please enable debug for homeassistant.components.shelly in logger configuration and look at your log. If everything works as it should you will have entries like this:
2021-03-15 15:13:43 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated shelly1l-84CCA8ADBE94 data
2021-03-15 15:13:43 DEBUG (MainThread) [homeassistant.components.shelly] Finished fetching shelly1l-84CCA8ADBE94 data in 0.040 seconds
Hello, Thanks for your reply.
I took a look at the logs
I am using one of the channels of ‘Anna’s Room Light’ to switch the ‘Hall Light’ the logic is in home assistant. from your example, it looks like it is set up correctly. although i don’t have the second line with ‘Finished fetching’.
I have another automation set-up the same except I have a toggle switch on the dashboard. That switches the light almost instantly.
2021-05-06 21:53:45 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Hall Light data
2021-05-06 21:53:49 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Anna's Room Light data
2021-05-06 21:53:50 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Hall Light data
2021-05-06 21:53:52 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Anna's Room Light data
2021-05-06 21:53:52 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Hall Light data
2021-05-06 21:53:53 DEBUG (MainThread) [homeassistant.components.shelly] Manually updated Anna's Room Light data
You may want to try the ShellyForHass custom integration. It is still updated and maintained.
I’m still using it as I just don’t want to go through changing to the native integration.
The Coap protocol does seem very sensitive to WiFi strength though, every once and a while I notice the state change is a little slow because I have smart bulbs automated to turn on and off with the switch.