-
Notifications
You must be signed in to change notification settings - Fork 35
Description
I first created an issue in home-assistant.
After some digging, it seems appropriate to me to address the issue here.
My setup with Netatmo is 7 Roller Shutters.
I experience (multiple time each days) some errors:
[pyatmo.auth] The Netatmo API returned b'{\r\n "error": {\r\n "code": 11,\r\n "message": "Failed to enter concurrency limited section"\r\n }\r\n}' (429)
According to Netatmo themselves, this is a protection for their backend:
Thanks for this well explained feedback
This error comes from a part of a mechanism we introduced in the WAF to protect our backend when too many requests arrive at our servers on a global scale. The goal is to avoid degradation of the response times and/or shutdown of the service. In a nutshell it means "We have too many requests for now. Please retry later". It's not linked to your personal calls quota
So, it's normally not linked to a bad implementation of the API on your side. As it's a recent change, teams are monitoring this in order to see if we keep or adjust this mechanism
Is it a good idea to add a retry mechanism inside async_post_request (with the special error code 11) ? With some backoff of course.
I can make a PR implementing it, but I prefer asking if it could be well received or if it is a bad idea.