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

API call error with status 229 #17

Open
nebosphere19 opened this issue Nov 11, 2024 · 6 comments
Open

API call error with status 229 #17

nebosphere19 opened this issue Nov 11, 2024 · 6 comments
Labels
question Further information is requested

Comments

@nebosphere19
Copy link

Describe Your Problem:
Getting this over and over in error logs: [11/11/2024, 11:52:55 AM] [homebridge-blueair-purifier] Error getting valid devices status, reason:API call failed after 3 retries with error: Error: API call error with status 229: , {"message":"There are too many calls, please try again later"}. Retrying in 5 seconds...

Logs:

Show the Homebridge logs here, remove any sensitive information.

see above
Plugin Config:

.

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version:
  • Node.js Version:
  • NPM Version:
  • Operating System:
@nebosphere19 nebosphere19 added the question Further information is requested label Nov 11, 2024
@jwall87
Copy link

jwall87 commented Nov 12, 2024

Getting the same issue. I had it working so well over the weekend!

[11/12/2024, 6:32:46 PM] [homebridge-blueair-purifier] Error getting initial device states: Error: API call failed after 3 retries with error: Error: API call error with status 229: , {"message":"There are too many calls, please try again later"} at BlueAirAwsApi.apiCall (/homebridge/node_modules/homebridge-blueair-purifier/src/api/BlueAirAwsApi.ts:252:17) at processTicksAndRejections (node:internal/process/task_queues:95:5) at BlueAirAwsApi.getDeviceStatus (/homebridge/node_modules/homebridge-blueair-purifier/src/api/BlueAirAwsApi.ts:148:18) at BlueAirPlatform.getInitialDeviceStates (/homebridge/node_modules/homebridge-blueair-purifier/src/platform.ts:84:23) at HomebridgeAPI.<anonymous> (/homebridge/node_modules/homebridge-blueair-purifier/src/platform.ts:45:7)

@jwall87
Copy link

jwall87 commented Nov 13, 2024

Update - I increased the polling interval to 45000 (45 seconds). This is probably much more than what is required but it helped solve the issue for now. I'm guessing when I tried this last night that I was already at my max requests for the day. Probably need some trial and error to see what the new polling amount can be. Guessing BlueAir changed it to a higher threshold.

@kovapatrik
Copy link
Owner

kovapatrik commented Nov 15, 2024

Yes, you must definitely has to wait after you get rate limited. Maybe I need to implement a logic to stop doing requests until a set time.

@samuelbeaulieu
Copy link

I had the same error all morning today. I was at 15000, then bumped it to 30000 -> 45000 -> 60000. It was still not working. I then went all the way to 300000 (5 mins) and the error went away after restarting the child bridge. I'll keep it this way for now.

@kovapatrik
Copy link
Owner

kovapatrik commented Dec 5, 2024

Keep in mind you have to wait for a set amount of time before the rate limiting lifted from you (I don't know the exact time as this is set by the Blueair servers). So I wouldn't handle your case as a fact.

@samuelbeaulieu
Copy link

Oh! I see. I didn't take that into consideration, you're right! 🤦🏻‍♂️

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

No branches or pull requests

4 participants