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

It is. Govee updated the API recently and gave DIYeffects their own API endpoint. With the improvements to the API there really are only two reason to use the LAN API now. Well as long as your device fully works with it.

  1. To be cloud independent
  2. Prefer number control in LAN API we have in the integration.

The new API is very flexible which is why i have been so excited to support it as much as possible.

2 Likes

Interesting. I can see that some could want a different DYI for one device vs another and both may have the same number, so bringing them both up to the top, making both work as the key would make the most sense to me.

I will go ahead and reorder it so that the Model and Scene Number are on top for the next update.

I am not going to try to split this between devices of the same Model number though. I see that creating bigger issues.

1 Like

I’ll test it out once ready.

I’m having some issues controlling some of the features on the Humidifier (H7140) on the ‘device’ page. Things like changing the scene/humidification(fan) level/on-off/etc.

Also, what commands would I use if I wanted to set the humidification/fan level at a certain time of day via Rule Manager? The ‘device’ page has ‘workMode’ and ‘gearMode’ but I don’t see an option to set ‘gearMode’ in the rules.

V1 or V2 just so i am sure i am making valid suggestions. These are for V2

If you look below the command buttons you will see "State Variables". These are pulled in from the APi to let us know what are valid options for each device. For my H7142 it looks like this.

In that string you can see the first field has 3 options: Manual, Custom, and Auto. These should relate to the actions you can do in the app. After that the second value options are listed. If Manual is selected I can enter 1-8 for different humidity output speeds. If Custom is used a default value of 0 is set. If Auto is used then I can enter a range of 40-80 for the % value to aim for. If auto is not listed in your state variable don't use it in the command.


is an example of setting it to auto mode with a desired humidity of 45.

I just posted a update to address what I think was failing in the logging in your previous post. If something isn't working please let me know so I can work on it.

@Sebastien the order changes are in now as well.

2 Likes

Thanks! So, if I wanted to have a scheduled action that sets a particular scene for this device, would something like this be correct:

I noticed that other devices the item is called scene but in this device, it is called nightlightScene and the only command that seems to be the right one is nightLighton_off.

Nightlighton_off is just going to turn the RGB Light on the device on or off. Please use the seEffect command to pick a nightlight scene. You may want to try it manually first to see if that command will also turn the nightlight on. If it doesn't then you may need to use the "nightLighton_off" command to turn the light on first.

Perhaps there is better wording for that command. As i was working through the driver it is referenced in all of the Govee docs as a nightlight. So that is just how my head was working through it.

1 Like

My counter top ice maker broke and was looking at the Govee I've maker. Does this work with the Govee implementation? I see Govee just launched some new stuff for their API.

So the new Govee API certainly indicates it is supported. I don't have a driver for it yet, so if you get it and want to integrate it let me know and with your help I can get a driver created. A few others have already helped me do this with some other devices.

The only catch is i can't tell you for sure what abilities you will have to control it until we get it and and do the data extract by trying to import the data.

OK, tried all that and nothing, I have two devices. Each with 8 DIY scenes.

I deleted all devices from Hubitat leaving just the integration app.

Between steps 4 and 5, I added the devices since I had deleted them. I changed the names in the Govee app to confirm that it was reading the devices correctly. All good. So now I have two new devices in Hubitat showing the right name and indicating that they are using V2 drivers.

Go to each device. Click Configure and refresh - get all scenes except DIY. Tried the second device - same thing. Tried initialize, refresh, you name it. No DIY.

When into integration app and tried Scene Management. Token is valid. Tried extract scene - As always it shows me one scene, the last DIY scene for the christmas string light. For some reason this is the only one it ever shows - perhaps the first DIY scene I created?

Go back to the devices, nothing in DIY. Try configure etc. Nothing.

I had the same experience under the V1 as well. The only time I got DIY scenes to show up is when I switched on the LAN access.

So I deleted the integration app and started over. Entered API key. Crested devices. Configured - no DIY. When into scene extraction - logged in with valid token. Then got this everytime I tried to extract.:

### Scene Extract

#### **Extracted command below:**

Device name null

Scene name is null

Command is <mark>null</mark>

This command will work with any device with model null

This is what I see in the log under trace:

[app:4467](http://192.168.2.108/logs#)2023-12-24 01:10:58.064 PM[debug](http://192.168.2.108/logs#)sceneExtract(): found Default group moving forward

[app:4467](http://192.168.2.108/logs#)2023-12-24 01:10:57.888 PM[debug](http://192.168.2.108/logs#)sceneExtract(): Calling HTTP server

[app:4467](http://192.168.2.108/logs#)2023-12-24 01:10:57.884 PM[debug](http://192.168.2.108/logs#)sceneExtract() DEVICE INFORMATION

[app:4467](http://192.168.2.108/logs#)2023-12-24 01:10:47.373 PM[info](http://192.168.2.108/logs#)initialize() Govee Light/Switch/Plugs to add [].

[app:4467](http://192.168.2.108/logs#)2023-12-24 01:10:47.368 PM[debug](http://192.168.2.108/logs#)initialize() Found child devices [Porch Curtain Lights 1, Porch Christmas Tree 1]

[app:4467](http://192.168.2.108/logs#)2023-12-24 01:10:47.354 PM[debug](http://192.168.2.108/logs#)Updated with settings: [APIKey:********, goveeDev:[Porch Curtain Lights 1, Porch Christmas Tree 1], goveeGroup:Default, goveeEmail:s*********@gmail.com, goveePassword:#*********, configLoggingLevelIDE:5]

Hopefully this helps. I haven't gone back to V1 but I think the experience was very similar.

I think we need to slow down and take it one step at a time. Lets focus on one method

Are you wanting to use Govee's new Cloud API or the LAN API.

Lets move this into DM's as well.

I don't have a preference as to what I use. My use case is to activate and turn on DIY scenes for both devices. Presently I am not interested in the default scenes. That may come later. So whichever API allows me to access DIY scenes - which I believe is the LAN? Thanks.

Do you know if it’s possible to use the Room Lighting app with the Govee light strips and somehow incorporate the scenes or other light-specific capabilities? I have some existing Room Lighting routines set up, but all I can select for the Type are CT, RGB, dimmer etc.

Unfortunately i think you will need to use RM instead of RL. There are a few things that make it unlikely to change as well.

Got it, thank you. Now I’ll just need to look into re-creating my room lighting routines as RM routines. Regardless, love the integration and work you’ve done!

Actually you may want to hold off until after the next built release. It looks like there may be something coming to fix this. I will respond here as i get more details.

1 Like

When using the setEffect command, do you use the Value ID or the ParamID? For instance, which number would I choose if I wanted the Christmas Tree scene?

Use the ID value

2 Likes

I apologize if I missed this in the thread, but how does the setnexteffect command work? I know the seteffect command will activate one of the scenes based on the IDs that are listed, but how does this work with setnexteffect and how would I incorporate this into a rule?