Govee Integration V2

Nothing there…

Updated package manager. I’m now current. I thought there was a notification when package manager was updated. But I was not able to install the drivers still

Did you upgrade it or completely remove HPM and reinstall it.

There was something that happed a few Hubitat firmware versions back that broke HPM's ability to update and caused it to have DB corruption. You may need to reload it from scratch and match everything up again to fix it. That is generally the reason for you not getting notified of the updates that were posted.

If you check your live Logging are you getting any other errors?

I got it. I had to uninstall and reinstall v2 integration with the new HPM. All good now. Next question, can we not import groups from the Govee app?

Groups are a cloud only thing in Govee and not presented externally. You can easily create automations in Hubitat with all of the devices together though.

If your group is a Movie or Music Dreamview then the driver can turn that on and off for the device that controls the Dreamview.

Ok cool. Thanks for your help!

Did you ever figure out how to change the mode (Air Purifier) via RM?

No. That new gear thing doesn't seem to be easily accessible in Rule Machine, at least not that I can figure out.

Maybe if I knew the custom commands to use, and whether they are a string, variable, and whatever else, it could be done. But I am not smart enough to figure that out.

@aarony and @neonturbo '

This has always been intended to be possible. So if it isn't i have failed you a bit. Let me validate my automations i am using are actually working to set this and then i will respond here.

Another item is i am considering just starting to create custom drivers for each air purifier device. Allot of the Govee Life Appliances use the Working Mode Command inconsistently. Them doing that and limitations with how Hubitat handles drivers is making it darn near impossible to create universal drivers as i have been trying to do.

I just got a H7126 Air purifier and it is doing things even stranger and inconsistant.

If i create dedicated drivers for air purifiers then i will simplifiy the commands used. ie dedicated command buttons for fan speed or mode speed or sleep ect. Should make it much easier to use in RM if i got that route. I was just really trying to keep things as generic as possible but at this point both hubitat and Govee are working against me on that.
What Air Purifiers do both of you have?

1 Like

H7120 and H7122

What confused me was in Rule Machine, you have to do a custom command, and only Working Mode is available. That is confusing because there is Gear Mode and Working mode in the device settings page when it lists out the possible combinations for Low, Medium, and so on. So that is the first hurdle that those modes don't seem to match when you try to create a rule.

Then when you do choose Working Mode in RM, it asks whether it is a String, Decimal or Number, I assume String is the right answer there? However none of those seem to work when tried.

Once you choose one of those 3 options, you have to enter the String or Number, and no matter what combination of options I try, nothing seems to be what is needed. I guess I just don't know what to call the String, how it is formatted, and so on.

This may be a big ask, but ideally I would like to see these speeds exposed as buttons or maybe switches. It would be a lot easier if you could just add a simple button labeled Low, Medium, Sleep, or whatever on a dashboard as well as choosing them in a rule. I think that is possible (in general), other drivers (admittedly different devices) expose things in that manner. Similarly, I would love to see the light on the 7020 be exposed as a simple RGB bulb that could be more easily controlled.

Thanks for considering any changes you can do to make this much simpler to use.

@neonturbo and @aarony

So here is an example of something i just tested myself to make sure it works.

Simply put you need two parms for the working mode command

The first one represents the type of comand so depending on the device either 'gearMode', 'Custom', 'Auto', 'Sleep'
The second value depends on the first. For 'gearMode', the options are either 'Low', 'Medium', 'High'. If you use 'Auto', or 'Sleep' the second value doesn't matter. I need to test it but if you use Custom 'you are generally setting a custom speed and then i believe 'N/A' needs to be passed and a third value depending on a rage needs to be used.

The state value for workMode has all the information about what can be used for a specific device as shown here on my H7121 Large Room Air Purifier.

I have the H7123. However, I think the main point continues to be glossed over. All we really need to know is this: How do you change the mode with RM?

We have tried String options and all that does is change the description. We have tried numbers and that doesn’t do anything.

1 Like

Oh See…thanks a ton! However, There seems to be a bug, Only the description gets updated.

1 Like

I tried things the way you show, and even tried "High", high, "high" and about any combination I could think of. None worked to change the speed of the device.

