Govee Integration for Govee Light, Switches, Plug, and now Appliances

This is a new integration to enable access to all Govee API enabled devices.

First I want to thank @Obi2000 for initially creating the driver some time back that enabled Immersion LED strips. That driver is the basis for the driver used with this integration, but has been heavily modified to work with the integration app.

What are the improvements over the existing driver? Well this integration takes what Obi2000 did a while back and just takes it another level. He created a great driver, but the Govee api has continued to evolve. This integration is intended to enable all of the new features that have been added to the Gove API and streamline the deployment of all of those devices into HE. Along with the existing devices, the new Govee API 2.0 enabled a new class of devices from Govee. These new devices include: Humidifiers, Dehumidifiers, space Heaters, Fans, and potentially more. As Govee add devices to their API they will immediately be available in this integration.

You can also help me get more govee products to ensure support by visiting this link with a 10% discount.

How do you get this software integration

This integration requires 6 things.

  1. Govee API integration app
  2. Govee Lights, Plugs, and Switches Driver
  3. Govee White Light Driver
  4. Govee Plug Switch Driver
  5. Govee Appliance Driver
  6. Govee Heat Appliance Driver

You can also use HPM. Simply go to HPM. Click on the Link to install a app. Click on "Search by keywords". Make sure the switch for "Fast Search" is turn on. Then type in "Govee" in the search field and click the "Next" button. The app should appear at this point, Select the app to install and complete the install.

You also need to use the Govee Home app on your phone and request a Govee API Key. Do this by following these direction. This is valid for v5.9 of the govee home app and may change as it is updated.

  1. Open the Govee Home app on your phone.
  2. Click on the little person icon in the lower right corner.
  3. Click on the Gear icon in the upper right corner.
  4. Now hopefully about 2/3 down the screen you will see a option for Apply for API Key. from the help section of the app.

Once you have your Govee API Key and the components above loaded on your hub simply go through the process to install the Govee Integration app. On the first screen there will be a place for you to load your API key.

Once that is populated click on the buttons for Device selection under "Govee Device Add Page" to added Lighs, Switches, or Plugs. Select your devices to add and click on done to go back to the main setup page.

At this point click on the other device selection if you have any appliances like humidifiers, dehumidifiers, heaters, or fans and repeat the process above for them. Again click on the "Done" button when all you want integrated are selected.

Back on the main page click on " Done" one more time and you should end up with all of the devices available at this time.

If your devices support it you may want to enable Local LAN control. Now is the time you can set this up if your devices support it. The list of supported models is shown below or can be reviewed here. Here are the steps to activate local LAN control

Lan Control should only be turned on if you have confirmed your device supports it. You can confirm that by opening up the Gove Home App, clicking on the device you want to control, then click on the Gear Icon in the upper right corner. You may need to wait for 5-10 seconds, but if you see the Lan control options as shown in the image below it is supported.

Turn the toggle so it is on in the Govee Home app. Obtain the IP addres of your device. Then go into HE and turn on Lan control for that device and click save. A new box will appear asking for the devices IP Address. Please enter it now and click on save again.

Assuming it works you will now be able to control the device from Hubitat and have fun.

At this time, I have not been able to get the device status call to work from HE and I suspect it will be a limitation of what we can do with community apps on the platform. If that changes, I will update the driver. I believe this is a issue with opening ports on the HE platform that we just can't do. That is a "Built In" app only option.

Enjoy the integration.

Change Log:
1.0.0 9/13/2022 - Initial release
1.0.1 9/25/2022 - Improved Polling in Light Driver
1.0.2 9/30/2022 - Fixed Polling not starting, added Debug Logging to Light driver
1.0.3 10/05/2022 -Added Lan Control, added more Debug Logging to Light driver
1.0.4 10/19/2022 - Improved Device Handling in Integration App to prevent device add failures.
1.0.5 10/27/2022 - Bug fix for new Device Handling routine.
1.0.6 11/2/2022 - Correct issue found with appliance devices that don't use "gear" commands
1.0.7 11/03/2022 - Correct issue found with Light devices that don't use color or colorTemp commands
1.0.8 11/04/2022 - Added fade over time ability to lan controlled light device drivers.
1.0.9 11/05/2022 - Added new drivers to more closely match the abilities of the devices they are controlling.
1.0.10 11/08/2022 - Correct failed update to github to include updates for new drivers
1.0.11 11/20/2022 - Cloud API success Validation, added retry of failed calls, corrected bug for updating rate limits to Govee integration app .
1.0.12 11/21/2022 - Broke out Cloud call status to its own attribute
1.0.13 11/24/2022 - Corrected detection for White Light only driver

Devices that support Cloud API: (documented)
image

Devices that support Lan API:(documented)
image

The above lists are pulled from Govee documentation. These lists can be updated at any time by Govee and may not include devices that were just released.

