ShellyForHASS: [BUG] shellyforhass.click huge delay with Shelly 1 Switches

Environment

  • ShellyForHASS release with the issue: 1.9
  • Last working ShellyForHASS release (if known): (new feature)
  • Home Assistant Core release with the issue: 113.1
  • Operating environment (Home Assistant/Supervised/Docker/venv): Docker

Describe the bug

The event shellyforhass.click seems to work just fine with a Shelly Button 1. However, the Shelly 1 switches show a huge delay before firing the shellyforhass.click-event (sometimes up to 50 seconds!). The state of the switch itself updates correctly and in a timely manner, so the shelly_switch_click-event still works as well as it did before…

Steps to Reproduce

  1. Setup a Docker with ShellyForHass installed on Home Assistant
  2. Hook up a Shelly 1 to a switch (momentary)
  3. Register event listener to shellyforhass.click
  4. Observe state of the switch in one browser window …
  5. …and observe the output of the event listener in another

Expected behavior

The event should be fired within a second or so of clicking the button.

Screenshots

GIF of behavior (Duration: 50 Seconds)

ezgif com-video-to-gif (1) Notice the switch change and how long it takes for the event to be triggered

Traceback/Error logs

Nothing as far as I can tell...

Additional context

This issue is weird since it’s inconsistent. Sometimes it works right away, other times it takes nearly a minute to trigger…

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 35 (12 by maintainers)

Most upvoted comments

Thanks for the heads up 😃 - I deleted my response. I made a bit of progress in the meanwhile. By setting scan_interval to 0 the delay is subretinally decreased - but not gone. I am not sure if I understand the description of this variable: If the not CoAP supported this will be the delay for status updates. Does this mean that CoAP is not supported in my setup or that it is?