But there are other modes I can't seem to access at all considering they are a gear mode and not workingMode. I think it was Sleep, or maybe it was custom speed? Either way, only a couple of these were listed under workingMode like you show in the theoretical modes on the device settings page, and that seems to be confusing at a minimum, but it implies (at least to me) that you should be using a Custom Command of gear mode and not working mode, but there is no such option within Rule.

@neonturbo and @aarony

You know what, I know there was logic to this when I originally set it up, as i was standardizing code, but that has clearly gotten in the way of usage. I honestly don't disagree that it is a pain the way it is. It is one thing for me to figure it out since i wrote all this stuff, but a little ridiculous for you all to have to figure it out honestly.

So between the 3 of us we have the H7120, H7121, H7122, H7123 and the H7126. Lets do this. The frame work is in place already. Can you guys send me a PM with a screen shot of your devices working mode options like I did above and the data section at the bottom so I see the supported commands.

I will work on dedicated drivers for the devices as each one I suspect has quirks. I will let you know when they are done. Based on what the device does I will create new commands for each of the option in working mode to make it simple and more RM friendly. I have the H7120, H7121, and H7126 so i just need the details for the other two

1 Like

This doesn't make much sense as it is the exact same routine used between the RGB driver and the non RGB driver that currently works with the H7121 i have. and it certainly works there. Can you turn on debug logging and generate the error and send it to me.

I don't disagree with any of this which is largly why my previous post went the way it did. Time to simplify this and make it work for everyone easily.

1 Like

7122...

1 Like

Forgive me.. I have a question that I feel is pretty dumb. I however, can't wrap my head around the v2 vs v1. In v1 when I added a device to a rule for instance, I had to set the mode to the integer (number) when I wanted to set the mode depending on the device. In v2, which i just migrated to, are these the same, or can i use the "Auto" "Custom" etc mode as a string within the rule? Feel free to razz me about the question. Don't know why my brain can't "click" on this.. Thanks.

No razzing at all.

Honestly this is largely what the above few posts are about. The big difference between v1 and v2 is V1 uses the original Govee API(2017), while v2 uses Govee Developer API Platform(2023). The new Govee Developer Platform adds a bunch of functionality and combines Govee Life (appliances) and Light devices.

The one big problem is that the new API uses a workMode command in a bunch of different ways for different types of Govee Life devices and it isn't consistent. Because of the way the parms work as well it can be a bit confusing and basically made a mess of how RM Works with it. Unfortunately when I released V2 the way my head was thinking about things was to try to keep things as close to the commands as possible. Hence the dumpster fire that is the workMode command in my drivers. It does work, it is just a pain to use and not really intuitive.

Right now I am working with @neonturbo and @aarony as posted above on a few dedicated drivers for specific devices. These new drivers essentially get rid of the workMode Command and break it out into it's parts. The idea being to set fan speed you click on the appropriate button and select the speed. To set Auto Mode or Sleep Mode you click on that command button. ect. I expect these improvements will make the drivers much easier to use.

The problem is these drivers are device specific. So the other drivers will still be present as generic drivers for users that don't have specific devices I have created drivers for.

To get a driver created is pretty straight forward. I just need the below

  1. A screenshot of the workMode State value as I posted above
  2. A screenshot of the Data Section at the bottom of the device page.

Those two things provide me all of the information I need to create the driver. I suspect at some point there may be some overlap, but until then I will just be creating them.

I haven't updated the main repo for this update yet as it has a fair amount of code changes and enhancements. Want to give it time to burn in and test a bit.

If you want to collect the information I mentioned above for each device you have and send it to me I will make sure it has a driver when I release this update to everyone. :slight_smile:

Certainly.. i'd be more than happy to help.. I have 5 govee devices (well soon to be 7 thanks to Amazon Prime Day today LOL)..

The items I have are: H7123 (x2) H7126 (x1) which are Air filters, H7134 Space Heater w/RGB, and H6199 Dreamview T1.

I have a 2 pack of the H7075 Wall light incoming, again thanks to Amazon Prime Day.

I will collect the info of these (hopefully I can find what you're looking for lol) and I'll DM them to ya.

Thanks again..!!!