[Deprecated]Govee Integration for Govee Light, Switches, Plug, and now Appliances

I just want to be clear what we are talking about when I am refering to a Scene. It is the Scene or DIYeffect you have when looking at a single device's options. If you have Automations or Tap-to-Runs that activate multiple lights in your house to create a scene that isn't what this is for. That said you should be able to simply reproduce this lighting setup in Hubitat if you choose.

Ok to extract a scene from the Govee home app you need to setup a Tap to run to look like this.

This example has one device the Scene selected is under mode and is Summer.

Once that is done the next time the Govee integration app goes to extract the scene it will collect it. Do not put multiple devices. Even if they are the same type. The extract process is designed to be 1 device at a time.

The way the scenes are stored once they are extracted in the Govee Integration app you can makes them available to all devices of that model by clicking the button to refresh the scenes devices are able to access.

When the scenes are extracted the Govee Integration stores them in a map. The driver used by the integration goes out to the parent app and retrieves them when it is initialized.

Activating a scenes is still the same as it has been from the beginning where you use the Activate scene or DIYeffect button with the corresponding number associated with that scene. The scenes are listed below all of the command buttons in the States section of the device.

So after all this I have 3 things to add.

  1. The ability to making the group used to extract the scene configurable.
  2. A way to clear the login information to effectively make you log back in. It isn't a log out since the token is still valid, but just clearing the configuration
  3. Some validation around these errors we see when the parser can't handle data it isn't written to handle.
2 Likes

I finally got around to extracting a scene tonight and it looks to have worked perfectly. My question is, can I delete the one touch in the govee app after scene extraction?

Yes you certainly can.

Thanks @mavrrick58

1 Like

@Hus

I just published 1.31 of the app. The changes are below

  1. I realized I had a bug that certain led strips would not get their scenes loaded properly. I updated the part of code that should handle this. All H619A, H619B, H619C, H619D, H619E, and H619Z devices should now see a failly large list of scenes available.
  2. Added a option to clear the token. This actually caused me to rething a bit about that process and as such the whole login procedure was tweaked significantly. Now when you put in your creds you will need to click a button to Login. You should get immediate feedback about it being successful. Prior you had to go into that screen two times to get it to show correctly.
  3. Made the One Click Group name a customizable option. There is now a value in the scene management menu to set this value. It is case sensitive though so make sure it matches exactly.
  4. Added some logic to reject any Govee Oneclick that isn't compatible with the extraction process. Hopefully this will stop the error some are having with scene like @Hus when trying to extract scenes.

Once downloaded you may want to go into the app and then go into the Scene management menu and click on done a few times to ensure all values are set.

2 Likes

Thank you for the update @mavrrick58 excellenet

  • still getting same error when i have several scenes (scenes that evolves more than one light) further if deleted all scenes of tap-to-run from Govee app, and keep one.. it works
  • Managed to import scene finally (to reproduce if someone with an issue)
    ** delete all scenes
    ** added new tap to run scene with 1) single light on it and 2)single mode on that light
    ** import scenes from Govee intergartion app

btw do you know where we find the "command" of scenes so we can add DIY alternatively

I have noticed something new on State variables of all my govee lights after this upgrade, looks like someway how all Scenes even the ones wasn't on Default (as i have right now only one on default) all has been imported and now i can command them directly from setEffect

btw might be useful to add hint or something on setEffect to explain that this can be used for scenes commanding by their numbers as of State Variables

thanks again @mavrrick58

observation looks like all Govee scenes can be commanded by setEffect, it's numbered from 1-12 then 100 to 240 (total observed scenes is 152 scenes)

1 Like

It has always been designed to be a one device and one scene at a time solution. I am not sure how you are creating your tap to runs, but it is creating something of a kind of device group, those will always fail because they don't reference the device at all.

The best way to do that would be to copy out the command when you go the scene extract page. As shown in your screen shot the command is right there. You can also extract the same scenemore then once if needed to retrieve the command again. There is a check to prevent the same scene from being added multiple times.

Yep. Those are the preloaded scenes I mentioned above. If I have a full list of scenes then you really would only be concerned about extracting your DIYeffects.

I will see about adding that in the next release of the drivers.

This is true. Scenes 1-12 are intended to setup to match Wiz Bulb scenes so that if you have both types they can be used together easily with the next and previous scene commands. 100-240 are all of the rest of the scenes that are part of the Govee list.

1 Like

Good Afternoon all.

I just published 1.32 of the app and this is a fairly minor app change. Changes are as follows

  1. I went through and update or added some of the scenes between 1-21. The changes were intended to make them more reliable to actually work. Since most of them that would have issues or didn't exist are static colors, many of them are not actually calling scenes, but just using a estimated color to match the Wiz Bulbs I have.
  2. As I was working on the above change I had two scenes that were being hard to replicate. They were the Sunrise and sunset effect. These will fade up and down over time for 30 min. I was running into a issue with the Fade method. Well to get that to work I made changes to that method. It should be much more reliable now to work and not cause issues if you change activities before the fade up/down completes.
  3. I adjusted some of the preloaded scenes in the Govee Integration app to facilitate 1.

Again this is a minor update and doesn't bring anything new to the mix.

@Hus i looked at the option to add some kind of tips to the command and it doesn't appear possible at this time. That command is enabled using a default capability and as such i don't have control over that aspect of it. That doesn't mean I can't do that, but just that it would require me to not use that standard capability. There are reasons for and against that in this situation. That said i do think it is time to revamp the documentation around this integration. Allot has changed since it was first created so I think that would help folks use the integration.

4 Likes

Great integration, I like it very much. I wonder, what are people using to expose light strips to dashboards ? In particular scenes. I figured out how to control Color, level and light, through a colour bulb widget, but I would like to also control scenes

@mboisson You can make and expose virtual button or virtual switches that are linked to BC rules or RM rules which would toggle or cycle through the scenes you'd like to use.

@mavrrick58: Thanks for working on this integration. If you had not posted in that other thread about it, I still would have not known as I was using an Obi2000 driver...

Minor item I saw in the app when first setting it up, within the "Current Integrated Device Information" section, it lists:
You have null of your 10k Daily APIv1 Calls left.
You have null of your 100 Daily APIv2 Calls left.

Since I had not used it yet, I assume the counter for those is reporting null rather than having been generated with a 0 value (or an if check to make sure the variable is not null).

Got my first Govee device integrated, a Govee Hexa Pro (identified as a Glide Hexa Pro). I also have one of their new Curtains on the way (should arrive today). If there is any specific information you want on either to be able to better control them just let me know and I will be happy to help!

EDIT:
Just got the curtains and hit an error when attempting to integrate them:

[app:2078]2023-06-25 03:09:14.269 PM[error]java.lang.IllegalArgumentException: A device with the same device network ID exists, Please use a different DNI on line 107 (method updated)
[app:2078]2023-06-25 03:09:13.755 PM[debug]Updated with settings: [APIKey:<API_KEY>, apiV2threshold:3, notifyEnabled:false, configLoggingLevelIDE:1, apiV1threshold:3, goveeDev:[Glide Hexa Pro, Smart Curtain Lights]]

Switching it to Trace logging in the app got:

[app:2078]2023-06-25 03:17:14.960 PM[error]java.lang.IllegalArgumentException: A device with the same device network ID exists, Please use a different DNI on line 107 (method updated)
[app:2078]2023-06-25 03:17:14.807 PM[info]initialize() configuring Glide Hexa Pro
[app:2078]2023-06-25 03:17:14.587 PM[info]initialize() DEVICE INFORMATION
[app:2078]2023-06-25 03:17:14.585 PM[info]initialize() [Glide Hexa Pro, Smart Curtain Lights] are selcted to be integrated
[app:2078]2023-06-25 03:17:14.583 PM[info]initialize() Govee Light/Switch/Plugs to add [Glide Hexa Pro, Smart Curtain Lights].
[app:2078]2023-06-25 03:17:14.581 PM[debug]initialize() Child device [Govee Hexa Pro] DNI's [<DNI>]
[app:2078]2023-06-25 03:17:14.576 PM[debug]Updated with settings: [APIKey:<API_KEY>, apiV2threshold:3, notifyEnabled:false, apiV1threshold:3, goveeDev:[Glide Hexa Pro, Smart Curtain Lights], configLoggingLevelIDE:5]

Which led me to figure out what happened and what caused it. I switched the device label of the Hexa Pro from "Glide Hexa Pro" to "Govee Hexa Pro", because that is what I had it before with the old driver. Apparently the app does not like if the label is changed because it tried to add a new child device called Glide Hexa Pro again... even though the DNI was already in existence.

This is just my opinion, but I would recommend checking against the DNI before trying to add a device rather than the label (if that is what really happened). Labels are meant to be the quick-easy ones for people to remember and are changed readily (unlike DNI).

After changing the label back to Glide Hexa Pro it no longer got an error and the curtain was added as a device. Starting to check the Smart Curtain Lights... and while it says it is working (getting Success in the device events for the cloudAPI) they are not actually working. On/Off, setColor, not successful. I double checked, and the Hexa Pro IS working properly from a quick check.

@snell

This integration is based on @Obi2000's driver. It was just extended to simplify the integration and add new features added to thr API. Then the Appliance parts and LAN API controls were added.

The concern with the DNI is a know limitation at the moment. It is a combination of a few things. The directed work around was to make sure if you change the lable in HE to also change it in the Govee Home App or vice versa. I should probably get back to it as there isn't much i can do now for scene control over what is already added.

1 Like

Ah. I tried to search for the error in the thread (at 400+ it is a bit tough to read through all of it) but did not find it, so sorry to repeat a known issue.

Is there anything I should check or logging that would be useful to help determine why the curtain is not reacting properly?

No worries I much prefer a known issue with something i can answer vs someting i can't. I do need to take another stab at addressing this though.

Here is the problem. The way the code is written i don't update that cloudAPI Status attribute until i get a successful response from the Cloud API call. This is done for a variety of things including knowing when a failure occurs from hitting the Rate Limit. But specific to your question though is if the cloud API attribute is progressing to success then as far as we can tell from the HE side all is good and it should work. At this point we are dependent on the Cloud API doing what it says it ia going to do.

If it doesn't switch the cloud API to success you should be able to turn on debug logging in the device driver so we can see the error.

You know what is odd... I just tried again and the curtains worked this time. Need to check on the effects, but on/off/color, dimming... all that is now working.

Maybe it had to settle in or sync with their API... No idea.

Effects wont work with devices that only use the Cloud API. It requires the device to support LAN control and be setup to do so.

Your Glide Hexa Pro will work locally, but as of right now it doesn't appear the curtains will. Everything I have experience testing with mine indicates it is a Cloud only device.

I have been kicking around a idea for a big change that may bring some additional functionality, but it would be a total rewrite.

Well, if there is ever anything you need a guinea pig for, just let me know. :sweat_smile:

It would be another nice use for dynamic changes for device commands/capabilities. If local, allow effects, otherwise not. Maybe someday that would be possible. Otherwise you would have to create local vs cloud versions of the device drivers. Which would also be a pain.

1 Like