-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Retry delay not working? #35
Comments
It also appears to cache the same items over and over (even though they have the same UUIDs): Running into same issue here. Sometimes getting a node memory leak error tossed in as well:
versions:
|
Turning on debug logging, I wonder if the size of this message is the issue:
Is it possible the |
Or the lack of output after the colon here (compared to the original example above) seems suspicious:
Seems like all those zeros are in there:
|
OK responding back to this thread to the next person who happens to google this. I don't think my specific issue of a shorter than expected Zone Report is specific to this plugin, or even the underlying In my case, and I don't know why this is, I had this working and then it stopped working. At some point the status reports went from being the required 208 characters to what you saw above with a bunch of null A hard powerdown/restart of the alarm system (and the ethernet module) seems to have restored things. Before:
od of raw result before:
After restart:
This is on the wire which means the underlying homebridge wrappers are not to blame here. That said, I still think the handling of the error putting the code into a rapid restart/recaching over and over is still a legit ask here on this PR. Cheers. |
I ran into what I think is a similar issue over the weekend. Something happened in Elk land and once the connection was lost and not immediately re-established, this plugin spun out of control effectively DOS'ing the elk. I have a separate automation integration that uses port 2601 and it was also unable to connect reliably due to the constant retries. I shut down the plug-in, let everything else run for 24 hours to ensure that was the source, and now turned it back on but I'm worried that it will happen again. The underlying issue, I agree, is the retry cycle must have a working delay in order to avoid this situation. |
There are two problems that I can see here:
platform.ts:
When trying to back-off on re-attempts, it increases the initial delay (5000ms) by 2x on each error. Unfortunately if the Elk is having an issue, it doesn't take long to exceed the size of an int variable and you start to get these errors in the log:
The fix would be to cap it at about 30 seconds which is very reasonable for polling a local device in an error state without spamming it:
https://github.com/sgentry/elkmon/blob/master/src/index.ts
This should be more consistent in that package (either retrying or not) as well, but unfortunately there is no way to throttle this through just the Homebridge plugin and a PR would need to be added over there as well. I submitted a PR here for the local fix, and opened an issue on elkmon for the second: |
I recently upgrade to the latest version, sorry cant remember what I was running previously but it was quite old and have recently struck an issue that I originally thought was caused by powering my m1xep off a battery that was dying during the M1's daily battery test but must be something else that I need to track down.
The issue it showed was it looks like the retry timer doesnt appear to be working and it keeps smashing connections instead of backing off which then chews up cpu and I think memory, here is a very short example of what I see but sometimes it has gone on for hours
[3/23/2022, 5:14:12 AM] [ElkM1G] Error connecting to ElkM1 TypeError: The calculated checksum does not match the checksum on the received message: DZS22220022222220200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061. Will retry in 5s
[3/23/2022, 5:14:12 AM] [ElkM1G] Error connecting to ElkM1 TypeError: The calculated checksum does not match the checksum on the received message: DZS22220022222220200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061. Will retry in 10s
[3/23/2022, 5:14:12 AM] [ElkM1G] Error connecting to ElkM1 TypeError: The calculated checksum does not match the checksum on the received message: DZS22220022222220200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061. Will retry in 20s
[3/23/2022, 5:14:12 AM] [ElkM1G] Error connecting to ElkM1 TypeError: The calculated checksum does not match the checksum on the received message: DZS22220022222220200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061. Will retry in 40s
[3/23/2022, 5:14:12 AM] [ElkM1G] Error connecting to ElkM1 TypeError: The calculated checksum does not match the checksum on the received message: DZS22220022222220200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061. Will retry in 80s
[3/23/2022, 5:14:12 AM] [ElkM1G] Error connecting to ElkM1 TypeError: The calculated checksum does not match the checksum on the received message: DZS22220022222220200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061. Will retry in 160s
[3/23/2022, 5:14:12 AM] [ElkM1G] Error connecting to ElkM1 TypeError: The calculated checksum does not match the checksum on the received message: DZS22220022222220200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061. Will retry in 320s
[3/23/2022, 5:14:12 AM] [ElkM1G] Error connecting to ElkM1 TypeError: The calculated checksum does not match the checksum on the received message: DZS22220022222220200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061. Will retry in 640s
[3/23/2022, 5:14:17 AM] [ElkM1G] Attempting to connect to Elk M1
[3/23/2022, 5:14:17 AM] [ElkM1G] Connected
From the stauts page
Node.js Version | v16.14.0
NPM version v8.3.1
Homebridge V1.4.0
homebridge-elkm1 v3.0.7
running one other real plugin
homebridge-cbus v1.1.0
The text was updated successfully, but these errors were encountered: