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

I just published v2.0.16

The enhancements are below

  1. ColorMode Attribute will now reflect if the last state was a CT color, RGB, or a light effect
  2. The Effect will display it's number and name in the current states values. This applies to both DIY and standard light effects
  3. A new value was created for RGB number related to the RGB number sent to Govee.
  4. The DIY and Regular scenes displayed under state should be easier to read and use as unneeded data was removed.

Making progress. Removed my HPM install and installed the latest version, seems to be good now.
installed V2 of the Govee Integration. All of my devices show up in the App and I checked all the checkboxes but only one child device was created and it doesn't seem to work from Hubitat but it's status is "success"

hum ok can you please do a few things so i can dig into this.

  1. Can you list for me the device Model numbers. ie H7142
  2. Please check your live logging and see if errors were created. If not can you please set the app to debug and then click done again so it will attempt to add them. Then send me the logs.
  3. What device did add and what driver did it use.
  4. On the device that did add plase set it to debug and try to change something and then send me the logs for that specific device. Turning Debug on should let me see the flow of the call to the API and what the response was.

3 - H615A
2 - H615C

The one device that is added is a H615C using the GoVee V2 color lights driver (Sunroom LED II)

App log after add with debug enabled;


Device log after initialize and on command;
dev:4822024-02-13 07:37:46.121 PMdebugsendCommand(): Vary: Access-Control-Request-Headers
dev:4822024-02-13 07:37:46.120 PMdebugsendCommand(): Vary: Access-Control-Request-Method
dev:4822024-02-13 07:37:46.119 PMdebugsendCommand(): Vary: Origin
dev:4822024-02-13 07:37:46.117 PMdebugsendCommand(): Vary: Access-Control-Request-Headers
dev:4822024-02-13 07:37:46.116 PMdebugsendCommand(): Vary: Access-Control-Request-Method
dev:4822024-02-13 07:37:46.115 PMdebugsendCommand(): Vary: Origin
dev:4822024-02-13 07:37:46.113 PMdebugsendCommand(): Connection: keep-alive
dev:4822024-02-13 07:37:46.112 PMdebugsendCommand(): Transfer-Encoding: chunked
dev:4822024-02-13 07:37:46.111 PMdebugsendCommand(): Content-Type: application/json
dev:4822024-02-13 07:37:46.109 PMdebugsendCommand(): Date: Wed, 14 Feb 2024 00:37:45 GMT
dev:4822024-02-13 07:37:46.103 PMdebugsendCommand(): response.data=[capability:[instance:powerSwitch, state:[status:success], type:devices.capabilities.on_off, value:1], code:200, msg:success, requestId:c08a5215-fc7f-4eed-97da-cff7cdbca32e]
dev:4822024-02-13 07:37:45.808 PMdebugsendCommand(): powerSwitch, null, devices.capabilities.on_off, [uri:https://openapi.api.govee.com, path:/router/api/v1/device/control, headers:[Govee-API-Key:******, Content-Type:application/json], contentType:application/json, body:{"requestId": "c08a5215-fc7f-4eed-97da-cff7cdbca32e", "payload": {"sku": "H615C", "device": "DB:95:A4:C1:38:C5:6F:F2", "capability": {"type": "devices.capabilities.on_off", "instance": "powerSwitch", "value":1}}}]
dev:4822024-02-13 07:37:45.806 PMdebugsendCommand(): c08a5215-fc7f-4eed-97da-cff7cdbca32e
dev:4822024-02-13 07:37:45.778 PMwarnrandomUUID(): random uuid is c08a5215-fc7f-4eed-97da-cff7cdbca32e
dev:4822024-02-13 07:37:40.193 PMdebuggetDeviceState(): Vary: Access-Control-Request-Headers
dev:4822024-02-13 07:37:40.191 PMdebuggetDeviceState(): Vary: Access-Control-Request-Method
dev:4822024-02-13 07:37:40.190 PMdebuggetDeviceState(): Vary: Origin
dev:4822024-02-13 07:37:40.188 PMdebuggetDeviceState(): Vary: Access-Control-Request-Headers
dev:4822024-02-13 07:37:40.187 PMdebuggetDeviceState(): Vary: Access-Control-Request-Method
dev:4822024-02-13 07:37:40.185 PMdebuggetDeviceState(): Vary: Origin
dev:4822024-02-13 07:37:40.184 PMdebuggetDeviceState(): Connection: keep-alive
dev:4822024-02-13 07:37:40.183 PMdebuggetDeviceState(): Transfer-Encoding: chunked
dev:4822024-02-13 07:37:40.181 PMdebuggetDeviceState(): Content-Type: application/json
dev:4822024-02-13 07:37:40.180 PMdebuggetDeviceState(): Date: Wed, 14 Feb 2024 00:37:39 GMT
dev:4822024-02-13 07:37:40.178 PMdebuggetDeviceState(): Instance: diyScene value is empty. Skipping
dev:4822024-02-13 07:37:40.176 PMdebuggetDeviceState(): Instance: musicMode value is empty. Skipping
dev:4822024-02-13 07:37:40.175 PMdebuggetDeviceState(): Instance: lightScene value is empty. Skipping
dev:4822024-02-13 07:37:40.171 PMdebuggetDeviceState(): devices.capabilities.color_setting colorTemperatureK 0
dev:4822024-02-13 07:37:40.158 PMdebuggetDeviceState(): devices.capabilities.color_setting colorRgb 16746240
dev:4822024-02-13 07:37:40.156 PMdebuggetDeviceState(): devices.capabilities.range brightness 128
dev:4822024-02-13 07:37:40.153 PMdebuggetDeviceState(): devices.capabilities.on_off powerSwitch 0
dev:4822024-02-13 07:37:40.151 PMdebuggetDeviceState(): Instance: online value is empty. Skipping
dev:4822024-02-13 07:37:40.146 PMdebuggetDeviceState():[[instance:online, state:[value:false], type:devices.capabilities.online], [instance:powerSwitch, state:[value:0], type:devices.capabilities.on_off], [instance:brightness, state:[value:128], type:devices.capabilities.range], [instance:colorRgb, state:[value:16746240], type:devices.capabilities.color_setting], [instance:colorTemperatureK, state:[value:0], type:devices.capabilities.color_setting], [instance:lightScene, state:[value:], type:devices.capabilities.dynamic_scene], [instance:musicMode, state:[value:], type:devices.capabilities.music_setting], [instance:diyScene, state:[value:], type:devices.capabilities.dynamic_scene]]
dev:4822024-02-13 07:37:39.911 PMdebuggetDeviceState(): 578826a3-f670-4f95-a182-7869ae4aea7b
dev:4822024-02-13 07:37:39.909 PMwarnrandomUUID(): random uuid is 578826a3-f670-4f95-a182-7869ae4aea7b
dev:4822024-02-13 07:37:39.857 PMwarninitialize(): Device is retrievable. Setting up Polling
dev:4822024-02-13 07:37:39.855 PMwarninitialize(): Driver Initializing
dev:4822024-02-13 07:37:22.521 PMdebugretrieveDIYScenes(): Vary: Access-Control-Request-Headers
dev:4822024-02-13 07:37:22.520 PMdebugretrieveDIYScenes(): Vary: Access-Control-Request-Method
dev:4822024-02-13 07:37:22.518 PMdebugretrieveDIYScenes(): Vary: Origin
dev:4822024-02-13 07:37:22.517 PMdebugretrieveDIYScenes(): Vary: Access-Control-Request-Headers
dev:4822024-02-13 07:37:22.516 PMdebugretrieveDIYScenes(): Vary: Access-Control-Request-Method
dev:4822024-02-13 07:37:22.514 PMdebugretrieveDIYScenes(): Vary: Origin
dev:4822024-02-13 07:37:22.513 PMdebugretrieveDIYScenes(): Connection: keep-alive
dev:4822024-02-13 07:37:22.512 PMdebugretrieveDIYScenes(): Transfer-Encoding: chunked
dev:4822024-02-13 07:37:22.510 PMdebugretrieveDIYScenes(): Content-Type: application/json
dev:4822024-02-13 07:37:22.509 PMdebugretrieveDIYScenes(): Date: Wed, 14 Feb 2024 00:37:22 GMT
dev:4822024-02-13 07:37:22.505 PMdebugretrieveDIYScenes(): dynamic scenes loaded
dev:4822024-02-13 07:37:22.503 PMdebugretrieveDIYScenes():[[instance:diyScene, parameters:[dataType:ENUM, options:[]], type:devices.capabilities.dynamic_scene]]
dev:4822024-02-13 07:37:22.247 PMdebugretrieveDIYScenes(): 01df4749-1743-4922-96c3-f278c8e0cdaf
dev:4822024-02-13 07:37:22.246 PMwarnrandomUUID(): random uuid is 01df4749-1743-4922-96c3-f278c8e0cdaf
dev:4822024-02-13 07:37:22.244 PMwarnconfigure(): retrieveScenes2() returned empty diyScenes list. Running retrieveDIYScenes() to get list from API
dev:4822024-02-13 07:37:22.240 PMdebugretrieveCmdParms(): Adding [dataType:STRUCT, fields:[[fieldName:musicMode, dataType:ENUM, options:[[name:Rhythm, value:0], [name:Sprouting, value:1], [name:Shiny, value:2]], required:true], [unit:unit.percent, fieldName:sensitivity, dataType:INTEGER, range:[min:0, max:100, precision:1], required:true], [fieldName:autoColor, dataType:ENUM, options:[[name:on, value:1], [name:off, value:0]], required:false], [fieldName:rgb, dataType:INTEGER, range:[min:0, max:16777215, precision:1], required:false]]] to state value
dev:4822024-02-13 07:37:22.238 PMdebugretrieveCmdParms(): found musicMode
dev:4822024-02-13 07:37:22.235 PMdebugretrieveCmdParms(): found matching device
dev:4822024-02-13 07:37:22.231 PMdebugretrieveCmdParms(): Getting command data for musicMode
dev:4822024-02-13 07:37:22.229 PMdebugretrieveDynamicScene(): Adding [] to state value
dev:4822024-02-13 07:37:22.228 PMdebugretrieveDynamicScene(): nightLightScene instance
dev:4822024-02-13 07:37:22.226 PMdebugretrieveDynamicScene(): found diyScene
dev:4822024-02-13 07:37:22.225 PMdebugretrieveDynamicScene(): found musicMode
dev:4822024-02-13 07:37:22.224 PMdebugretrieveDynamicScene(): found lightScene
dev:4822024-02-13 07:37:22.223 PMdebugretrieveDynamicScene(): found colorTemperatureK
dev:4822024-02-13 07:37:22.222 PMdebugretrieveDynamicScene(): found colorRgb
dev:4822024-02-13 07:37:22.221 PMdebugretrieveDynamicScene(): found brightness
dev:4822024-02-13 07:37:22.219 PMdebugretrieveDynamicScene(): found powerSwitch
dev:4822024-02-13 07:37:22.216 PMdebugretrieveDynamicScene(): found matching device
dev:4822024-02-13 07:37:22.189 PMdebuggetDeviceState(): Vary: Access-Control-Request-Headers
dev:4822024-02-13 07:37:22.188 PMdebuggetDeviceState(): Vary: Access-Control-Request-Method
dev:4822024-02-13 07:37:22.187 PMdebuggetDeviceState(): Vary: Origin
dev:4822024-02-13 07:37:22.186 PMdebuggetDeviceState(): Vary: Access-Control-Request-Headers
dev:4822024-02-13 07:37:22.184 PMdebuggetDeviceState(): Vary: Access-Control-Request-Method
dev:4822024-02-13 07:37:22.183 PMdebuggetDeviceState(): Vary: Origin
dev:4822024-02-13 07:37:22.182 PMdebuggetDeviceState(): Connection: keep-alive
dev:4822024-02-13 07:37:22.180 PMdebuggetDeviceState(): Transfer-Encoding: chunked
dev:4822024-02-13 07:37:22.179 PMdebuggetDeviceState(): Content-Type: application/json
dev:4822024-02-13 07:37:22.177 PMdebuggetDeviceState(): Date: Wed, 14 Feb 2024 00:37:21 GMT
dev:4822024-02-13 07:37:22.174 PMdebugretrieveScenes2(): dynamic scenes loaded
dev:4822024-02-13 07:37:22.007 PMdebugretrieveScenes2():[[instance:lightScene, parameters:[dataType:ENUM, options:[[name:Downpour, value:[id:1670, paramId:1763]], [name:Sunrise, value:[id:49, paramId:46]], [name:Sunset, value:[id:50, paramId:47]], [name:Dusk, value:[id:51, paramId:48]], [name:Sunset Glow, value:[id:52, paramId:49]], [name:Star, value:[id:53, paramId:50]], [name:Lightning, value:[id:54, paramId:51]], [name:Starry Sky, value:[id:55, paramId:52]], [name:Universe, value:[id:56, paramId:53]], [name:Aurora, value:[id:57, paramId:54]], [name:Rainbow, value:[id:58, paramId:55]], [name:Sky, value:[id:59, paramId:56]], [name:Fire, value:[id:60, paramId:57]], [name:Forest, value:[id:61, paramId:58]], [name:Wave, value:[id:62, paramId:59]], [name:River, value:[id:63, paramId:60]], [name:Grassland, value:[id:64, paramId:61]], [name:Clear lake, value:[id:65, paramId:62]], [name:Desert, value:[id:66, paramId:63]], [name:Spring, value:[id:67, paramId:64]], [name:Summer, value:[id:68, paramId:65]], [name:Winter, value:[id:69, paramId:66]], [name:Fall, value:[id:70, paramId:67]], [name:Karst Cave, value:[id:234, paramId:214]], [name:Glacier, value:[id:235, paramId:215]], [name:Canyon, value:[id:236, paramId:216]], [name:Moonlight, value:[id:237, paramId:217]], [name:Cornfield, value:[id:238, paramId:218]], [name:Flower Field, value:[id:239, paramId:219]], [name:Solar Halo, value:[id:240, paramId:220]], [name:Solar flare, value:[id:241, paramId:221]], [name:Party, value:[id:71, paramId:68]], [name:Candlelight, value:[id:72, paramId:69]], [name:Christmas, value:[id:73, paramId:70]], [name:Halloween, value:[id:74, paramId:71]], [name:Ghost, value:[id:75, paramId:72]], [name:Valentine's Day, value:[id:76, paramId:73]], [name:Mother's Day, value:[id:77, paramId:74]], [name:Father's Day, value:[id:78, paramId:75]], [name:Thanksgiving, value:[id:79, paramId:76]], [name:Dance Party, value:[id:80, paramId:77]], [name:Disco, value:[id:81, paramId:78]], [name:Sweet, value:[id:82, paramId:79]], [name:Dating, value:[id:83, paramId:80]], [name:Romantic, value:[id:84, paramId:81]], [name:Twinkle, value:[id:85, paramId:82]], [name:Siren, value:[id:86, paramId:83]], [name:Fight, value:[id:87, paramId:84]], [name:Sports, value:[id:88, paramId:85]], [name:Game, value:[id:89, paramId:86]], [name:Movie, value:[id:90, paramId:87]], [name:Study, value:[id:91, paramId:88]], [name:Business, value:[id:92, paramId:89]], [name:Work, value:[id:93, paramId:90]], [name:Reading, value:[id:94, paramId:91]], [name:Afternoon, value:[id:95, paramId:92]], [name:Morning, value:[id:96, paramId:93]], [name:Night, value:[id:97, paramId:94]], [name:Sleep, value:[id:98, paramId:95]], [name:Night Light, value:[id:99, paramId:96]], [name:Leisure-A, value:[id:242, paramId:222]], [name:Leisure-B, value:[id:242, paramId:404]], [name:Meditation, value:[id:243, paramId:223]], [name:Care, value:[id:244, paramId:224]], [name:Sweet, value:[id:245, paramId:225]], [name:Fantasy, value:[id:246, paramId:226]], [name:Tension, value:[id:248, paramId:228]], [name:Flash, value:[id:249, paramId:229]], [name:Crazy, value:[id:1671, paramId:1764]], [name:Heartbeat, value:[id:1672, paramId:1778]], [name:Breathe, value:[id:100, paramId:97]], [name:Energetic, value:[id:101, paramId:98]], [name:Happy, value:[id:102, paramId:99]], [name:Enthusiastic, value:[id:103, paramId:100]], [name:Excited, value:[id:104, paramId:101]], [name:Active, value:[id:105, paramId:102]], [name:Warm, value:[id:106, paramId:103]], [name:Quiet, value:[id:107, paramId:104]], [name:Profound, value:[id:108, paramId:105]], [name:Longing, value:[id:109, paramId:106]], [name:Dreamland, value:[id:110, paramId:107]], [name:Relax, value:[id:111, paramId:108]], [name:Retro, value:[id:112, paramId:109]]]], type:devices.capabilities.dynamic_scene]]
dev:4822024-02-13 07:37:21.724 PMdebuggetDeviceState(): 6d34321e-02a2-482c-993d-358dc903f852
dev:4822024-02-13 07:37:21.723 PMwarnrandomUUID(): random uuid is 6d34321e-02a2-482c-993d-358dc903f852
dev:4822024-02-13 07:37:21.721 PMwarnconfigure(): Driver Updated

That shows you attempted the turn the device on.

And that is Govee's response to the API call with a success.

That stinks as you are the second person to have issue with the new APi this week. Please send a support ticket to Govee with and explain that you are trying to use the new APi and it doesn't appear to be working.

When reviewing your app these last 3 lines are the important ones
image

The bottom one shows what was changed when you clicked on done and saved the settings. The next one shows what child devices were already detected connected to the parent app, and then the last one shows that no devices were submitted to be added which is likely due to them already being installed because they were found as child devices in the previous line. Can you take a screen shot of your Devices Page on the hub so we can check what is there. It looks like they should already be installed.

I just confirmed that the models you provided are suppose to be supported. If Govee support can't get this working you may need to go back to v1. I am going to create a discussion post on the developer site about this as well so we can hit it from both sides.

For some reason the devices have appeared this morning in the device list. but they still don't seem to work. So, at least, we have one problem solved.

Ok. So unfortunately there isn't allot i can do about the cloud saying it was successful but then not working. I made a post on the developer discussion board.

At this point lets find out if we have a alternate control method. If you open the Govee app and then click on the gear item to load the settings and scroll through the options do you get a ability to turn on LAN control. Sometimes it can take a up to 10 seconds to appear. If that is a option you can setup a DHCP reservation in your wifi router and then setup Lan control for the device. You loose a few control options, but then you are not dependent on govee's cloud.

If the Lan control option isnt available your best option unfortunately may be to go back to the V1 integration. Nothing wrong with it, just at this point i am not doing any more development on it.

I have created a second thread to sepereate V1 and V2 issues/topics. There is a variety of reasons for the new thread least of which so much has changed that there really needs to be a distinction that it is a whole new way of processing Govee Cloud calls and there is a ton of new stuff supported that is outside of the scope of what the original app thread was really intended to discuss. I apologize if this create confusion for anyone, and i probably should have created this separation a while ago.

The thread for Govee Integration V2 is here

1 Like

As usual it turns out to be operator error. i thought i had reconnected all my IoT devices to the new network but i failed to add the GoVee devices. Connected the devices via the GoVee app and everything seems to be working fine.

i just assumed i had already done it because the App would control the devices. i'm still puzzled exactly how that works since i only see one device connected via bluetooth.
Thank you for your patience and i'll continue to see if i can break it again.

1 Like

Is the H5106 AQM supported via the v2 driver?

1 Like

It would be nice to have those readings in a tile, and to activate devices from those readings.

I asked for it already in the developer discussion board to be added a while ago. I hope they add it as it is a very nice device. I would probably get a few more if they were added. If it ever does i will get it added ASAP. Their supported temp sensors are somewhat limited

2 Likes

I keep trying this but everytime I get a "null" "null" "null" result after clicking on Extract Scene. I've tried doing a single DIY scene, a Tap to Run, and an individual Snapshot in the Govee app. Regardless, I can never find anything to extract when going back to Hubitat I've tried renaming my main group in the Govee App, changing the name of my DIY scene, Tap to Run, etc. but no dice. Any other tips?

@dougcolt

  1. Make sure you have it setup as a Tap-To-Run
  2. Turn on Debug Logging in the App
  3. Capture the logs and send them to me in a PM.

I will review the logs and see what is happening. It is possible something changed that is preventing the parsing method i am using to capture it. Most likely something in the tap to run preventing it from working.

Can you also send me screen shots of the tap to run setup in the Govee Home app in that PM.

Ok I finally figured this out and it was a little tricky and/or I'm a little dumb. Probably both. But here's the procedure I used:

  1. There's a lot to be done in the Govee app beforehand to make this work. First, I created a DIY scene for myself and stored it in the default room in the app.
  2. Then I had to take a snapshot of the DIY that I just created. Seems redundant but whatever.
  3. Then I went to the "Automation" tab at the top of the app. I didn't see that for a good two minutes while digging around. I first thought I was supposed to create an "Auto Play" in the app, as I couldn't find anything called "Click to Run."
  4. There still isn't a "Click to Run" option in Automation, but there is an "Auto Run" option. Clicked on that.
  5. There's no option just to create an "Auto Run" that runs when you tell it to. You're stuck with Sunrise/Sunset, Device status changes, or NFC tags. So, the closest thing there to create an automation that would run when I tell it to was "NFC Tags."
  6. I created a new Auto Run that would trigger from an NFC tag. Luckily I had a bunch of blank ones so I just used one of those. FINALLY that created a customized Auto Run (or "Click to Run" as referenced in this thread).
  7. After that, the Govee Integration App was able to recognize this through Scene Extractor.
  8. After getting the specific code from Scene Extractor, I then did the Manual Scene Add option in the Govee Integration App to create a DIY scene, which I was finally able to trigger through Hubitat.

If there's a more streamlined way to do this I'd love to hear it but after reading through this thread and futzing around for about 90 minutes in the Govee App and Hubitat, this was the best procedure I could figure out.

It really shouldn't be that complicated. You are right that there is some setup to perform but that is allot more then i expect users to do. I have always designed the process to use the Tap-To-Run's for the source of the extraction so i am a bit through off by your comment about NFC Tags.

My expectation is this.

  1. Open In the Govee Home app setup a Tap-To-Run as shown below in my screen shots.
    a. click on the home tab in the ap and ten find your Tap-To-Run section, and click on the + icon in that section. In my screen shot I have a default section and a section labled "Hubiat"
  2. Once in the Add Tap-to-Run screen give it a name and select the group you want to use. The group is what the Integration app on HE needs to be setup to use. Then select the + next to add action.
  3. Scroll down and select the device you want capture a scene from. That will drop in you into a function section. You will first have to select either a snapshot or on/off because everything else is greyed out. So select on/off to enable the other options. Now you can either select Mode and select your scene, or DIY and select your from your available DIY's. Don't select additional functions as that can cause problems potentially with the way it is parsed. Now click on the yellow check in the upper right until you are back to the screen shown in the first image above.

At that point the scene should be able to be extracted. Just go into the Govee Integration app and the Scene management menu. Validate you have the group set correctly and then attempt the extract.

You should be able to do snapshots as well, but they have been a little problematic depending on how they order data.

I really don't know what the association is with Auto-Run or NFC Tags is from. It should also be noted that dreamview groups does not work with this method. It needs to be a 1:1 relationship with device and scene. Have you thought about using the v2 version of the integration. Depending on your needs that may make things easier as well.

Thank you very much for the reply. I cannot explain it but the "Tap to Run" option in the Govee app did not appear until I went through my overly-complicated creation of an automation. Now, the "Tap to Run" card shows up on the Home tab of the Govee app and I can add new scenes, snapshots, whatever as a stand-alone Tap to Run. Again, I can't explain why that option wasn't there before but now it is. Thanks for the huge amount of work you've put into this project! Sending you a donation momentarily.

1 Like

How can I scale the use of Govee effects in Hubitat scenes?

Because scenes only let me set color and level (and not custom attributes), I can't figure out a good way of setting a Govee effect when I activate a specific scene.

I could set a rule that, when a virtual device is switched/pressed/sensed, would send the appropriate effect and other info to the Govee device(s). That'd be fine if there was one, or even a small number of scenarios I want to account for. But if I have six effects I'm interested in, sometimes impacting one lights, sometimes three, etc - the number of rules and virtual devices just for this becomes a bit unwieldy.

Is there a better way forward I'm not thinking of?

All of the Govee Drivers for light devices use the standard lightEffect capability. That said it doesn't seem that there is a standard way documented for scenes to be captured by the Groups & Scenes app. I will look into it a bit and see if i can figure it out.

1 Like

This doesn't appear to be possible in a standard way. The Wiz bulbs use a non standard command to submit scenes, and it appears that is what is used by RL to detect that the device support scenes. I don't even see how "Groups and Scenes" would support Scene Effects at all.