hacs-govee icon indicating copy to clipboard operation
hacs-govee copied to clipboard

Govee API has suddenly stopped responding

Open Smoothy13 opened this issue 2 years ago • 31 comments

Version of the custom_component

<Version 0.2.2 -->

Configuration

Logger: homeassistant.config_entries Source: custom_components/govee/init.py:67 Integration: Govee (documentation, issues) First occurred: 3:45:19 PM (1 occurrences) Last logged: 3:45:19 PM

Error setting up entry govee for govee Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/govee/init.py", line 67, in async_setup_entry await hub.rate_limit_delay() AttributeError: 'Govee' object has no attribute 'rate_limit_delay'

Describe the bug

A clear and concise description of what the bug is. The Integration has a red box around it, states "Failed to setup". It was working for months, then without any updates to anything....I noticed it. Tried rebooting HA, updating it to 0.2.2. No luck

2022-05-05 16_03_59-Settings – Home Assistant and 2 more pages - Work - Microsoft​ Edge 2022-05-05 16_05_00-Settings – Home Assistant and 2 more pages - Work - Microsoft​ Edge 2022-05-05 16_05_43-Settings – Home Assistant and 2 more pages - Work - Microsoft​ Edge

Smoothy13 avatar May 05 '22 21:05 Smoothy13

Seeing the same issue. Started today.

giantsystems avatar May 05 '22 21:05 giantsystems

Same for me

domemshur avatar May 05 '22 21:05 domemshur

Another, I have 3 Govee lights and all offline. Started today too.

mikem30303 avatar May 05 '22 21:05 mikem30303

Same for me with both of my H6159 strips.

Scope666 avatar May 05 '22 21:05 Scope666

Same for me, the app works but the integration fails to connect. I even tried with a new API key.

wavesswe avatar May 05 '22 21:05 wavesswe

Same here. There is another thread tied to this issue. Please follow over there

ssdhanas12 avatar May 05 '22 21:05 ssdhanas12

Same.

omayhemo avatar May 05 '22 21:05 omayhemo

Also seeing this issue starting today

jlips24 avatar May 05 '22 23:05 jlips24

Same here,

dinan5 avatar May 06 '22 01:05 dinan5

Same here.

Dmellons avatar May 06 '22 01:05 Dmellons

You all should have received an email with the subject “Important Updates for Govee API” on April 1st. Here is the link to the documentation of the new api: https://govee-public.s3.amazonaws.com/developer-docs/GoveeDeveloperAPIReference.pdf

now we need that someone updates the integration.

kiragengis avatar May 06 '22 02:05 kiragengis

Same here. Tried to get a new API key thinking something was happening and I was rate limited, now also getting:

govee.config_flow.CannotConnect: API: API-Error 429: {"message":"rate limited,the limit is max 10000 in 86400000 seconds. see X-RateLimit-Reset in Response Header"}

a-bianucci avatar May 06 '22 03:05 a-bianucci

Also got the same, will be due to the new API, taken from their recent email -

The limit on API call frequency will be implemented started May 5, 2022. We hope you can complete any needed modification of your API applications before this date so your applications will continue to run normally.

Tassel8062 avatar May 06 '22 05:05 Tassel8062

same

mondi31 avatar May 06 '22 08:05 mondi31

Since yesterday and already against

Engel7955 avatar May 06 '22 13:05 Engel7955

This seems to be impacting most people and have another thread on it currently https://github.com/LaggAt/hacs-govee/issues/72

Morteum9 avatar May 06 '22 17:05 Morteum9

same here, rate limited

atv2016 avatar May 06 '22 19:05 atv2016

same issue..... here is an email i got from govee support.....

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.

DERFAUSt avatar May 06 '22 21:05 DERFAUSt

Is the integration developer still active on this ? Wonder if they can reduce the amount of requests sent to govee

Tassel8062 avatar May 06 '22 22:05 Tassel8062

Is the integration developer still active on this ? Wonder if they can reduce the amount of requests sent to govee

We should really unify this into one issue, but you can adjust how often homeassistant polls Govee yourself which might help https://github.com/LaggAt/hacs-govee/issues/72#issuecomment-1120006418

TomCasavant avatar May 07 '22 00:05 TomCasavant

