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

Receiving HTTP 429 errors #122

Closed
ajain-93 opened this issue Nov 29, 2022 · 24 comments
Closed

Receiving HTTP 429 errors #122

ajain-93 opened this issue Nov 29, 2022 · 24 comments
Labels

Comments

@ajain-93
Copy link
Contributor

ajain-93 commented Nov 29, 2022

Describe the bug
Unable to update any of the sensors, all sensors showing up as unavailable.
Started receiveing HTTP 429 errors since 12 hours ago.

To Reproduce
-

Expected behavior
The sensors updates at interval.

Screenshots
image

image

Additional context
Log ouput:

This error originated from a custom integration.

Logger: custom_components.toyota
Source: helpers/update_coordinator.py:223
Integration: Toyota Connected Services (documentation, issues)
First occurred: 9:13:20 PM (5 occurrences)
Last logged: 9:15:07 PM

Error fetching toyota data: HTTP: 429 - Too Many Requests. Please try again later.
@roenlond
Copy link

Same issue with my system. I've tried deleting both the integration and the HACS package while restarting HA with no effect. Following this issue, thanks for reporting

@Aad3229
Copy link

Aad3229 commented Nov 30, 2022

Exactly the same here. All sensors unavailable:
Error fetching toyota data: HTTP: 429 - Too Many Requests. Please try again later.
Error fetching toyota data: Update canceled! Toyota's API was too slow to respond. Will try again later...

@ajain-93
Copy link
Contributor Author

Tried updating the integration using the github-repo (rather than the release in HACS).

After Disabling and Enabling the integration, there is an Failed to set up error on the integration screen.
image

Checking the logs, it shows the same 429, as well as an Update Cancelled error.

Log Output

This error originated from a custom integration.

Logger: custom_components.toyota
Source: helpers/update_coordinator.py:223
Integration: Toyota Connected Services (documentation, issues)
First occurred: 8:52:54 AM (139 occurrences)
Last logged: 11:58:46 AM

Error fetching toyota data: HTTP: 429 - Too Many Requests. Please try again later.
Error fetching toyota data: Update canceled! Toyota's API was too slow to respond. Will try again later...

@lkucytowski
Copy link

lkucytowski commented Nov 30, 2022

It's now taking forever to pull any data in their official app, somebody in Toyota needs to restart the NGINX ;)
Their infrastructure is in shambles, probably running on a potato, hopefully the problem will go away soon.

@DurgNomis-drol
Copy link
Owner

It's now taking forever to pull any data in their official app, somebody in Toyota needs to restart the NGINX ;) Their infrastructure is in shambles, probably running on a potato, hopefully the problem will go away soon.

Toyota's servers are the worst things I have ever worked with 😆 😭 They crap out for no reason what so ever

@fransward
Copy link

Same here. Could it be that they modified their api rate limiter?

@ald3baranfr
Copy link

hello
same issue for me.

@daha76
Copy link

daha76 commented Dec 3, 2022

Same issue for me. I can't get it work for several days...

@rpetteruti
Copy link

Same here

@ndriu
Copy link

ndriu commented Dec 4, 2022

same here for many hours...

@AdrianStanciu22
Copy link

A possible explanation could be here: https://twitter.com/samwcyo/status/1597792097175674880

@ajain-93
Copy link
Contributor Author

ajain-93 commented Dec 4, 2022

The API for Toyota (MyT) is still online. Debuggning a HASS integration was a little bit too much for me. I tried my shot reverse-engineering the API and realised that this integration is an spinoff/inspired from the project https://github.com/calmjm/tojota.

I have now created a fork of the above project, which publishes data to MQTT when executed (this can be accomplished via an automation and Shell Command), from which HASS can automatically pick up the data. Note, I do not have any remote control functions, hence they are not present in the published MQTT data.

image

If @DurgNomis-drol could point me in the right direction for debug I can help try to solve this issue in this integration.

@primeroz
Copy link

primeroz commented Dec 6, 2022

even with testing just the simple example in https://github.com/DurgNomis-drol/mytoyota/tree/v0.7.7 i get 429 as soon as client.get_vehicle_status(car) is called which seems to issue 4 concurrent requests https://github.com/DurgNomis-drol/mytoyota/blob/v0.7.7/mytoyota/client.py#L248

I guess we need to limit the number of concurrent requests ?

@Iture
Copy link

Iture commented Dec 6, 2022

No, it doesn't work (I've tried this approach)
I just added an issue here:
DurgNomis-drol/mytoyota#204

@DurgNomis-drol
Copy link
Owner

@Iture issue seems like a good reason as to why it does not work, or they have added aggressive rate limiting to their API to stop integrations like this from getting data from them. Either way, this will require substantial work to fix, if even possible.

@lucianlazar1983
Copy link

lucianlazar1983 commented Dec 6, 2022 via email

@joro75
Copy link

joro75 commented Dec 6, 2022

The server endpoint seems to be oke. The mytoyota library that is being used is also connecting to: "https://myt-agg.toyota-europe.com/". Can you check or determine if the complete URL of the endpoint is still: "https://myt-agg.toyota-europe.com/cma/api" (including the 'cma/api' suffix?)

@lucianlazar1983
Copy link

lucianlazar1983 commented Dec 6, 2022 via email

@ajain-93
Copy link
Contributor Author

ajain-93 commented Dec 7, 2022

@joro75:
The server endpoint seems to be oke. The mytoyota library that is being used is also connecting to: "https://myt-agg.toyota-europe.com/". Can you check or determine if the complete URL of the endpoint is still: "https://myt-agg.toyota-europe.com/cma/api" (including the 'cma/api' suffix?)

There are essentially three different endpoints used:

@DurgNomis-drol
Copy link
Owner

See #204 for the reason it does not work, will publish a fixed version soon

@DurgNomis-drol
Copy link
Owner

Can confirm fix works, will be releasing a new version shortly!

@primeroz
Copy link

primeroz commented Dec 7, 2022

thank you

@joro75
Copy link

joro75 commented Dec 7, 2022

@ajain-93 : Thanks for the information. Most of the endpoint URL's are also being used by mytoyota. However (to my suprise), some of them are also slightly different. That's interesting, but no need to change it at this moment.

@ajain-93
Copy link
Contributor Author

ajain-93 commented Dec 7, 2022

@joro75:
https://ssoms.toyota-europe.com/authenticate and https://cpb2cs.toyota-europe.com/api/ones i mentioned above are the ones I was able to reverse-engineer by checking out the Swedish MyT portal on the web. The last one though, doesn't show up for me in my webbrowser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests