Govee / Dreamcoulour LED Strips

Tags: #<Tag:0x00007f6170b4e870>

Does anyone know if the minger/Govee/Dreamcolour Wifi enabled LED strips work with openhab?

I really want some individually addressable LEDs that work well with openhab.

Here are some links:

Thanks for any advice on how to tell!

I was told no. I’ve had the Govee strips for some time and just recently setup openhab. I contacted Govee support and was told they don’t have an open API.

That being said if anyone manages to get these to work with openhab I’d love to hear about it as well.
Cheers

Hello,

I bought a dreamcolor led stripe, too.
After some research, I ask the support, if there is an API to control the stripe over a third party app.
They reply with that they do not provide an api currently.

Egold555 tries to reverse engineer the bluetooth part of the dreamcolor.
At the moment, he only provides his findings.

ddxtanx published a python library for the govee.
maybe this can be used for the moment.

if someone has some effort to analyze more, here is discribed how to do it with an Android phone.

You can purchase strip controllers that are 8266 based. With those you could reflash to a firmware of your choice like wled possibly tasmota or esphome.

You have to google around and see what brand controllers are 8266 based, but I know on Ali express they sell generic one made for this task.

Yes , you’re right. There are solutions based on ESPs, which can be integrate into OH.
But it is too late. We bought the govee stripe and they are already installed.
And if you have some kind of devices, you are trying to use them with OH. :slight_smile:

1 Like

Hi there,

I am currently working on a Govee client written in Python.
You can find the first version here: https://github.com/thomasreiser/govee_api/

At the moment, I can only confirm support for H6159 and H6163.

It would be great if you could confirm if your devices also work with the client, and if not, it would be great if you would provide me with the raw data received from Govee (can be extracted/printed out in the example test client) or if you send me a pull request.

If someone wants to create a bridge to openHAB - feel free to do so!

@einherjer - Is this repo still available to view? Looks like it’s private on Github, I’ve got some H6159 coming tomorrow so would love it to give it a go

Because sharing is careing:

simple node js script
you need a bluetooth device on the machine that tries to talk to the strip

Examples:
Discover devices and uuid's
node index.js discover

All values can range from 0 to 255 (max)
Turn your strip red:
node index.js <deviceuuid> color red green blue
node index.js a4c138c9a407 color 255 0 0

Set brightness:
node index.js <deviceuuid> brightness value
node index.js a4c138c9a407 brightness 255

Turn strip on/off
node index.js <deviceuuid> on
node index.js a4c138c9a407 on

node index.js <deviceuuid> off
node index.js a4c138c9a407 off

install nodejs ex: from nodejs.org

create blank directory and in that directory execute
npm init -y
npm install @abandonware/noble lodash

create a new file call it index.js and put in the following:

const noble = require('@abandonware/noble');
const lodash = require('lodash');

const [,, uuid, command, v1, v2, v3 ] = process.argv;

const Commands = {
  On: () => Buffer.from([0x33, 0x01, 0x1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33]),
  Off: () => Buffer.from([0x33, 0x01, 0x0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32]),
  Brightness: (value) => Buffer.from([0x33, 0x04, value, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (0x33 ^ 0x04 ^ value)]),
  Color: (r, g, b) => Buffer.from([0x33, 0x05, 0x02, r, g, b, 0x00, 0xFF, 0xAE, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (0x31 ^ r ^ g ^ b)]),
}

noble.on('stateChange', async (state) => {
  if (state === 'poweredOn') {
    await noble.startScanningAsync();
  }
});

noble.on('discover', async (peripheral) => {
  if (uuid === "discover") {
    console.log(peripheral.advertisement.localName, peripheral.uuid)
  } else {
    if (peripheral.uuid.toLowerCase() === uuid.toLowerCase()) {
      console.log(peripheral.uuid);
      console.log("Found Govee thing");
      peripheral.on('disconnect', () => console.log("Disconnected"))
      await noble.stopScanningAsync();
      await peripheral.connectAsync();
      const result = await peripheral.discoverSomeServicesAndCharacteristicsAsync(['000102030405060708090a0b0c0d1910'], ['000102030405060708090a0b0c0d2b11']);
      
      switch(command) {
        case "on":
          await result.characteristics[0].writeAsync(Commands.On(), false);
          break;
        case "off":
          await result.characteristics[0].writeAsync(Commands.Off(), false);
          break;
        case "color":
          await result.characteristics[0].writeAsync(Commands.Color(lodash.clamp(parseInt(v1), 0, 255), lodash.clamp(parseInt(v2), 0, 255), lodash.clamp(parseInt(v3), 0, 255)), false);
          break;
        case "brightness":
          await result.characteristics[0].writeAsync(Commands.Brightness(lodash.clamp(parseInt(v1), 0, 255)), false);
          break;
        default:
          await result.characteristics[0].writeAsync(Commands.On(), false);
      }
      await peripheral.disconnectAsync();
      process.exit(0);
    }
  }
});

use the commands from the beginning in the specific directory you created the index.js
have fun.

1 Like

Ahh super cool! Thank you for sharing!

Do you have any tips for how to get the UUID of the govee strips? I’m seeing lots and lots of devices appear…

Did update the cover to include a discover command (not tested dont have my ble dongle with me)
if you found your device just Ctrl+C out of the thing.

Iam working on a small nodejs server that can be run on a raspy and controlled via simple http rest calls

Yeah thats exactly what I’m planning also! Thanks for your help, im not around the strip lights atm but will give it a shot and report back. Would be interested in setting up a repo eventually to share any code. Will eventually need one if cloning on to a Pi