hacs-govee: Rate limit exceeded

I’ve had this problem for the last couple of weeks where Home Assistant can’t connect to Govee API due to rate limit exceeded.

Logs:

2022-05-14 06:32:50 WARNING (MainThread) [custom_components.govee] Could not connect to Govee API: API: API-Error 429: {"message":"rate limited! the limit is 10000 requests every 24 hours. X-RateLimit-Reset in Http Response Header shows the reset time."}
2022-05-14 06:32:50 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry govee for govee
  File "/config/custom_components/govee/__init__.py", line 67, in async_setup_entry
AttributeError: 'Govee' object has no attribute 'rate_limit_delay'

I don’t have any other API connection to Govee, and the few automations I have run a few times daily.

govee v0.2.2 home assistant 2022.5.4 (though it started with 2022.4.x)

A few days after it originally happened, it just started working again for a day or two, but now it’s back to blocked. I tried to downgrade to 0.2.1 by redownloading it via HACS, but after restart it’s still at 0.2.2. Do I have to uninstall it first? I haven’t tried an uninstall since I didn’t want to mess up my entities.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 30 (1 by maintainers)

Most upvoted comments

Below is the developer documentation for the Govee API. This should help you diagnose your issue. Screenshot_20220627-071130.png

Hitting the same issue as well.

Could not connect to Govee API: 
  API: API-Error 429: {"message":"rate limited! the limit is 10000 requests every 24 hours.
   X-RateLimit-Reset in Http Response Header shows the reset time."} 

I currently have 3 lights in my house. So I modified the CONF_DELAY (POLL_INTERVAL) to 30 and let’s see how it goes.

3600 secs == 1hr

3600sec / 30sec  = 120 reqs per hour per light

120 req * 24 = 2880 req per day per light 

2880 * 3 =  8640 req per day for all 3 lights

Before I had each 10 seconds, so it was easily hitting 25920 reqs/per day for all lights.

I’ll report the results.

This is also good information https://github.com/LaggAt/hacs-govee#caveats