Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[shelly] Shelly Plus Smoke update period #17767

Open
matmai opened this issue Nov 18, 2024 · 5 comments · May be fixed by #18309
Open

[shelly] Shelly Plus Smoke update period #17767

matmai opened this issue Nov 18, 2024 · 5 comments · May be fixed by #18309
Assignees
Labels
bug An unexpected problem or unintended behavior of an add-on work in progress A PR that is not yet ready to be merged

Comments

@matmai
Copy link
Contributor

matmai commented Nov 18, 2024

Expected Behavior

After initial setup the channel of the smoke sensors should stay in online state as all the other channels of battery operated shelly devices do.

Current Behavior

I have several Shelly Plus Smoke devices (FW 1.4.4) added to openHAB 4.2.2. After a day the thing status changes from ONLINE to COMMUNICATION_ERROR. It is interesting that the device#heartBeat channel is still updated with each wakeup of the shelly while the sensors#lastUpdate channel stays the same if the thing has changed to offline.

The problem seems to be that the devices only wakeup around every 25 hours (between 87500 and 87800 sec). One device is waking up around each 83700 sec and is staying online as supposed.

Possible Solution

Probably increasing the sleepPeriod for the device watchdog could help.
Anything I can change within the shelly config or openHAB to let the smoke sensors stay constantly online?

Steps to Reproduce (for Bugs)

  • Enable the channel of the shelly smoke plus device
  • Wait a day until the channel changes to offline

Your Environment

  • Version used: openHAB 4.2.2 and add-on versions 4.2.2
  • Operating System and version: Raspbian Bookworm
@matmai matmai added the bug An unexpected problem or unintended behavior of an add-on label Nov 18, 2024
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/shelly-plus-smoke-communication-error/160106/6

@markus7017 markus7017 self-assigned this Jan 23, 2025
@markus7017 markus7017 added the work in progress A PR that is not yet ready to be merged label Jan 23, 2025
@markus7017
Copy link
Contributor

markus7017 commented Jan 23, 2025

Usually the sleep interval is reported by the device at initialization time and the binding is using this value + 60sec

Please provide the output from http://<device ip>/rpc/Shelly.GetConfig
this should show the configured value (can't be changed)

@matmai
Copy link
Contributor Author

matmai commented Jan 26, 2025

The sleep interval is within the http://<device ip>/rpc/Shelly.GetStatus data and is reported as

"wakeup_period": 86400

In the thing properties devUpdatePeriod=86460, so the values look like as expected.

I have some smoke detectors that don't stick to the wake-up time and need up to an hour longer. Apparently there is a big variation in the wake-up time between different devices.

As far as I have researched, a tiny microcontroller wakes up the main controller after the wake-up time to save power, which is probably the reason for the big variation.

My suggestion would be to set the wake-up time for the smoke detectors to the reported wake-up time + 3600 sec.

@matmai
Copy link
Contributor Author

matmai commented Feb 21, 2025

I did some further investigation with several smoke detectors and monitored the time difference of the HeartBeat channel provided of each thing in seconds for around two weeks. Every smoke detector that takes more than 86460 seconds between its heart beats changed to state "offline/Error: Comm", all the other things/smoke sensors stayed in status online.

Here a small chart with the time diffs of the heart beats. Most of the sensors woke up around every 87600 seconds. Three of the sensors woke up in the current time limit of 86460 and stayed online.
Image

With this small statistics it looks like increasing the time limit for a response about half an hour (1800 sec) to 88200 sec would be sufficient to keep all sensor channels in online state.

@matmai
Copy link
Contributor Author

matmai commented Feb 21, 2025

@markus7017 One general question beside that: Why is the heartBeat channel still updated and the other channels not if the thing is offline? Looks like if a battery powered device never changes back to online if it is offline, even if new data is received.

matmai added a commit to matmai/openhab-addons that referenced this issue Feb 21, 2025
matmai added a commit to matmai/openhab-addons that referenced this issue Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on work in progress A PR that is not yet ready to be merged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants