Govee integration

Got the Govee H6099 and there is no setting for controlling this over LAN control but, to be honest, my H6008 bulbs, either, but I can control all aspects of them.

I was hoping to be able to do cool things like when a movie is playing on my Plex server, I can turn on the movie program on that H6099 and when I turn that TV off, it automatically turns off the H6099. Then as part of my alarm/fire/CO2 setup, I was hoping to be able to use the lights to be solid colors to match what is going on in my home.

I am using Govee to MQTT and I do not have different options. I would have to use the app to do this. Any suggestions?

Elves must have come through last night and did a little programming. The only thing I cannot find is the way to turn on the video option for that and the Movie Watching DreamView 1 for the additional lights. I checked and they are not options in the Effect section.

Just got a pair of H6078s - one has hardware version 2.00.20 with no LAN control, and the other has version 2.05.08 with LAN control - ordered at the exact same time within the same order on Amazon. I also have no pending firmware updates either.

Anyone know the best way to contact Govee support about this, or am I going to have to return it? (Really not looking forward to disassembling a 5-foot-tall lamp…)

EDIT: It finally updated the firmware on the device. Nothing I did manually would force it to update. I had to wait 3 days, and then the “Local LAN” switch appeared.

I’m a bit confused. I think I’ve set up Govee2mqtt properly, and I see all of the scenes in the state attributes for my Floor Lamp 2 (h607c). I’m confused as how to enable them. When I go to the device page I see a bung of Segments, a ‘Dream View’ and ‘Gradient’ toggle, but none them seem to change anything on the lamp, only the power switch does. Any help on how I can control the colors, and especially the scenes would be greatly appreciated.

Try clicking on “Living Room Floor Lamp”(not the switch) and a new card should pop up with the options your looking for?

Did you ever get this working? I just bought this model, H7052. Connects with Govee app fine but not HA.

2 Likes

Yes, I had to make sure that no other devices were using my govee API key. Then I waited for a bit, and tried again. For some reason it took a couple of times even though I entered the same API key and use/pass, I got returned with “invalid username and password” for a while. Eventually it started working, and then populating. It works beautifully now

That works. I swear I tried that before I posted and it wasn’t working, but maybe I clicked on the toggle. Thanks for the tip @Kev1 !

Getting an error as of today with Govee2MQTT, anyone else experiencing this/knows a fix?

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
GOVEE_API_KEY=REDACTED
GOVEE_MQTT_HOST=core-mosquitto
GOVEE_TEMPERATURE_SCALE=C
GOVEE_EMAIL=REDACTED
GOVEE_PASSWORD=REDACTED
GOVEE_MQTT_PASSWORD=REDACTED
GOVEE_MQTT_USER=addons
GOVEE_MQTT_PORT=1883
++ cd /app
++ exec /app/govee serve
[2024-07-31T00:12:23 INFO  govee::commands::serve] Starting service. version 2024.07.13-82ddc6e9
[2024-07-31T00:12:23 INFO  govee::commands::serve] Querying platform API for device list
[2024-07-31T00:13:23 WARN  govee::cache] error sending request for url (https://openapi.api.govee.com/router/api/v1/user/devices): operation timed out, will use prior results
Error: error sending request for url (https://openapi.api.govee.com/router/api/v1/user/devices): operation timed out

Stack backtrace:
   0: anyhow::error::<impl anyhow::Error>::msg
   1: anyhow::__private::format_err
   2: govee::cache::CacheResult<T>::into_result
   3: govee::platform_api::GoveeApiClient::get_devices::{{closure}}
   4: govee::commands::serve::ServeCommand::run::{{closure}}
   5: govee::Args::run::{{closure}}
   6: tokio::runtime::park::CachedParkThread::block_on
   7: tokio::runtime::context::runtime::enter_runtime
   8: tokio::runtime::runtime::Runtime::block_on
   9: govee::main
  10: std::sys_common::backtrace::__rust_begin_short_backtrace
  11: std::rt::lang_start::{{closure}}
  12: std::rt::lang_start_internal
  13: main
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Update, working again as of today. Might have been an internal Govee API issue.

still having issues with API, I deleted the integration and trying to add it back. get a “cannot connect” error.

There was a AWS outage that caused Govee API to stop working, should be fixed now though.

Govee makes decent products for reasonable prices, but a shame it requires an internet connection for basic functionality.

My govee2mqtt addon wasn’t connecting with the above issues for quite some time. I ended up deleting the addon, restarting HA, reinstalling the addon - then using a new API key requested from govee. Not sure what the hold up was but it works fine now.

Can you post the logs from the add-on if this is still an issue?

@Carlos_Roldao I have a similar issue like jbdiablo here is my log data, in the logs says that the Key is invalid but it is a new Key that I just created from the govee app

2024-08-03 15:51:08.695 WARNING (MainThread) [custom_components.govee] API is back online.
2024-08-03 15:51:08.696 WARNING (MainThread) [govee_api_laggat.api] Rate limit exceeded, check if other devices also utilize the govee API
2024-08-03 15:51:08.696 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."}
2024-08-03 15:51:08.697 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry govee for govee
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, 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'. Did you mean: 'rate_limit_reset'?
2024-08-03 15:51:19.356 WARNING (MainThread) [custom_components.govee] API is back online.
2024-08-03 15:51:19.357 WARNING (MainThread) [govee_api_laggat.api] Rate limit exceeded, check if other devices also utilize the govee API
2024-08-03 15:51:19.358 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."}
2024-08-03 15:51:19.358 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry govee for govee
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, 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'. Did you mean: 'rate_limit_reset'?
2024-08-03 15:53:00.118 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session (None)
2024-08-03 15:53:00.118 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/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
2024-08-03 15:56:23.758 WARNING (MainThread) [govee_api_laggat.api] Rate limit exceeded, check if other devices also utilize the govee API
2024-08-03 15:56:23.761 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 126, in async_step_user
    user_input = await validate_api_key(self.hass, user_input)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/govee/config_flow.py", line 32, 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."}
2024-08-03 15:59:07.986 WARNING (MainThread) [custom_components.govee] API is back online.
2024-08-03 15:59:07.986 WARNING (MainThread) [custom_components.govee] Could not connect to Govee API: API: API-Error 401: {"message":"Invalid API Key","status":401}
2024-08-03 15:59:07.987 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry govee for govee
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, 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'. Did you mean: 'rate_limit_reset'?
2024-08-03 16:00:08.693 WARNING (MainThread) [govee_api_laggat.api] Rate limit exceeded, check if other devices also utilize the govee API
2024-08-03 16:00:08.697 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 66, in async_step_user
    user_input = await validate_api_key(self.hass, user_input)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/govee/config_flow.py", line 32, 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."}
