Govee integration

OK I think this is to do with the rate limiting… It seems like you can call the API 1000 in 24 hours. I have 2 sets of lights that only take a binary command of on/off when she opens the wardrobe. I seriously doubt I would hit that limit but I appear to so something is not right…

This error originated from a custom integration.

Logger: custom_components.govee.light
Source: custom_components/govee/light.py:117
Integration: Govee (documentation, issues)
First occurred: October 22, 2023 at 9:09:31 AM (7550 occurrences)
Last logged: 9:30:21 AM

update failed for FA:4F:A4:C1:38:AE:7F:3B: 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."}
update failed for 4D:61:A4:C1:38:A8:AD:2A: 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."}
update failed for 4D:61:A4:C1:38:A8:AD:2A: API-Error 400: {"message":"Device Not Found","status":400}

might be worth downloading the detail logs and seeing what is generating so many calls, looks like it is averaging 160 api calls per hour if it generated 7550 in 48h…

I’m trying this with my string lights right now. I have a board mocked up but I think my waterproof screw plug that I’m trying to mate up with the stock one doesn’t fit quite right.

OK After reading through this thread and chain the polling interval to 60 it does seem to have fixed it.

Can you control any scenes from home-assistant?

Unfortunately, no. I have to implement the scene in the app if I want to change it. But, as far as what Home-Assistant does:

For last known scene implemented:
On/Off
Dimming

After that, you can do colors but it is the entire string or device color. You do not have individual control of pixels or LEDs.

You may have already seen this but Govee say they are going to add Local LAN API support for the curtain lights in the next release of their app (v5.9.0) Information in this post. I think this version is currently in beta testing.

Cheers

1 Like

Hello,

I just installed the Govee integration and it found my sons light strip no problem. However, when I try to change the color it snaps right back to the color it was previously set to. I also cannot control any other aspects of the light strip like it’s power but it does show an up to date status if I change things in the Govee app. Anyone encounter something like this before and if so is there a workaround? Also I don’t see any of the Govee scenes show up as “effects” like they do for my hue lightstrip. Is this expected?

Let me know if logs would help, wanted to see if this was something frequently encountered before I figured that out.

Thanks!

Thanks for the heads up.
This would be awesome news but my Govee integration currently isn’t working due to issue below…

Rate limited! the limit is 10000 requests every 24 hours. · Issue #129 · LaggAt/hacs-govee (github.com)

1 Like

I’m having the same issue since I added the curtain lights. My hope is that when local API is added for this device I can switch to the Govee lan hass integration, and avoid the rate limit.

Regards

1 Like

Yeah I increased my poll time and complained to support that my decide doesn’t have LAN API support yet. They said noted. lol

I noticed that the Curtain lights have appeared in my LAN integration - interestingly I don’t have the Local API setting in my app for that device but it does work!

I’m assuming that, like with the Hexa, there isn’t a way to change the scene to something?

Can you check your curtain lights are using the LAN; click on the device and select the attributes dropdown. My lights show “Lan enabled false”, so the integration uses the public cloud API for this device. Re. Changing scenes etc, I don’t believe this integration can do that, here’s an old issue thread on GitHub that discuss it…

One of the later comments suggests, rather cryptically, that it is technically possible to use scenes using the local API.

A little searching revealed a custom driver has been written for Hubitat that offers scene features.

Some interesting comments here about an undocumented API, that may be published in due course…

2 Likes

Ah, sorry, my bad
I falsely assumed that the LAN integration would only work with LAN and the other integration would only work with online
I guess the other integration is now redundant then

Nearly every day I have problems that the integration for the cloud is not working - do you have any idea why? :frowning:
Logs showing:


  File "/usr/local/lib/python3.11/site-packages/govee_api_laggat/govee_api_laggat.py", line 300, in _schedule_get_devices
    await asyncio.sleep(SCHEDULE_GET_DEVICES_SECONDS)  # TODO: define SCHEDULE_GET_DEVICES_SECONDS
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NameError: name 'SCHEDULE_GET_DEVICES_SECONDS' is not defined
1 Like

Except for devices they’re not adding lan support yet for what seems like no reason other than you didn’t buy your product recently enough. Since this integration hasn’t been working for me lately I complained in the app like, “what’s the hold up? It’s WiFi… At least let me turn it on and off locally, how hard can that be?..”

ok got the H713A working now thanks to the code of @disforw.

Here is what you need to do:

  1. go to terminal in windows or mac and find out you device id and their possible commands:
    paste:
% curl --request GET "https://developer-api.govee.com/v1/appliance/devices/" -H "Content-Type: application/json" -H "Govee-API-Key: yourAPIkey"
You will get back something like this:
{"data":{"devices":[{"device":"18:C6:00:00:00:00:00:00","model":"H713A","deviceName":"Smart Heater","controllable":true,"retrievable":false,"properties":{"mode":{"options":[{"name":"Low","value":"1"},{"name":"Medium","value":"2"},{"name":"High","value":"3"},{"name":"Fan","value":"4"},{"name":"Auto","value":"5"}]}},"supportCmds":["turn","mode"]}]},"message":"Success","code":200}**%**

Here we can see the device id. This will be important soon.

  1. go to config.yaml and paste this:
  rest_govee_appliance:
    url: https://developer-api.govee.com/v1/appliance/devices/control
    method: PUT
    headers:
        Content-Type: application/json
        Govee-API-Key: !secret govee_api_key
    content_type:  'application/json; charset=utf-8'
    payload: '{"device": "{{ device }}","model": "{{ model }}","cmd": {"name": "{{ cmd_name }}","value": "{{ cmd_value }}"}}'
    verify_ssl: true

hint: at the Govee API Key line you can either directly enter your API Key there or enter it in the secrets sheet.

  1. In Home Assistant go to developer tools, than service and search for the service → rest_command.rest_govee_appliance

  2. now you switch to the code editor and enter the following below:

  - service: rest_command.rest_govee_appliance
    data:
      device: id_from_the_device_in_step_1 (example: 18:C6:00:00:00:00:00:00)
      model: H7130
      cmd_name: turn
      cmd_value: "on"

This will now successfully turn on your device.
To turn it off just change from “on” to “off”.

1 Like

Hello all - I recently picked up the Govee RGBIC Spotlights (H7065) 2-pack spots. These are two spotlights connected by a single wire to a controller device. Each spot light is individually controllable from the Govee app. I followed the directions and have them integrated using the LAN API.

Unfortunately, the lights show up as a single light in HA when I was hoping/expecting to see them show up as 2 individually controllable lights. I’m hoping that I missed something simple in my config, but after a quick scan of this thread, I didn’t find any other users that have these lights.

Any suggestions on if/how I might be able to control them independently?

1 Like

Did something get broken? I finally got an RPI which is connected VIA ethernet to my network, I went to readd my govee lights via the Govee integration, and it keeps saying my API key is wrong or to check my network connection. It was working just fine yesterday on my virtual box machine, but now today it keeps saying this no matter what ive tried? almost all the lights in my house are Govee so i need this working again. Ive tried every version on HACS

Hello everyone,

Has anyone figured out a way to control the H7172 Ice Maker via HA (GoveeLife Portable Countertop Ice Maker)? I recently purchased this simply for the schedule making, and I would like to integrate this with HA.