Jump to content

Network/server error logging into MyQ service


Xathros
Go to solution Solved by Goose66,

Recommended Posts

Updated to new MyQ poly this morning and I'm back up and running.  For those who updated and tried to restart right away, stop the poly for 30 minutes then restart.

 

Thanks @Goose66for the quick response and update!

-Xathros 

Edited by Xathros
Add a thank you
  • Like 1
Link to comment

Ok, I think the 429 - Too many requests errors is an older (like several weeks) problem that still needs to be looked at, but it should only affect restarts and usually will resolve itself if you shutdown and don't retry for at least 75 minutes. Hopefully the newer 401 error is fixed (for now).

The current code is a mish-mash of fixes and patches from changes to a couple of libraries on GitHub that have occurred over the last couple of years. I think there needs to be a complete restructuring of the oAuth authentication process, but outside of making it easier to maintain, I am not exactly sure HOW it needs to be restructured.

The entire API is made to support the app. The oAuth authentication and token retrieval process works for a short access window, i.e. do authentication when the user starts the app, get the token, then use the token while the user is using the app. The token doesn't need refreshing for over an hour, so in the majority of cases, the user will have stopped actively using the app by then. Moreover, the app makes requests in spurts, where the node server makes requests on a steady basis every 20 seconds or 60 seconds (depending on active vs. inactive polling mode), hour-by-hour, day-in and day-out. Another difference - when a connection is severed (usually MyQ servers stop responding temporarily), the node server tries to reconnect every 60 seconds by going back to square one and go through the oAuth authentication process to retrieve a new token. After four or five retries, the oAuth servers will return a retry delay required to avoid subsequent 429 errors, but it is like the aforementioned 75 minutes. So that may work for the app, but for the node server that's just not going to work.

Then there is the whole thing with userAgent, which is the change that appears to be specifically targeting the unauthorized users, and if Chamberlain is going to continue that game it's going to get harder and harder to keep it working.

I think it needs one of two things: either learn how to track the app communication with the API in order to keep up with all the changes myself (instead of waiting on others to work through the issues), or change the node server to work with one of the two libraries out there and put the burden on maintaining operability on someone else. Neither is a great solution: the former requires a level of hacking that's above my paygrade, and the latter means we have no control over the timeline. For example, much of the learning that went into the current v3.2.23 fix came from the pymyq library from arraylabs. But the fixes for the last few months are in pull requests by individual users - the latest version of the library in pypi goes back to last December. In addition, both of the libraries that appear to be maintained are async, and the node server environment for PG3/PG3x is decidedly not async.

All that to say it's complicated, I appreciate your patience, and I hope you understand why I made this one a subscription instead of a perpetual license. The ultimate solution would be for Chamberlain to publish a simple, public, REST-based API with a specified maximum polling frequency, and I think that would satisfy most users (i.e., you won't be able to turn on lights when a garage door is activated, but you can monitor door status and close them for security reasons over reasonable periods). After 5 or 6 years of working on this, though, I don't see that happening soon.

Edited by Goose66
  • Thanks 2
Link to comment

I got mine working but only after I changed my external wan IP address by moving from to my backup wan from primary.  After authenticated, I moved it back. They must be loggin the 429: too many requests against an IP address.  If that's the case you should be able to do a VPN trick to get it authenticated and then disconnect it.  I know this won't work for everyone but I did get it working this morning. If you are getting 429 errors, I suggest you stop the nodeserver completely for 2 hours and let it reset whatever counter it has going.

You can also setup another email address and invite that person to your myq account and that also seems to give some relief. I have homebridge and pg3 going against myQ and I have them on separate logins

Edited by bigDvette
Link to comment
7 minutes ago, Goose66 said:

What error are you getting? And, after the  failure and reinstall did you give it the 75 minutes (or 2 hours) before you restarted the node server.

All good now.  Updated and rebooted again to make sure I was using 5.7.0_5 and MyQ is now back in operation.  Thanks for resolving. 

Link to comment

Was (sort of) happy with MyQ for a year or so but the recent persistent login/connection issues were too much for me to want to deal with.  Installed the Insteon I/O Linc Garage Door Control over the weekend and all is well.  Disconnected the MyQ unit which had come with the house we purchased last year and I won't consider using it again.  The Insteon unit integrates well with my EISY and HomeAssistant system and is much speedier triggering events such as turning on outside floodlights when opening the garage door in the evening, and the integration with Alexa is smooth and instantaneous.

Edited by slimypizza
Link to comment
24 minutes ago, glarsen said:

The problem seems to have returned for me.  For 2 days now I have been unable to successfully restart this node server. Might be time to give up and request a refund.

429 error again. Not sure how long it's been offline as I am not home to use it and guess it has been trying hard to reconnect. Will stop it for the rest of the day and try to restart it tonight. 

I will NOT be asking for a refund as it is not the developers fault and he has been working hard to implement work arounds to the issue that Chamberlin keeps creating. 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...