StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
615 stars 110 forks source link

Slow response with new firmware 1.11.8 #651

Closed radeon79 closed 2 years ago

radeon79 commented 2 years ago

With new firmware 1.11.8 the state response on home assistant is very slow. After change the state of a lamp with my shelly the input is ok but the state of my card on home assistant change after 20 seconds.... Please check and fix.

bqstony commented 2 years ago

same by me

augard commented 2 years ago

Same issue, it´s know almost not possible use shelly in relay mode.

robr92 commented 2 years ago

Same

Moxser commented 2 years ago

I noted the same problem. It takes a long time to to refresh the status about the switches. This problem could do an errors on the automations

hakana commented 2 years ago

I have tested this with a Shelly 1 with firmware 1.11.8 and the response working perfect for me. Please provice more info if it is a specific type of device, if you use CoAP or mqtt etc.

augard commented 2 years ago

My device is shelly 2.5 with firmware 1.11.8. How can i check how the device is connected with SheelyForHASS? It was without MQTT. But i tried to enabled it. But i don't know what kind of connection it's using now. (the problem was also before)

augard commented 2 years ago

I found the reason! It's because of default setting for "Poll interval (sec)", it's set to 60s, when i set it to 1s it works correctly.

Can we have just faster refresh of switch status, because i don't thing it's good idea to fetch every parametr from shellys every 1s :)

hakana commented 2 years ago

The update of the switch state uses CoAP which is a real-time protocol with direct updates with no delay. A better way is to look at why CoAP not working for you anymore. You can see the protocol attribute and see what it says and if it has CoAP-msg in it.

Moxser commented 2 years ago

The update of the switch state uses CoAP which is a real-time protocol with direct updates with no delay. A better way is to look at why CoAP not working for you anymore. You can see the protocol attribute and see what it says and if it has CoAP-msg in it.

Thanks for your help. Where I can find the CoAP's msgs?

augard commented 2 years ago

Yes, any hint how to check it?

SLeopold1986 commented 2 years ago

Hey, last year I have made a change to the TROUBLESHOOTING.md because of not working CoAP on ASUS Mesh Systems. But I think thats also a Problem with other Routers. Disabling Multicasting is oft a security feature so do the following could help:

An alternative possibility for CoAp and ASUS AiMesh) The ASUS AiMesh blocks multicast CoIot packages. For this reason it is also possible to simply disable multicasting for CoIot in the shellies settings. This brings the advantage that the packets are correctly forwarded to Home-Assistant / ShellyForHASS even over different nodes. So your Shellies can be connected to the different mesh nodes (This ensures a better WLAN connection of your Shellies because they connect to the best node by the still possible roaming) and you still have instant updates:

To disable multicasting:

Open the web page for each individual Shelly device. Then go to the "Internet & Security" section. Then, in the "Advanced Developer Settings" section, you will find the option to enter an IP under "CoIot peer". There you enter the IP of your Home-Assistant server followed by the port: 5683. (e.g.: 192.168.1.29:5683). Furthermore the checkbox "Enable CoIot" should be activated.

augard commented 2 years ago

@SLeopold1986 Thanks! Setting it to CoAP to homeassistant address fixed it. I am ussing Tp-link Deco (X60). So it have probably same issue as Asus mesh system. (Disable mesh in admin for shelly devices din't help)

radeon79 commented 2 years ago

Very thanks, with CoAP option is working fine for me also.

Il giorno lun 7 mar 2022 alle ore 11:20 Lukas Foldyna < @.***> ha scritto:

@SLeopold1986 https://github.com/SLeopold1986 Thanks! Setting it to CoAP to homeassistant address fixed it. I am ussing Tp-link Deco (X60). So it have probably same issue as Asus mesh system. (Disable mesh in admin for shelly devices din't help)

— Reply to this email directly, view it on GitHub https://github.com/StyraHem/ShellyForHASS/issues/651#issuecomment-1060442822, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5DAK4WBWIQA3WWJSNNX73U6XJ73ANCNFSM5OMQMP7Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

ndom91 commented 1 year ago

Also I coudln't get it to use the CoAP-msg mode when I had them auto-discovered via discovery: true in the configuration.yaml.

But when I manually added them to the devices: array, they immediately worked via CoAP.

i.e.

image