2024-08-03 16:00:12.743 WARNING (MainThread) [govee_api_laggat.api] Rate limit exceeded, check if other devices also utilize the govee API
2024-08-03 16:00:12.746 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 66, in async_step_user
    user_input = await validate_api_key(self.hass, user_input)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/govee/config_flow.py", line 32, 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."}
2024-08-03 16:02:08.558 WARNING (MainThread) [custom_components.govee] API is back online.
2024-08-03 16:02:08.560 WARNING (MainThread) [custom_components.govee] Could not connect to Govee API: API: API-Error 401: {"message":"Invalid API Key","status":401}
2024-08-03 16:02:08.561 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry govee for govee
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 586, 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'. Did you mean: 'rate_limit_reset'?

Strange, looking at your logs it seems you’ve exceeded the API rate limit:

2024-08-03 16:00:08.693 WARNING (MainThread) [govee_api_laggat.api] Rate limit exceeded, check if other devices also utilize the govee API
2024-08-03 16:00:08.697 ERROR (MainThread) [custom_components.govee.config_flow] Cannot connect: API: API-Error 429: {"message":"rate limited! the limit is 10000 requests every 24 hours.

You don’t have that API connected to anything else?

No that I’m aware of, I created this Key a few hours ago

I just bought and setup a smart humidifier H7140 in the govee app but haven’t been able to get it to show up in HA. I have other devices from when I initially setup the integration but it doesn’t seem to be finding this new device. From what I’ve read, it’s supposed to just find it automatically but its been two days and still not showing up. Is there any way that I can force it to poll for new devices other than deleting the integration and reinstalling? I don’t want to lose my existing devices if possible.

EDIT: I tried deleting and re-adding the integration and it still didn’t show up so I’m guessing my device is just not supported :frowning:

EDIT 2: For anyone else with the same issue as me, I found this other integration which has support for the H7140 as well as my other devices so I just switched to it: GitHub - disforw/goveelife: Home Assistant Govee integration using the newest API for ALL Govee WiFi devices

My advice would be to change your password and try to create another API, change the details and start the add-on again. Hopefully this isolates the issue.

This has been great but I think I own a device that Govee2Mqtt does not know about:

[2024-08-08T09:36:54 WARN govee::commands::serve] Unknown device type. Cannot map to Home Assistant.

It is a H6097 TV Backlight, hardware version 3.05.01 1.06.00/1.01.08.