HomeBrite Smart LED Bulb

So as it happens, this can be done now. It’s kludgey as hell and not complete control, but you can do it.

Turns out that the HomeBrite bulbs use a protocol called CSRMesh, and this GitHub project is a (at least partial) reverse engineering of that. Once I got it cloned, built, and installed, the CLI worked a treat for turning the bulb on and off. And once you can do it from a command line, it’s just a command-line switch (using the MAC address of the bulb and the PIN you set when you originally installed the control app):

switch:
- platform: command_line
  switches:
    lrlight:
      command_on: "csrmesh-cli lightbulb --dest xx:xx:xx:xx:xx:xx --pin xxxx --level 255"
      command_off: "csrmesh-cli lightbulb --dest xx:xx:xx:xx:xx:xx --pin xxxx --level 0"
      friendly_name: Light Bulb

And once it’s a switch, so long as you have the emulated Hue hub set to pick up switches, Alexa can talk to it.

I dunno if this would work directly with a Pi3’s Bluetooth (I imagine it would) but I plugged a Monoprice USB mini BT adapter into my Pi2 and it worked perfectly. The drawbacks: I’m limited to on/off states (I don’t care because I only want all or nothing) and because it connects to the mesh separately, it isn’t able to poll for a state, so if you turn the bulb on through other means, HASS won’t pick it up on its own on the Dashboard. Oh, and it’s pretty slow…there is a several second gap between Alexa saying “ok!” and the light actually activating, probably through the handshaking of the BT adapter connecting to the mesh separately.

So hopefully you can adapt any or all of this to your own needs! Like I said, it’s not perfect, but if it can be done like this, hopefully it can eventually be done in HASS, especially when the protocol is a known entity now and can cover several brands.

1 Like