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

Alarm Decoder integration sporadically stops reading output from device until integration is reloaded #63158

Closed
mattyf opened this issue Dec 31, 2021 · 7 comments

Comments

@mattyf
Copy link

mattyf commented Dec 31, 2021

The problem

For the last several versions, I've been encountering seemingly random instances where the alarm decoder integration will just stop reading the output from my Alarm Decoder device. The state of the alarm control panel just gets stuck on whatever it happened to be on when the problem occurs, and it will never update again until I restart HA or reload the Alarm Decoder integration.

I don't ever have to do anything to the alarm decoder device itself to fix this... reloading the integration is always enough to fix it. The problem keeps recurring though, maybe once every 3-4 days.

What version of Home Assistant Core has the issue?

core-2021.12.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Alarm Decoder

Link to integration documentation on our website

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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No error messages or log messages ever seem to be generated. It just gets "stuck."

Additional information

No response

@probot-home-assistant
Copy link

alarmdecoder documentation
alarmdecoder source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @ajschmidt8, mind taking a look at this issue as it has been labeled with an integration (alarmdecoder) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@jcacavias
Copy link

I'm having this same issue. It's been happening pretty consistently since about March of 2021. When I reload the HASS Alarm Decoder integration it temporarily fixes the issue, but it returns within a matter of hours.

@mattyf
Copy link
Author

mattyf commented Jan 3, 2022

since about March of 2021.

That sounds about right for me as well, but when I reload the integration, it usually stays fixed for a couple of days.

@github-actions github-actions bot added the stale label Feb 2, 2022
@TD22057
Copy link
Contributor

TD22057 commented Feb 6, 2022

I'm not sure if my problem is the same as this or not but my alarmdecoder doesn't get 100% stuck but will miss 90% of the open/close events for RF sensors. So it will show the front door of my home being open virtually all the time. It's still running - it will pick up a state change every once in awhile but the state of the sensors is wrong most of the time. I ran a test with the lastest HA at the time (2022.01 I think) and just alarmdecoder - it worked fine. But when I added in all my other sensors, zigbee, and multiple blue iris cameras, it started missing messages all the time.

Looking at the alarmdecoder code, I believe the issue is that it reads one character at a time from the socket (no idea why). HA would prefer everything run in async mode which this isn't doing. My guess is that the alarmdecoder code is so inefficient reading data that it misses message because HA is off doing other things. As another test, I wrote an alarmdecoder->mqtt bridge and ran that as a separate process. It has worked perfectly so far - my sensors are always correct.

So my guess is that this really requires rewriting the network code portion of the alarmdecoder library. It would also be possible to override the alarmdecoder device in the adext package to use more efficient network code which in theory should make it work more reliably.

@github-actions github-actions bot removed the stale label Feb 6, 2022
@TD22057
Copy link
Contributor

TD22057 commented Feb 22, 2022

FYI: I filed this bug on the alarmdecoder library to improve the read efficiency.

@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 23, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants