knuckleheadsmiff / homebridge-garagedoor-ryobi

Homebridge plugin for Ryobi GDO (Garage Door Opener)
4 stars 4 forks source link

App stops responding #9

Closed bobbakh closed 4 years ago

bobbakh commented 4 years ago

I found that after I installed this, about a week later, the app would stop working, and even using the Ryobi app I could not open/close, or turn on/off the light. If I disable the homebridge and wait 4 days, seems to go back to normal. Almost seems like the server side buffere at Ryobi is filling up with requests, and it is working through them slowly. Has anyone else run into this?

knuckleheadsmiff commented 4 years ago

Sorry, I have not seen this. Did you have errors in the logs?

I don’t know how many people use this app so I won’t claim that this is not the cause of your issue but I have been unsung it from 9ish months and never had an issue except when some server issues appeared recently on Ryobi’s side causing timeouts...but even then it still works, just took a little longer than it should to check the door state.

Now I do automatically restart my server every night with a cron job because I’ve had issues with homebridge (even before using my app) flacking out every few days. But even that would not explain what your seeing with the robin app.

knuckleheadsmiff commented 4 years ago

If your polling state/s is too short this could trigger ryobi thinking you are doing a DOS attack and block logins from your account or ip address.

The default, which I use, is 90 seconds (15 seconds when opening and closing) does not have a problem.

bobbakh commented 4 years ago

my setup looks like this "accessories": [ { "accessory": "RyobiGarageCommand", "name" : "Garage Door", "email" : "RYOBI_EMAIL", "password" : "RYOBI_PASSWORD" } ]

Just generic.

All I have in the logs is [5/30/2020, 20:39:37] [Garage Door] Error update 2 - retrieving ryobi GDO status [5/30/2020, 20:39:53] [Garage Door] Error update 2 - retrieving ryobi GDO status [5/30/2020, 20:39:57] [Garage Door] Error update 2 - retrieving ryobi GDO status

And if I restart it nightly, it always alarms that the door is closed on startup, anyway to stop that?

knuckleheadsmiff commented 4 years ago

I use the same settings.

I recently saw those same errors but not on May 30th and not that close together--maybe your door was in the opening/closing state when they occurred? For me they went away and I have not seen them for awhile which makes it hard to debug. But even with those errors things seem to work, just more slowly. I only stated to periodically see them sometime after I picked up changes from a "Andy B" to enhance how all the communication to the backend server was done to stop from sending passwords and to make use of cookies. I'm not sure if they are related to his changes. You could try installing the prior build version 0.2.4 which is before the new code. The only know bug in that version is passwords with special URL characters (slashes...) were not being encoded correctly.

If you wanted to get more info about those errors, which would help me greatly, you can run HomeBridge in debug mode (with the -D option) and also set the "debug_sensitive" parameters on the ryobi app. But search for your password before sending if it shows in the logs.

As far as triggering "case" alert at startup. I looked into that for sometime but I could not figure out how to suppress it. I'm not an expert in this stuff so if someone knows how to suppress it that would be great. What I do is I turn off notification in HomeKit on my devices for a couple of min around the time my machine reboots.

bobbakh commented 4 years ago

No worries, I disabled it for now, and I'll try it with the debug in a few weeks when the inability to take network commands subsides. it's all locked up right now

gescarra commented 4 years ago

I've seen the API go down quite often recently, with an extended outage on July 5th

knuckleheadsmiff commented 4 years ago

It's been very stable for me for the past few weeks. It is possible I had problem in the 5th, can't remember. I have had more issues with Ryobi's own app stop sending "open"/"close" and "door left open" notifications and have had to disable and reenable them a few times in the past two months where as the home kit notifications have been more reliable.

It's all a big hack anyway. :-(

gescarra commented 4 years ago

Oh yea, I meant the Ryobi API has been taking a dump, not your app/code. So far zero issues with it, love it!

zachrybaker commented 4 years ago

I cannot yet tell you if it is the docker image of homebridge I am using, or this plugin, but it only works for a few days before jumping the shark. If I restart homebridge it comes back so I am inclined to think its not the plugin, but no evidence really. Unfortunately its down for a while before I notice, but every 90 seconds I see a pair of errors in the log:

[8/28/2020, 9:10:34 PM] [old settlers] Error update 1 - retrieving ryobi GDO status [8/28/2020, 9:10:34 PM] [old settlers] Error Message: TypeError: Cannot convert undefined or null to object

I don't have anything special to my homebridge or ryobi setup, other than I changed from the default pw on the homebridge docker image for the homebridge with GUI image. If I get more information, I'll post. I'm running homebridge on docker on unraid, FWIW.

knuckleheadsmiff commented 4 years ago

This just tells me that it can’t reach Ryobi servers which is tries to periodically to get the garage door state. It is most likely your OS network stack is having issues after being up for awhile, some kind of resource leakage. I myself run homebridge on a raspberry pi and have always had issues with plugins failing after being up for a long time. A very long time ago I configured my raspberry pi to automatically reboot early in the morning, and to roll over my logs.

You could enable a deeper level of debug messages, see the instructions, but given that a restart is fixing things it seems unlikely to tell me much more.

(BTW. I don’t know what a docker image is.)

knuckleheadsmiff commented 4 years ago

I'm going to close this issue. If I see new reports of issues I'll try to look into it more but I don't see anything concrete that I can investigate. Sorry.