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
MyQ fails to setup with 401 or 429 error #101763
Comments
I am having the same issue as well. I recently hooked an ESP32 up to my garage door opener and added 2 reed switches to the garage door so I can control it locally. Very glad I did it. |
Confirming similar behavior and the same error returned from MyQ after reloading HA when the integration is starting. Was working OK since the previous fix was merged until breaking again this morning.
Similar to @sanctas, I have a ratgdo (https://paulwieland.github.io/ratgdo/) kit on order for local control of my Security+ 2.0 opener, but it would be helpful to have this integration working again until my backordered unit ships out. Thanks all! EDIT: Wanted to add that the MyQ app on android is working without issues from the same network/internet connection used by my HA instance. |
I actually used an ESP32 soldered to my wireless garage door opener. I'd use the Ratgdo but it's backordered so I went this route instead. |
I lost connect in the last 30 minutes due to 429 Too Many Request but phone app still works: Config entry 'xxx@xxx.com' for myq integration not ready yet: Got 429 error - stopping request until 2023-10-10 16:30:38.802025. there were 1 request; Retrying in background |
Getting 401 starting from 8:14AM (PDT). Ordered ratgdo and waiting for it to be arrived. |
Hey there @ehendrix23, @Lash-L, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) myq documentation |
Do you have a link handy explaining how this gets wired up/flashed? I'd like to do the same. Edit: Found this. It should work for me. |
Just started geting this error - first it was the 429 error, deleted the integration and waited til the specified time, then tried re-adding it again and now get 401 unauthorized. |
@home-assistant rename MyQ fails to setup with 401 or 429 error |
As a reminder - please upvote the original post if you are having the same problem, do not add extra comments stating that you have the same problem - instead upvote the original post. I get buried in notifications and it is extremely difficult to separate helpful information and just chatter. I don’t have a ton of time this week to try to look at it, but I will try my best. As a reminder to everyone - I don’t own one of these devices, and I am always looking for a new codeowner, I have had one user step forward and attempt to diagnose some problems, I will give them as much support as I can with my limited time this week and if they aren’t able to figure it out, I will try to solve what I can with my limited time |
It doesn't seem to be specific to HomeAssistant version. I rolled back to 2023.9.3 and the issue persists. |
I am on 2023.9.2 but the latest MyQ code and it is failing |
Fixed by updating api.py so that the call to get the OAuth token more closely represents a valid OAuth token call. Changes highlighted in yellow:
As text:
|
And as an aside, it seems that MyQ is slowly tightening their API validations; the code needs a thorough once-over to make sure it's actually compliant with OAuth properly and it isn't doing any other extraneous/incorrect stuff; because given the history of this integration over the past month or so, any further deviations from the spec lurking in the code are likely to result in additional breakage in the future. And also to add, if you apply this fix you may continue to receive 429 errors until your rate limiting on the MyQ API (caused by the broken code previously running and having sent too many requests to the API and getting your IP temporarily blocked for a while). Those issues should clear up within an hour or two. |
Hey @drysart Thanks for your insight. That's rather interesting - it is my understanding that basically everything the maintainers before me have in this library is just a port from the homebridge myq api. They use scope, client_id, secret, etc. I have a dummy account with no devices that I have used for testing for logging in before - I can give this a try in a bit and see if I get similar results. Where do you get your "Basic SU9TX0NHSV9NWVE6" from? Feel free to make a PR on the python-myq repo I'd be more than happy to directly merge in your changes if it works for me as well (If you don't want to for any reason - I can make the changes later) |
It's just base64 encoded I applied drysart's change and am still throttled, but maybe it just needs to clear. |
Can confirm after changes and after the timeout expired I was able to authenticate correctly. The interesting thing now is to see if we get 429's since it is calling more frequently than once per minute. |
Trying this now... will report back. Edit: Still getting 429s, will wait another hour or 2. Edit edit: Confirmed. Nice work, @drysart! |
Most likely. I grabbed it from a Postman login request to MyQ.
I don't think it will. The 429s were arising in the first place because the login logic basically spams the service with retries when the login fails (it retries 5 times, then homeassistant restarts the integration which causes it to do it again right away). Without that issue, the API usage should be well below the rate limits. |
Can confirm that @drysart 's fix did resolve this, once my timeout expired. Has been solid for 10 minutes. Will report back if it loses availability. Thanks! |
I have tested @drysart ‘s changes and can confirm they are working for me and my HA instance is authenticating correctly. Thank you!! I had disabled the (broken) integration probably 4-5 hours ago when I noticed it wasn’t working, and I didn’t get a 429 error when I tried the changes just now, so if you try and it doesn’t work, try again in a couple hours. |
Just wanted to confirm that @drysart 's changes are working for me as well. I would suggest anyone having issues with this to disable able the integration until you get an update to avoid any 429 Rate limit errors Also, Thank you!! |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.DefaultFontHxMailStyle
{mso-style-name:"Default Font HxMail Style";
font-family:"Tahoma",sans-serif;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->I second the PR.( I can wait like the 403 change) I am a novice on Modifying .py files. Any help is appreciated. Sent from Mail for Windows From: Luke LashleySent: Tuesday, October 10, 2023 3:48 PMTo: home-assistant/coreCc: atruest; AuthorSubject: Re: [home-assistant/core] MyQ fails to setup with 401 or 429 error (Issue #101763) Hey @drysart Thanks for your insight. That's rather interesting - it is my understanding that basically everything the maintainers before me have in this library is just a port from the homebridge myq api. They use scope, client_id, secret, etc.I have a dummy account with no devices that I have used for testing for logging in before - I can give this a try in a bit and see if I get similar results. Where do you get your "Basic SU9TX0NHSV9NWVE6" from?Feel free to make a PR on the python-myq repo I'd be more than happy to directly merge in your changes if it works for me as well—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@drysart updated api.py working for me! Thanks! |
Also got hit with the 429 error about 3 hours ago.
|
The latest batch of 429 errors are from the https://partner-identity.myq-cloud.com/connect/authorize endpoint and appear to be Cloudflare anti-bot challenges, which require cookies and javascript to get past. It might be necessary to kick out to a browser to get past these. |
Is there a configuration setting where we can reduce the cadence?
I don't think I'm getting a 429, but have 3 doors so I'm thinking I'm a candidate for using their API too much? I'm not sure if the integration is smart enough to bundle all 3 doors in a single request or not.
Get BlueMail for Android<https://bluemail.me>
On Oct 18, 2023, at 3:54 PM, Kevin Korte ***@***.******@***.***>> wrote:
Also got hit with the 429 error about 3 hours ago.
Logger: homeassistant.components.myq
Source: helpers/update_coordinator.py:322
Integration: MyQ (documentation<https://www.home-assistant.io/integrations/myq>, issues<https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+myq%22>)
First occurred: 9:58:49 AM (1 occurrences)
Last logged: 9:58:49 AM
Error fetching myq devices data: Got 429 error - stopping request until 2023-10-18 17:43:49.017082. there were 30367 request
—
Reply to this email directly, view it on GitHub<#101763 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABZNQC3F4KHJJDJVO2FHJRTYAAXWNAVCNFSM6AAAAAA52SFHWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRZGIZDCMZUHE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Even more reason to develop one that doesn't require their cloud services.
Not that I have the time to do that either though 😁
Get BlueMail for Android<https://bluemail.me>
On Oct 18, 2023, at 5:07 PM, Joe Shaw ***@***.******@***.***>> wrote:
The latest batch of 429 errors are from the https://partner-identity.myq-cloud.com/connect/authorize endpoint and appear to be Cloudflare anti-bot challenges, which require cookies and javascript to get past. It might be necessary to kick out to a browser to get past these.
—
Reply to this email directly, view it on GitHub<#101763 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABZNQC3WJA3ONC2UIN6DAGLYABAJ3AVCNFSM6AAAAAA52SFHWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRZGMZDCMZTGE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
FYI go ahead and disable your MyQ addons until this is resolved. |
How come this doesn't trigger on the phone app? Is there some cert or something embedded in the app? |
@jeeftor The login process runs a browser which gets through the Cloudflare bot check. |
I'm seeing the 429 errors as well in the last day or two. Not sure if this is helpful: 10/19/2023, 8:38:13 AM Bridge myQ Configuration change
10/19/2023, 8:38:13 AM Bridge myQ bridgemyq stopping
10/19/2023, 8:38:13 AM Bridge myQ myQ Garage [ ERROR ] myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity.
10/19/2023, 8:38:18 AM Bridge myQ Bridge myQ starting
10/19/2023, 8:38:18 AM Bridge myQ Loaded plugin 'homebridge-myq'
10/19/2023, 8:38:18 AM Bridge myQ [ DEBUG ] Registering platform 'homebridge-myq.myQ'
10/19/2023, 8:38:18 AM Bridge myQ Loading 1 platforms...
10/19/2023, 8:38:18 AM Bridge myQ myQ Garage Debug logging on. Expect a lot of data.
10/19/2023, 8:38:18 AM Bridge myQ Bridge is running on port 51856.
10/19/2023, 8:38:19 AM Bridge myQ myQ Garage myQ API: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity. Retrying the API call.
10/19/2023, 8:38:19 AM Bridge myQ myQ Garage myQ API: Switching to myQ cloud region: east.
10/19/2023, 8:38:19 AM Bridge myQ myQ Garage myQ API: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity. Retrying the API call.
10/19/2023, 8:38:19 AM Bridge myQ myQ Garage myQ API: Switching to myQ cloud region: west.
10/19/2023, 8:38:19 AM Bridge myQ myQ Garage myQ API: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity. Retrying the API call.
10/19/2023, 8:38:19 AM Bridge myQ myQ Garage myQ API: Switching to myQ cloud region: auto. I've removed and reinstalled the bridge without success. I've stopped it for now. |
Is it possible to connect to a different service such as total connect and control.from there. I have TC already connected. Why can't we pull in the the other devices such as myq |
Mine was not working yesterday but appears to be working again today. |
@mstberto same for me.. I disabled the integration when the "problem" reappeared on October 17. I just saw your post, re-enabled the MyQ integration. I'm back in business. until the next time ;-) edit 1: (one day later) it's back!!! 429 errors. I've disable the MyQ integration and ordered 2 of these: https://www.athom.tech/blank-1/garage-door-opener-for-esphome ... nice packaging, pre-flashed, No blinking warning light when closing. I'll follow along to see how this saga turns out, but my garage doors will work reliably from HA in the meantime. |
On 10.3.. I never disabled mine to begin with and it was failing. Still failed when I tried restarting the integration. Disabled, restarted HA, and re-enabled and it's working now. |
Hi all! It sounds like some of you have working systems as of today? I just noticed this issue today and I am still experiencing it Running Homebridge 1.6.1 Whenever I turn on myQ I get this every two mins: [10/20/2023, 7:01:05 PM] [Garage Doors] myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. This typically indicates a myQ API lockout for a 60-90 minute period before resuming API connectivity. Notably, if I rollback to Homebridge myQ v3.4.2, I get this every two mins: [10/20/2023, 7:05:22 PM] [Garage Doors] myQ API error: Temporary myQ API server-side issues encountered: 429 - Too Many Requests. Does anyone know what exactly I need to do to get the latest version working again? Thanks! |
I removed, reinstalled, and changed my myQ password to no avail. Still getting same 429 errors. Bridge myQ v3.4.3 |
I performed the same steps as @RyTheITGuy and have the same issues |
H.A. 2023.10.3 Error 429s here too, I guess they're starting to get really picky with who does and doesn't have access to the API? If sniffing the mobile app's network traffic would be helpful I can try and investigate that. |
They started throttling calls to get status unless the originator comes from an affiliate |
This makes no sense. When I install the pymyq folder in my custom components I can sign in and get the 429 error. When I run the installation from the internal folder I get failed to connect. Is there a way to authenticate externally through a web browser? |
I wouldn't draw any conclusions from testing like that. They have Cloudflare's bot protection on pretty sharply, so as soon as you start getting 429 errors, all bets are off until the heat on you cools down. The 429s aren't really traditional rate limiting; it's Cloudflare detecting a potentially automated access and throwing up a challenge page with a 429 status code. There isn't really a good workaround for that for Home Assistant, because even if you do an initial authentication request from a browser and grab some cookies to plug into HA (like some other integrations do), those cookies are only good for a relatively short period of time before Cloudflare will start challenging again; so unless you want to be authenticating manually every few hours it's not worth doing. Honestly, at this point, just tell everyone you know not to buy any MyQ devices, give them one star reviews on every online storefront you can find; and then wire up a Shelly or a ratdgo or some other roll-your-own solution and give up on using MyQ automation entirely. Short of a significant policy change with MyQ management, that's going to be the only reliable solution. |
Is there a way to piggy back off an authenticated system. For example I have totally connect. They are connected through that. |
I am in while hearted agreement. I've thrown in the myQ towel. I have some ratgo's on the way (on backorder though). I recently stumbled on to Shelly and it looks interesting... But giving ratgo a shot first.
Get BlueMail for Android<https://bluemail.me>
On Oct 22, 2023, at 5:25 PM, drysart ***@***.******@***.***>> wrote:
I wouldn't draw any conclusions from testing like that. They have Cloudflare's bot protection on pretty sharply, so as soon as you start getting 429 errors, all bets are off until the heat on you cools down. The 429s aren't really traditional rate limiting; it's Cloudflare detecting a potentially automated access and throwing up a challenge page with a 429 status code.
There isn't really a good workaround for that for Home Assistant, because even if you do an initial authentication request from a browser and grab some cookies to plug into HA (like some other integrations do), those cookies are only good for a relatively short period of time before Cloudflare will start challenging again; so unless you want to be authenticating manually every few hours it's not worth doing.
Honestly, at this point, just tell everyone you know not to buy any MyQ devices, give them one star reviews on every online storefront you can find; and then wire up a Shelly or a ratdgo or some other roll-your-own solution and give up on using MyQ automation entirely. Short of a significant policy change with MyQ management, that's going to be the only reliable solution.
—
Reply to this email directly, view it on GitHub<#101763 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABZNQC3UMGQLKCHO7VU7FBDYAWFMDAVCNFSM6AAAAAA52SFHWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUGIYDEOJWHE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
When I upgraded my doors I did not realize the ISY994 sensor I used for years would not work any longer because the contacts are not available on the opener. I can implement some other local solution as above but one of my main uses for the MyQ integration is detecting the two garage doors on a second house not on the local network. Something I cannot do with a local solution. Its hard to understand why MyQ engineers and managers do not see the importance of providing a solution for the growing open source smart home market. I guess they want control. |
> When I upgraded my doors I did not realize the ISY994 sensor I used for years would not work any longer because the contacts are not available on the opener. I can implement some other local solution as above but one of my main uses for the MyQ integration is detecting the two garage doors on a second house not on the local network. Something I cannot do with a local solution. Its hard to understand why MyQ engineers and managers do not see the importance of providing a solution for the growing open source smart home market. I guess they want control. And $$$$$$!~ (Cha Ching!!) But to be so shortsighted.....? I guess taking advantage of an already entrenched (loyal?) customer base for ongoing revenue streams trumps (and I mean that word with all the irony it carries) any beneficial goodwill to this community. They see the $$ opportunity and grab, as more of this market is tending to do. I myself don't hold out hope for Matter to make things any better. |
In fact, I am using another integration (https://github.com/brbeaird/SmartThings-MyQ-Edge) in a docker container that "was" also suffering 429's. But some hours ago, the thing came alive ... |
Blackrock bought them a couple years ago, which explains most of the behavior. |
@JanVanHyfte seeing your post I re-enabled the MyQ integration. Surprisingly it works again. I'll leave it enabled until it goes bad again. Since I have a 10 year old door opener I am going to try this: https://www.reddit.com/r/homeassistant/comments/17d2sq6/comment/k5u3zt7/?utm_source=share&utm_medium=web2x&context=3 Edit 1: It was good for about 15 minutes... back to 429 errors. Disable the integration again. End of experiment. |
I have an update here: https://community.home-assistant.io/t/the-current-state-of-myq-from-the-codeowner/630623 |
The problem
HA 2023.10.1 worked ok for a few days but now similar failure when trying a reload. See error log below
What version of Home Assistant Core has the issue?
2023.10.1
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
MyQ
Link to integration documentation on our website
No response
Diagnostics information
Logger: homeassistant.components.myq
Source: helpers/update_coordinator.py:322
Integration: MyQ (documentation, issues)
First occurred: 10:19:24 AM (1 occurrences)
Last logged: 10:19:24 AM
Error fetching myq devices data: Error trying to re-authenticate to myQ service: Error requesting data from https://partner-identity.myq-cloud.com/connect/token: 401 - Unauthorized
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: