hacs-govee
hacs-govee copied to clipboard
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.
Following. I've been seeing this too with a similar setup.
I removed the integration and reinstalled 0.2.1 and it's working again
Never mind, it broke again a day later with the same error in 0.2.1, though this time with more information in the error:
2022-05-16 06:06:52 WARNING (MainThread) [govee_api_laggat.api] Rate limit exceeded, check if other devices also utilize the govee API
2022-05-16 06:06:52 WARNING (MainThread) [govee_api_laggat.govee_api_laggat] error getting state for device GoveeDevice(device='FA:63:D6:31:30:30:65:2D', model='H6199', device_name='TV', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=True, power_state=False, brightness=248, color=(0, 0, 255), color_temp=0, timestamp=1652700901.220386, source=<GoveeSource.API: 'api'>, error='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."}', lock_set_until=1652677931.055981, lock_get_until=1652677932.056008, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False): 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."}
The above two messages show in the logs 3 times a second every 10 seconds. So it seems the integration is checking too frequently to get the device state, and the rate_limit_delay was either changed or removed, so it's creating a lock out.
I have been fighting the same issue - the API is only used by Govee and I have about 10 different Govee devices - 1/2 the time my Govee integration doesnt work due to the rate limit - I understand the limit, but no idea what could cause 10 devices to generate 10,000 requests in a 24 hour period? I have increased the refresh rate to 30 seconds and that didnt really help at all.
im havbintg the same issue so i got another api key and neither api keys are qworking now im guessing this has to do wqith govees servers but who knows
Same thing here - Govee lights operations now work about 10% of the time.
Same here. I saw the limit is 10000 per 24 hours. Does that mean, I've hit it that many times in a 24-hour period or does that count all of the HA users?
Same error for me - is this issue being worked on, or is it just a limitation we'll have to live with??
+1 on this issue. This went from stable to API throttling without making any configuration changes. 2 Govee devices total, and 1 is even disabled right now.
Same here. I tried all the fixes mentioned above and have had the same results. I also have the Govee skill enabled on Alexa so I thought that might be the issue. However, I disabled the Alexa skill, tried all the fixes again, and same result - works for a bit, then I've hit the limit. This is a recent issue for me too btw.
Anyway, the Govee skill through Alexa has been dependable so I've resorted to automate what I can through there. Though I'd prefer to keep scripts and automations on HA, the Govee integration still requires cloud connection to work anyway, so... I dk, I guess I'm okay with moving what I can to Alexa or the Govee app.
Actually the Govee app updated somewhat recently and they've upgraded their automation abilities. It's not as capable as HA but maybe that's a fix for some of us.
+1. Only have 3 or 4 strips or so, value set to 120 and still get these messages.
same
Running into this as well.
having same issue for a few weeks now.. I have 14 govee devices so it's happening quite frequently for me to the point it is unusable.
Having the same issue. I have two lights and maybe make 2-3 adjustments per day.
Having the same issue, however seems that the API works to turn off a light consistently (if manually turned on), but my automation won’t turn on light…..
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
Same issue
Sadly the same issue here. :(
Had the same issue with only 2 light strips, but after changing Govee Integration Poll Interval from 10 to 30 things have been stabile (so far)
So I have not experience any issues after making the change. It looks an expected issue when the poll interval is too short vs the number of lights. So I think this issue can be closed or maybe add more emphasis on this topic on the official documentation or README.md.
So what changes did you make? How many devices do you have and what did you set the polling interval to?
From: Marcelo Moreira de Mello @.> Sent: 21 June 2022 16:19 To: LaggAt/hacs-govee @.> Cc: atv2016 @.>; Comment @.> Subject: Re: [LaggAt/hacs-govee] Rate limit exceeded (Issue #78)
So I have not experience any issues after making the change. It looks an expected issue when the poll interval is too short vs the number of lights. So I think this issue can be closed or maybe add more emphasis on this topic on the official documentation or README.md.
— Reply to this email directly, view it on GitHubhttps://github.com/LaggAt/hacs-govee/issues/78#issuecomment-1161906141, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEBCFUZXBFGJAMGBEPPEUL3VQHMQ7ANCNFSM5V5T3G2A. You are receiving this because you commented.Message ID: @.***>
@atv2016 you can see my notes here -> https://github.com/LaggAt/hacs-govee/issues/78#issuecomment-1149368662
Well i have mine set to 60, and i have 3 of them, and i still get the messages unfortunately. Not sure what the poll rate is even for, it doesn't seem to change functionality if i set it higher or lower (although to low will shutdown API access and i think the lights become unresponsive (the entire issue that this all started with).
From: Marcelo Moreira de Mello @.> Sent: 22 June 2022 15:16 To: LaggAt/hacs-govee @.> Cc: atv2016 @.>; Mention @.> Subject: Re: [LaggAt/hacs-govee] Rate limit exceeded (Issue #78)
@atv2016https://github.com/atv2016 you can see my notes here -> #78 (comment)https://github.com/LaggAt/hacs-govee/issues/78#issuecomment-1149368662
— Reply to this email directly, view it on GitHubhttps://github.com/LaggAt/hacs-govee/issues/78#issuecomment-1163159559, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEBCFUY6DTLRPL4BBPVJALTVQMN2DANCNFSM5V5T3G2A. You are receiving this because you were mentioned.Message ID: @.***>
Below is the developer documentation for the Govee API. This should help you diagnose your issue.
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) to30
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 hitting25920
reqs/per day for all lights.I'll report the results.
This is also good information https://github.com/LaggAt/hacs-govee#caveats
This actually helped. The default poll interval is 10
, which is fine for just one device (most people will probably just get one their first time as I did), but I recently added more devices and started getting rate limited. Didn't have to think about that until now.
I feel like the Caveats section should be moved to the top of the README, or at least a small warning (and maybe inside the Integration's UI) should be put so that people are more aware since I think most people, like me, may start adding more devices later on
Hopefully, Govee does indeed add an endpoint to get a list of devices' states instead of having to pull each one separately, to mitigate this issue.
It doesn't matter, i have it set to 120, have only 4 devices
control 02:22:7C:A6:B0:5D:24:FA failed: API-Error 429 on command {'name': 'turn', 'value': 'on'}: Rate limit exceeded, retry in 7 seconds. for device GoveeDevice(device='02:22:7C:A6:B0:5D:24:FA', model='H618A', device_name='Kitchen Light 1', controllable=True, retrievable=True, support_cmds=['turn', 'brightness', 'color', 'colorTem'], support_turn=True, support_brightness=True, support_color=True, support_color_tem=True, online=True, power_state=True, brightness=254, color=(111, 45, 189), color_temp=0, timestamp=1663308233.895837, source=<GoveeSource.HISTORY: 'history'>, error=None, lock_set_until=1663308234.895407, lock_get_until=1663308235.895426, learned_set_brightness_max=100, learned_get_brightness_max=100, before_set_brightness_turn_on=False, config_offline_is_off=False)
Has this issue been resolved yet? I heard rumors of changes GOVEE may be making that would fix this issue in Home assistant
Not really. Some people have had success it seems but no matter what value I put in I still get the message. And I have only 4-5 light strips or so.
From: Carly Macellaro @.> Sent: 25 October 2022 22:00 To: LaggAt/hacs-govee @.> Cc: atv2016 @.>; Mention @.> Subject: Re: [LaggAt/hacs-govee] Rate limit exceeded (Issue #78)
Has this issue been resolved yet? I heard rumors of changes GOVEE may be making that would fix this issue in Home assistant
— Reply to this email directly, view it on GitHubhttps://github.com/LaggAt/hacs-govee/issues/78#issuecomment-1291136566, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEBCFUZDZY54APVHOTNMP7TWFBC5TANCNFSM5V5T3G2A. You are receiving this because you were mentioned.Message ID: @.***>