Govee Immersion LED Strip Driver - Govee Cloud API

I updated the table above with support for the API confirmed by the Home Assistance folks with their integration. The API is the same so it should be valid for us as well.

NOOB here to using any custom driver or wifi device like this.

But wanted to get my Govee bias lighting working with everything else.

I got my API, and installed the custom driver. Then added a virtual device, typed in my API and device model and what I "thought" was the correct MAC address.

But no luck at all.

Thinking I have the wrong MAC address, and no idea how to get the correct one (I am on a MAC, so not sure if that makes this more difficult).

Here is the log I keep seeing when trying to turn the device on from the device page.

Any help would be awesome!

Second attempt log:

Can you use the curl command. If so can you submit this above command and just substitute your API Key in the string.

I keep attempting this in terminal, but keeps saying
Miss API Keycurl: (6) Could not resolve host: Govee-API-Key

This is all very new and foreign to me, I've never even used Terminal on here before!

Did you put your API Key value on at the end. The error message you are getting indicates it isn't correct. That is just an example. the xxxxxxxxxxx at the end should be replaced with the key you got from Govee when you registered for it on their app.

Another option is to load my driver which is below Oobi2000's in the third post i believe. just to press refresh and get the info in the live logging for the device. Then copy it from the log. Change the driver back to this one and then, save it and then past the new device id in for it.

I made an update to the driver. Now if in the Preferences section you only enter your "User API Key", and leave the other two blank it will:

  1. List in the logs all devices attached to that API Key. It looks like this

  2. It will automatically set your preferences to use the last device in the list (the most recent). So everything should just work if you only have one device. If you have more than one, check the logs and just change the Address and Model in your preferences and save.

I only have one Govee device. So if it gives people with more than one any problems, lemme know.

I have two H6199's and it seem to work great. It just listed the out.

That is a awesome addition to make it easier to setup.

1 Like

That's good to hear. Thanks for testing it out.

Works perfectly now!

Thanks Obi2000, that update saved me a huge headache.

Now I should also start learning some of this basic "coding" (that for the most part you guys make copy and paste, that I still manage to screw up).

So just to throw a huge curve ball here.

Is there now (after my simple brain even managed to add this driver) a way that:

When I activate the virtual switch (i.e. in my case a pico button) that it automatically goes into movie mode?

Currently it just goes to all red color mode.

I know how to adjust the color, but was wondering if there is a way to make it go to the movie mode, or better yet just previous setting?

Thanks in advance lads!!

Unfortunately Govee doesn't provide support in the API for changing the mode. You can only change it using their app. Can't even use a voice assistant like Alexa to do it.

Believe me I really want this feature, so if they ever add it to the API I'll update the driver so you can do it.

If this post should go somewhere else, please let me know. I am putting it here because I know I enjoy reading “use cases” of some of the things that can be done with Hubitat, and especially wanted to share that because of this driver, I’m able to do things (color) beyond what I thought I’d be able to.

Govee can be added to Google Home directly (my AI of choice), and I’m honestly not entirely sure which way of adding the lights to GH makes the most sense…but the way I decided to go was to add them through Hubitat rather than through Govee directly (in my case my lights were already Google Home compatible, but a good number of the Govee lights are not). This is what I did, so should apply to any light strips even if they aren’t wifi (using @Obi2000 driver):

Scenario – 5 strips of lights total. 3 lights for lower kitchen cabinets. 2 lights for upper kitchen cabinets. The lower cabinets, unfortunately, I was not able to splice around my microwave without losing a channel of color…so the lower right side of my kitchen had to be done in 2 pieces.
In Hubitat, all of the strips are added as individual lights. And then I grouped them.

  1. Lower right 1
  2. Lower right 2
  3. Lower left
  4. Upper right
  5. Upper left
    [G] Lower right = lower right 1 plus lower right 2).
    [G] Lower cabinets = Group above plus lower left)
    [G] Upper cabinets = upper right plus upper left
    [G] Cabinets = [G] Lower cabinets plus [G] Upper Cabinets

I am able to create as many scenes as I want with as many color variations as I want, but have also learned that Google will recognize color commands. I just told Google to change my cabinets to chartreuse, and it did.

I can control via the Govee app, the Govee remote control, Google Home via app, Google Home via voice and via Hubitat (I created an “LED Scene” dashboard for quick changing of presets).
In addition I have a smart switch installed on the kitchen counter backsplash, which now turns on/off the upper cabinets with double presses, and on/off the lower cabinets with single presses. I let it retain the last settings, but may update this to default them to a regular white, since commanding google to change colors is easy enough.

I didn’t really expect Google to be able to change these lights to “moonlight” “candlelight”, “chartreuse”, “copper”, “azure”, etc., but it does. I’m very pleasantly surprised.

Thanks again @Obi2000 and also @mavrrick58 for your help with these lights/driver.

Nice! That'll be pretty fun to have around the holidays.

Using a smart switch to control it all though Hubitat is a pretty good idea. I bet it makes them feel more "built in", like part of the kitchen. Triple press for mood lighting? :smiley:

For mine, I have it setup to detect if the TV or Bluray player is on through Hubitat. Then the LED strip turns on, and dims appropriately depending on what's on.

O.k., rabbit hole do you have this set up? I have a Chromecast w Google TV, and I can verbally turn that on/off, and I've added it to Hubitat with the beta integration, but I can't get the lights to realize the t.v. is on, and actually even in Hubitat the chromecast t.v., while reporting correctly, I can't actually change it to off from on or on from off.

I also have a newish Samsung t.v., but right now use the GCTV remote or voice to turn the t.v. on, and voice for the lights.

Well you need to look at what you have and what will let you know the TV is on. I do it in two ways

I have a TLC TV that has Roku built in. The Roku integration for that TV knows when it is turned on. So for that I simply have a rule that says when the Roku device turns on turn on the TV Lights. This isn't instantaneous though as the roku device refreshes once minute, and unless you turn it on from Hubitat it won't know right away. I just use the remote and know in less then 60 seconds the lights will kick in.

I also have a 2014 Samsung TV that has a Roku streaming Stick+ on it. That device doesn't report the on/off state the same so I had to resort a different tactic. I put a Smartthings Zigbee Outlet between the TV and the wall. It just stays on, and reports power usage to Hubitat. With that I have a rule that says when that outlet goes above a certain wattage to turn on the lights. This is near instantaneous since as soon as the power rises the hub is told and then turns on the lights. You have to be careful with power monitoring though. It can make a device very chatty and impact the hub if this is used allot. I also had to add a condition in the rule to make sure it only acted if the light device was off and not on already.

I think newer samsung TV's actually have a integration with Hubitat so you may want to check what that allows you to monitor as well.

I just checked what the Chromecast integration devices have and they don't have anything to do with power state so I think you will need to look at some other device integration to find the TV state.

Hope that helps..

1 Like

I agree that using an outlet with power monitoring would be the smart and easiest way to do things. The built in zigbee power monitoring will even let you set wattage reporting thresholds, and that helps with too many reports. I uh... unfortunately didn't have an outlet with power monitoring.

What I did have was this super cheap Wifi LED controller w/ IR sensor I got off of ebay.

I don't have any strips hooked up to it. But I'm using the IR receiver part.

I flashed the Tasmota firmware on it. Tasmota can see the IR signals of my TV, receiver, and various other devices, and I wrote rules to report to Hubitat depending on what signal it receives. It's really hacky and not recommended. But eh.. it only cost me like $5. It's kinda funny, I have this fancy LED strip and I'm still controlling it using IR in a round about way.

1 Like

@Obi2000 and @mavrrick58 now see both of you are thinking outside the box. I like that! And actually, I hadn't thought about the delay in the lights being because of the polling. This explains why playing with it earlier, it was very weird...I looked, no lights, looked again, lights. Looked again, no lights, but who knows what I'd done in between. I also noticed it's turning on/off my scenes when trying to use voice commands. I have just about every darn thing in here on a wired smart outlet, EXCEPT the t.v. Figures. Maybe I'll do a triple light switch tap for all of it....

Lately I've been playing around with reverse engineering the Govee H6199 bluetooth protocol and I learned 3 things:

  1. At least on my strip, the device address from the Govee API is actually based on the Bluetooth MAC address. Not the wireless network mac address. The API address is in the format YY:YY:XX:XX:XX:XX:XX:XX, with all the 6 XXs at the end being my bluetooth address.

  2. The H6199 uses slightly different BLE commands and formatting than the other Govee devices I could find information on. This was a pretty big bummer. I was hoping to do some kind of general Govee bluetooth to Wifi/Hubitat bridge. But that seems pretty unlikely now.

  3. Bluetooth programming on an ESP32 is a big pain in the butt! I'm glad I don't have to use C++ for my job. Something on a Raspberry PI would be easier but more expensive.

Still was a fun weekend for learning new things.

@Obi2000 interesting on the MAC address...and I don't know if this adds any more insight, but the only way I can add Govee devices to Google Home via Hubitat, is if I create the Govee device as a Group or Scene. Except the Govee Aura Lamp. That one adds directly into Google Home through Hubitat. But the rest of them need to be virtual devices added through the Groups and Scenes app. Adding as a regular virtual device doesn't seem to work, either.

I am wondering if it has to do with the weird Mac address they are using, and if maybe the Aura lamp is using a real network wireless mac address unlike the others.

Thank you for all your work on this driver.

I went and grabbed a Google Home Mini from my work to test it out. And it's detecting my Govee strip. Sorry, I know nobody likes to hear "Well it works for me".

The only thing I could think of, is that I'm starting fresh. And you originally added those devices using the old version of my driver that had the brightness duration bug. Whereas the Govee Aura Lamp is something you just added. Maybe try removing and re-adding a strip to Hubitat, and see what happens.