image

This is why. I should have known better than to buy light which required a cloud connection.

ironicbadger avatar May 07 '22 00:05 ironicbadger

This is why. I should have known better than to buy light which required a cloud connection.

Exactly my thoughts. I'll be creating a local alternative. This just happened to be an easy way to do what I wanted to do.

omayhemo avatar May 07 '22 01:05 omayhemo

Well reasonable limits on API calls is fine, I think the major issue here is what pooling frequency will keep the APIs happy?

I have 7 devices... so would my math be right? 60 seconds per min times 60 in an hour gives me 3600 second per hour times 24 hours is 86400 seconds in 24 hours rate limit?

So 86400 seconds in the day... If I pool every 65 seconds, thats 86400/65 = 1329 times my 7 devices is about 9.3K API calls within the 24 hours period of time. Close enough to my 10K rate limit. Going to try that and see.

I think my largest issue with this is the rate limit should be reflective of number of devices if each device ends up with another api call (not sure if thats the case or not).

I am ok with cloud services, I just think Govee needs to set a rate limit that still enables us to effectively use the product within homeAssistant.

Eric2XU avatar May 07 '22 16:05 Eric2XU

Same issue as described above. Wonder if there will be a fix. For now disabling this addon.

jpc1991 avatar May 08 '22 17:05 jpc1991

I tried setting the polling interval manually, but now I can't connect at all, and all my entities disappeared.

2022-05-08 13:18:17 WARNING (MainThread) [govee_api_laggat.api] Rate limit exceeded, check if other devices also utilize the govee API 2022-05-08 13:18:17 ERROR (MainThread) [custom_components.govee.config_flow] Cannot connect: 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."} Traceback (most recent call last): File "/config/custom_components/govee/config_flow.py", line 68, in async_step_user user_input = await validate_api_key(self.hass, user_input) File "/config/custom_components/govee/config_flow.py", line 34, in validate_api_key raise CannotConnect(error) custom_components.govee.config_flow.CannotConnect: 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."}

jpc1991 avatar May 08 '22 18:05 jpc1991

Wait it out.

On May 8, 2022, at 14:20, jpc1991 @.***> wrote:



I tried setting the polling interval manually, but now I can't connect at all, and all my entities disappeared.

2022-05-08 13:18:17 WARNING (MainThread) [govee_api_laggat.api] Rate limit exceeded, check if other devices also utilize the govee API 2022-05-08 13:18:17 ERROR (MainThread) [custom_components.govee.config_flow] Cannot connect: 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."} Traceback (most recent call last): File "/config/custom_components/govee/config_flow.py", line 68, in async_step_user user_input = await validate_api_key(self.hass, user_input) File "/config/custom_components/govee/config_flow.py", line 34, in validate_api_key raise CannotConnect(error) custom_components.govee.config_flow.CannotConnect: 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."}

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FLaggAt%2Fhacs-govee%2Fissues%2F73%23issuecomment-1120464603&data=05%7C01%7C%7Cabdb5f4a45914e53585e08da311f62ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637876308118940247%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=97LZc0RGdRioWJgAI%2FUVgPUQqWzXSbwA9oVkfXctCuI%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FARAH6EC47UIMPK3IZ3MF3NDVJAAVRANCNFSM5VGIPBMA&data=05%7C01%7C%7Cabdb5f4a45914e53585e08da311f62ab%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637876308118940247%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3S72PgT06Uu72hw11Q%2Bj5paMRagduKuGlSZr7pcvKe0%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

dinan5 avatar May 08 '22 19:05 dinan5

Yeah I can confirm if you find a polling value that keeps you under 10K requests per day then it will within about 24 hours return to service. I would also highly recommend disabling the plugin all together for those 24 hours so no attempts are made to help reset the counter.

Eric2XU avatar May 10 '22 10:05 Eric2XU

yeah can confirm, i disabled for 24h or so and set polling to 100, working fine again for me.

atv2016 avatar May 10 '22 10:05 atv2016

yeah can confirm, i disabled for 24h or so and set polling to 100, working fine again for me.

Sorry to bother you... could you be so kind to tell me exactly where to set polling to 100 (files and lines)?

Thanks!

enricodx avatar May 12 '22 09:05 enricodx