Open rhoskins61 opened 2 years ago
Same issue, couldn't control devices, restarted HA and the Govee integration was throwing an error, something like the Govee object had no property of poll_rate or polling_rate or something like that, can't find it now since I removed and reinstalled the latest Govee integration.
Can't add the integration though since I can't put in my API key. Getting Cannot connect. Is the API-Key correct and the internet connection working?
error. Applied for new key and same thing. Assume either the developer API is down/broken?
Correct. I am having the same problem: Is the API-Key correct and the internet connection working?. I have tried downloading from HACS and updating the repo. Also, I tried generating different API from the Govee app. Please, help.
Im having the same issue and tried re-downloading and applying another API key. Not sure how to proceed.
I sent a quick Govee Support Request.. we'll see what they say. Seems to me to be a Govee issue rather than this integration, but who knows.
Seems like an issue with the API itself, cant even get it to work
The documentation says 10,000 per day allowed. The API message says that the max "10000 in 86400000 seconds" which is like 2+ years. Im not sure what that means but I hope we dont have to wait that long for it to be back.
This is definitely a problem with the Govee API. Not sure if we will see a fix soon.
Thing stopped working here as well, seems they have an error in their API. Same error as: Govee API: API: API-Error 429: {"message":"rate limited,the limit is max 10000 in 86400000 seconds. see X-RateLimit-Reset in Response Header"}
The documentation talks about not exceeding 1000 calls per user per day, followed by a maximum a table that shows 10K requests per user per day maximum.
It seems when they reconfigured the API, they added a few extra zero's to their intended configuration (3 to be exact), as 24h is 86400 seconds instead of what seems to be configured 86400000 seconds.
In the meanwhile, I'm applying for a new key, as well as significantly increasing my polling to hopefully keep using my lights while they sort this out :)
a new api doesn't work either. I hope the problem will be fixed.
the limit is max 10000 in 86400000 seconds.
I guess they meant ms
rather than seconds
:facepalm:
I sent a note to api-support@govee.com explaining the situation. I'll keep you posted if I hear from them. Feel free to send more emails. I am pretty sure you can explain the problem way better.
Same error:
2022-05-05 17:51:18 WARNING (MainThread) [govee_api_laggat.govee_api_laggat] error getting state for device GoveeDevice(device='E0:EF:A4:C1:38:5F:xx:xx', model='H6159', device_name='Theater LED', 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=254, color=(0, 0, 255), color_temp=0, timestamp=1651766818.240145, source=<GoveeSource.API: 'api'>, error='API-Error 429: {"message":"rate limited,the limit is max 10000 in 86400000 seconds. see X-RateLimit-Reset in Response Header"}', lock_set_until=0, lock_get_until=0, 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 max 10000 in 86400000 seconds. see X-RateLimit-Reset in Response Header"}
Seems like the api has changed, but the integration has not.
@trixor explained the problem perfectly above, they added 3 extra zeros to their rate limiting. You can see it in my log output above.
Here is the response I received from Govee: Hello , Thank you for contacting Govee here. Due to the limited resources of the API server, the flow of some high-frequency API calls will be limited in order to make the API server more stable and serve more users. The limit on API call frequency was implemented started May 5, 2022. If your current usage scenario calls the API frequently, your application might be affected and may not function properly. Therefore, you will need to modify your applications to call the API less frequently. Specific rules related to this are listed in the latest API reference document here: https://govee-public.s3.amazonaws.com/developer-docs/GoveeDeveloperAPIReference.pdf
Thank you for your understanding.
Sharon Govee Customer Support
Dear customer,
Thank you for contacting Govee.
Here is the picture attached. X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset (this level of limit works on all APls, which means total requests from oneuser can not be more than 1000 per day).
Your kind understanding is much appreciated.
Best wishes,
Jane
I'm going to respond once more, I assume this is their canned response they give to everyone right now who messages them as they anticipated this to break a lot of people, though right now I think they broke people more than they intended too.
So given the error message, and implying years, do we just have to wait 24 hours, what are we thinking here?
I've reduced my polling to 600 (from 10), and I'm hoping we'll see a reset in a few hours. I'm not sure when the 24h limit started, did anyone capture this by chance? Reading the documentation, we can actually ask the API how much longer we're in timeout, I may give that a go and post my results.
@a-bianucci Seems like I have to wait 3 hours. Probably the same for most here.
What I don't understand is that I doubt I'm anywhere near 10000 calls a day, and even more confusing, I've been limited all day. Not sure why I was limited so early in the morning. Unless there are some calls being made under the hood by the integration every few seconds. (10,000 a day is like ~7 calls a minute)
@nitro41992 Thanks! Unfortunately since I just tried, assuming I will have to try again in the morning.
It is strange, I don't think I'm at that volume either. I have 2 lights that are on Govee, and I was configured with "10" as the default. The lights are auto on\off based on TOD, so essentially 4 calls a day, plus whatever polling the integration does. I can't imagine that I have hit the limit with my use.
I know Govee just did some API change on the 4th, so I'm wondering if there is more to this.
I've reduced my polling to 600 (from 10), and I'm hoping we'll see a reset in a few hours. I'm not sure when the 24h limit started, did anyone capture this by chance? Reading the documentation, we can actually ask the API how much longer we're in timeout, I may give that a go and post my results.
Yeah I can't do that yet.... before I came here I tried to remove, and readd so I can't even get it back in HASS at the moment. But leveraging Nitro's screenshots, I can see my time is about 2h 45m from now so.... the am it will be :(
I’m having the same issues or rate limit exceeded and I only have 2 govee Light strips triggered by a motion sensor. This just started on the 5th of May. Any help would be appreciated
Mine is back up after updating HASOS to 2022.5.1. Hopefully it stays working
So I deleted the integration along with the HACS integration along with requesting a new API from Govee. So I downloaded the HACS integration this morning and tried adding my new api and it seems to be back up in running. I also updated HA to 2022.5.1 as well.
Yeah, the integration finally took the new API (that I received yesterday), rebooted HA and all is back.... strange.
I just disabled the govee integration and then re-enabled it. All working fine now
I didn't have to do anything, mine just started back up sometime last night
I adjust my poll interval up to 60 and it's used 70 requests in the last 30 minutes for 2 lights.
To slow the polling doesn't that number have to go up? Or do I have it backwards?
Same here issues here, I have tried disabling the integration and re-enabling.
Have updated to 2022.5.1 as well this morning, that did not correct it either.
It was odd that a couple of my lights worked on schedules for wake up routines but not others by the time we got downstairs to start our day.
Now they are all offline according to Home Assistant.
Disabled and Re-Enabled the integration this morning and received an initial warning in the logs which said the API is back online. Is now working fine.
Tried reinstalling the integration yesterday and re-inputting my API key but was getting the API error from the integration and couldn't finish adding the integration. Requested a new API key and had the same issue. Tried inputting the new API key all day yesterday to no success.
The new API key now works this morning. Upped the poll interval to 60, and for 5 devices in 30 minutes I've used about 160 API requests based on the X-RateLimit-Remaining I'm getting back for my API key. That equals out to about 1 request per devices, per minute, plus me turning them on and off a few times.
Disabled and Re-Enabled the integration this morning and received an initial warning in the logs which said the API is back online. Is now working fine.
Tried again just now and not getting the lights to work still... Not vital as the sun is still rising here and the room is light enough from that but certainly going to hear about it if these lights still don't work tonight
Yeah, mine were working again this morning but they're down again
Mine seems to be running fine still
Tried reinstalling the integration yesterday and re-inputting my API key but was getting the API error from the integration and couldn't finish adding the integration. Requested a new API key and had the same issue. Tried inputting the new API key all day yesterday to no success.
The new API key now works this morning. Upped the poll interval to 60, and for 5 devices in 30 minutes I've used about 160 API requests based on the X-RateLimit-Remaining I'm getting back for my API key. That equals out to about 1 request per devices, per minute, plus me turning them on and off a few times.
Did the math on mine since I re-enabled it, seeing about 2.4 requests per minute per device.
One thing I did do is run a check on the API to see the reset time, it gave me 24h from the time I ran it vice the first poll earlier. I wonder if it's a rolling clock of some sort.
From Govee support:
Dear customer,
I'm sincerely sorry for the mess of the wrong number.
It allows 10k per day and it's 86400 seconds. Thanks for your careful discover. I have conveyed to the relevant department.
Thank you again.
Seems the department is aware that they have a bug and are working on allowing 10K requests per day (86400 seconds). My old API key really no longer worked, so I requested a new one. My lights are happy again! Still need to do the math on polling for the number of lights I have in this place.
I just asked for a new API key and cannot get it to take, it claims "Cannot connect. Is the API-Key correct and the internet connection working?" now...
Mine are back today and working fine but something seems wrong with all of them showing negative remaining limit and the timestamp...
Seems to be having an issue again
Does anyone have a suggestion for calculating what the poll interval should be considering the new rate limitations? (1000 requests per user per day maximum before triggering a 24 hour timeout)
Not working again...
I increased to 600 polling, 10-ish lights, no issues so far
I increased to 600 polling, 10-ish lights, no issues so far
I have about the same qty so I'll give that a shot. T-16 hours till Govee lets my account out of the doghouse to try again.
Probably a silly question but how do you adjust the polling?
Probably a silly question but how do you adjust the polling?
In HA 2022.05.0, go to Devices & Services -> Integrations -> Govee -> Configure -> Polling should be below your API key field.
Probably a silly question but how do you adjust the polling?
In HA 2022.05.0, go to Devices & Services -> Integrations -> Govee -> Configure -> Polling should be below your API key field.
Ok thank you. Now I should change the 10 to the 600?
Probably a silly question but how do you adjust the polling?
In HA 2022.05.0, go to Devices & Services -> Integrations -> Govee -> Configure -> Polling should be below your API key field.
Ok thank you. Now I should change the 10 to the 600?
lol....i have the same question...so just change the Poll Interval from 10 to 600? i just want to be sure so when the timer starts over, it si set right.... ..... and if someone could explain why going from 10 to 600 was the thing that would awesome too :).... ty!
I might be wrong but I believe the poll interval set the delay between each time the integration check the states of all your govee lights on the govee api server.
So lets say you have 10 govee lights and the poll interval is set at 10 secs.
This will result in 86400 hits per day on the 10000 per day rate limit. You will then reach that limit in about 3 hours and wont be able to control any light for the next 21 hours.
This will also result in 6 hits on the 10 per minute per device rate limit for each lights.
Setting the poll interval at 600 secs for the same 10 lights will result in 1440 hits on the same limit so you will have 8560 left for turning light on/off, changing color, etc... But doing so will result in HA refreshing state of the govee lights every 10 minutes.
It's all about how many lights you have and a balance between state refreshing and control/change you can do per day.
For my part, I have 7 lights and I set the poll interval to every 120 secs. That way, I have around 5000 left in the rate limit per day.
Also, one need to make sure that automation don't turn on lights that are already on every time a motion sensor is activated or it will take many hits on the limits.
Anyway that is how I understand how it is working but I might be wrong.
Also, Govee said a while ago that they are working in changing the state request so that it return all lights state at once. This would help.
Dumb question for me... how do you start this "timer" over? I changed the interval to 600 and submitted with the current API, which indicates success, however all of my devices are still disabled after reboot.
Dumb question for me... how do you start this "timer" over? I changed the interval to 600 and submitted with the current API, which indicates success, however all of my devices are still disabled after reboot.
You need to restart HA Core.
That did the trick, thanks.
as of about 9am they are working...i put in my new api...set the poliing to 600.....restarted HA.....boom....gravy :).. i wish Govee would just give up some local control instead of just IoT cloud shite:)....the bastards....:)
ok.... im trying to put my head around this.... formula-wise..
there are 86,400 seconds in a day.... if the poling means how often the integration hits the device in seconds....ie if it is set to 10 then it will poll 86400s/10=8640hits/day....leaving 10000(limit)-8640=1360hits/day from 1 light......?
so if there are 2 lights....would that change that 8640hits/day to 17284 hits/day?.....sending you 7284 hits over your limit? ..from 2 lights and polling still set to 10..... ?
ok....on one light....if setting the polling to 600.... that would be 86400/600=144 hits a day to the api?......leaving 9856 additional hits that day?..... then 10 lights would be that 144x10=1440 hits/day?...leaving 8560 additional hits for the day?....
lol....one more....from a previous poster :)
7 lights....polling set to 120.... that would be....86400s/120poll=720 hits/day from one light.... 7 lights would be 720hits/day X 7 =5040hits/day....leaving 4960 available hits?
i appreciate everyone's time.... i hope my maths are right :)....
good times math on a saturday morning....there is a song in there somewhere.....
Integration for HA just stopped working. Applied for new API, still causing errors. What's the problem?