home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.97k stars 29.62k forks source link

integration: shelly Very slow updates. #121364

Open dougle03 opened 1 month ago

dougle03 commented 1 month ago

The problem

I've had a Shelly EM for over a year now and all good until about 3 months ago when the power measurements updates slowed right down to sometimes as slow as once every 40 seconds. It used to report power monitoring (watts for example) about every second. I've contacted Shelly to see if they have made changes to the update frequency but they have not released a FW update for my Gen1 device for nearly a year. The only other option is the Shelly integration or HA that's throttling the update frequency on this integration...? I'm not using the Shelly cloud so this is a local issue not cloud related. Any ideas...?

What version of Home Assistant Core has the issue?

core-2024.7.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Shelly

Link to integration documentation on our website

https://www.home-assistant.io/integrations/shelly/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @balloob, @bieniu, @thecode, @chemelli74, @bdraco, mind taking a look at this issue as it has been labeled with an integration (shelly) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `shelly` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign shelly` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


shelly documentation shelly source (message by IssueLinks)

bieniu commented 1 month ago

Is CoIoT configured correctly?

Please enable Debug for Shelly integration, wait an hour, disable debug and attach the log.

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

Thanks

dougle03 commented 1 month ago

Is CoIoT configured correctly?

Does this look ok? 10.10.50.8 is the static IP for my HA installation. And the port is the default 8123 image

dougle03 commented 1 month ago

Please enable Debug for Shelly integration, wait an hour, disable debug and attach the log.

Running now; will revert in an hour. Thanks for your help 🙏

dougle03 commented 1 month ago

Is CoIoT configured correctly?

I am running HA core in a docker container on a RPi4 8gb - It used to update about every second, then just fell off the ball...

bieniu commented 1 month ago

And the port is the default 8123

You have to use port 5683 not 8123 https://www.home-assistant.io/integrations/shelly/

dougle03 commented 1 month ago

You have to use port 5683 not 8123

Was this a recent change? The confusing thing is that It's been working just fine, then dropped off... I'll change the port (And map it in Portainer) see if that solves the issues.

dougle03 commented 1 month ago

Please enable Debug for Shelly integration, wait an hour, disable debug and attach the log.

Hi, here's the log if that's helpful. Thanks config_entry-shelly-370f35546be2c8b03f57c062e4477566.json

bieniu commented 1 month ago

Was this a recent change?

No, port 5683 for CoIoT is used... forever.

here's the log

This is not a log file, this is a diagnostic file. But in this situation you have to catch a new log after changing the port to the correct one.

dougle03 commented 1 month ago

What's confusing me is that it used to work just fine, the update frequency was circa 1-2 seconds, then suddenly it's changed to sometimes upto 40seconds. I can turn a 3kw kettle on for 10 seconds and off again without a single update. Regardless of ColoT, It used to work better. Is ColoT a red herring perhaps? Only one error showing for the Shelly (I only have the one Shelly device). image

bieniu commented 1 month ago

Status updates every few seconds are not possible without a properly configured CoIoT unicast or (after certain conditions are met) multicast. If status updates were once more often, it means that you had to change something in the configuration of devices and/or network.