Things to know:

  1. A new setting was added to Light,Switch, plug drivers to allow for polling if a device supports status. It defaults to ever 5 min but you can make that shorter if you like.
  2. Appliances are not retrievable at all. We can only send commands. This is a API limitation.
  3. I added a flag for debugging. It may not do much right now, in some cases but it is there and will be enhanced if issues are reported when i do research.
  4. Rate limits are now being displayed in the various devices as they are consumed. If you ever find you are unable to get the driver to work then check that you have not hit that limit by looking at the states on your devices.
  5. Not all devices support local control even the device is on the supported list. I was advised that any device purchased in the last year (after mid 2021 on) and is on the supported list will likely be able to do it.
  6. Because of how the LAN API's work you will still need to have the Govee Cloud API Key in the Govee integration app to setup devices and to retrieve states of devices even if they support LAN API control. This is a limitation of what we can access on HE and how the Govee LAN API works.

Potential issues:

  1. If you have to use the Cloud APi for your devices be aware of the limitations. You can do 10k API Calls a day for your entire account and 10 per min device. You want to design your requirements around that. If possible use LAN Control or get Lan Control capable devices to remove rate limits
  2. The integration app uses the Govee device name and the Device label in HE to determine if the device has been added previously. I advise you set the device name in Govee Home first and then integrate it. If you need to change it in HE make sure you change it in Govee Home as well.

Last thing is I have limited govee appliances. If you see something not working please feel free to hit me up with the details from the data section at the bottom of the driver. Hopefully i can add something in in short order.

14 Likes

Been waiting for support for their wifi grill thermometer.

Here is the current documented supported device list.

Hopefully they will consider adding it. I suspect they may not though. It seems they only add devices for control and not simply to retrieve states.

1 Like

That is heart breaking. These is no high temp thermometer for HE yet. I find that unacceptable. Bbq temp probe is the epitome of a device that benefits from smarts.

Huge thanks for this! noob here. It didn't show up in the HPM, but I was able to add through WPM > Install > From a URL > and the packageManifest.json in your github

How did you seach for it. Did you do a keyword search.

The reason I ask is because whe. I click on install new app, then press search by keyword and enter "Govee" it comes up.

It only shows up in "fast" search. No show on "fuzzy" search.

1 Like

Searched like that myself, didn't come up. Installed them manually and used HPM to match up instead. That worked.

Still no ability to control scenes or anything outside the typical colors/brightness?

That is still an api limitation unfortunately. If Govee changes that it will be added to driver

I just posted a small update to the Lights driver. Simply put a I noticed that the polling didn't appear to be starting properly so I added a few tweaks.

If you see that polling didn't start after the initial setup please just click on the save button for the preferences. That should start the polling going forward.

There are two Govee APIs. The one that needs the API key is the cloud-based one.

There is also a local API which has no key but needs to be enabled in the app for each device. It is important to distinguish between the two. Especially since the cloud one has a very low rate limit.

1 Like

At the time of this being developed the Cloud API was the only method available. It seems the local stuff is brand new and only partially supported on some devices. Not even all hardware revisions of the same device.

A new set of endpoints were added with the V2.0 of the cloud API as well and that is what supports the Appliance devices like humidifier and fans.

I think :thinking: it would be best to have both options available since there isn't complete overlap yet. I need to get a working device for the local api to start testing with it. I have a h6052 which is suppose to be, but doesn't seem to be working with the local API stuff.

As of now it looks like the cloud supports 140 devices while the local API list that it supports 40 devices (when at the right hardware level).

The cloud rate limit really shouldn't be to much of a problem you get with the standard api you get 100 per min or 10k per day. Unless you have allot of govee devices that probably isn't a issue.

The appliance API is different though. It is 1000 per day. But the appliances piece doesn't support statuses so it is litterly just for turning it on or off and adjusting fan speed so how many times do you really need to do that.

Hopefully they do get everything local though.

1 Like

When I last looked the cloud API was 6/minute but maybe that changed.

Anyone tested if this is compatible with the new M1 strip yet?

@user2263 It is in the supported devices list provided earlier in this thread. I would expect it to work then.

@Bob.ma well the API supports 10k calls in 24 hours and 10 per device in a minute. So that means at most one call per 9 seconds for multiple devices with no single device being more frequent then 6 per second to stay under the 10 per min per device limit. Obviously the more devices you have the less frequent each device can be at that point right then to say under the 10k in 24 hours. Then you also need a buffer to make sure you can do actions on each device. This driver sets the default polling value to every 5 min for devices that support it. Personally I would suggest to keep polling to a minimum so only as frequently as you absolutely need it. Then you only need to worry about the 10 per device per min. If you do most or all of your control from HE you shouldn't have any need for polling since it would be controlling it anyways and be aware of the changes.

That said if local is supported that would be better for a variety of reasons, one of which is the removal of rate limits.

1 Like

10 per minute is fine for most switches and stuff. It's anything that allows for dimming that presents a huge problem with the cloud API.

Dimming isn't a problem. It works fine. The problem would be of you want to have something step it up/down instead of just setting the level. There is a reason the driver doesn't support it which is simply that doesn't work well over cloud regardless of rate limits.

Perhaps once the local api gets better support something could be done with that though. It will be rather hub intensive though to do that in the driver, or a app.

I would also urge you to look at a zigbee or zwave bulb if you need dimming over time as it will work much more fluidly.

Here's my use-case. I have Govee Outdoor Cafe lights. I use a Pico Remote to control them. I use buttons to step up/down the level by 10%

When adjusting it, it is very easy to hit 6 API commands inside of a minute.

@jercloud i am curious what is the model number of those.