MiLights/Limitless LED (v6) + HaBridge + Node + Google Home

Hi All,

I have used this forum quite a bit and wanted to contribute back. After many painful hours and weeks trying to setup my MiLights (LimitlessLED, EasyBulb, etc) to work with Smart Things reliably I finally landed on a formula that works.

What I was trying to do

  • Google Home control my MiLights (v6 hub)
  • SmartThings to build automation on my MiLights (e.g. Motion sensor to turn lights on, routines)
  • Use most of the MiLight features (e.g. Night Mode)
  • Not have something that left my home network (e.g. wanted it to be fast) and reliable (I tried a lot on here that would crash)

What you need

  • MiLights + v6 Hub
  • SmartThings Hub
  • System capable of running Node script and Ha-Bridge (rPi, Windows, Linux, Mac all support) running 24/7, most people in this forum seem to have a computer running 24/7

Overview

  • Google Home talks to Smart Things (Note: Google Home can talk direct to Smart Things, however it means you need to run more items to keep HA-Bridge and Smart Things in sync)
  • Smart Things sends commands to Ha-Bridge (on, off, brightness - color is not supported in this without using silly names)
  • Ha-Bridge executes a local node script
  • Node script (not written by me - used by many others already and reliably: https://github.com/mwittig/node-milight-promise) sends a signal to the v6 Hub to control lights

Software Setup

  • Install HA-Bridge on your preferred device (https://github.com/bwssytems/ha-bridge) - Lots of people have created videos on how to install / update HA-Bridge
  • Install NodeJS (https://nodejs.org/en/) - Again, many instructional videos already on how to do this
  • Make sure you installed them on the same server (for ease of use)

Set-up, test and integrate Node script with HA-Bridge
I followed these instructions: http://codecorner.galanter.net/2017/02/24/full-control-of-your-limitless-ledmilight-v6-bulbs-from-amazon-echo/

I wrote my own code at this step, you can also look at heaps of examples written by the node-milight-promise author on the Git Readme page(https://github.com/mwittig/node-milight-promise). My version added more commands to give me more flexibility within HA-Bridge, including controlling colour warmth (I found this really useful as it would automatically set the bulbs to my preferred setting - incase we’d changed colour or otherwise accidentally). My code repeats itself a little as I was testing different ways to operate it within HA-Bridge (I left this in so people could see different options).

var Milight = require('./src/index').MilightController;

var commands = require('./src/index').commandsV6;

var light = new Milight({
    ip: "192.168.x.xxx",
    type: 'v6'
}),

zone = process.argv[2],
action = process.argv[3];
white = process.argv[4];
bright = process.argv[5];

switch (action) {

   case "on":
      light.sendCommands(commands.fullColor.on(zone), commands.fullColor.whiteTemperature(zone, white), commands.fullColor.brightness(zone, 100));	
      break;

   case "allon":
      light.sendCommands(commands.fullColor.on(zone), commands.fullColor.brightness(zone, 100));	
      break;

   case "off":
      light.sendCommands(commands.fullColor.off(zone));	
      break;

   case "dim":
      light.sendCommands(commands.fullColor.on(zone), commands.fullColor.whiteTemperature(zone, white), commands.fullColor.brightness(zone, bright));
      break;

   case "alldim":
      light.sendCommands(commands.fullColor.on(zone), commands.fullColor.brightness(zone, bright));	
      break;

     case "night":
      light.sendCommands(commands.fullColor.nightMode(zone));
      break;

}

light.close().then(function () {
  console.log("All command have been executed - closing Milight");
});
console.log("Invocation of asynchronous Milight commands done");

My HA-Bridge commands:

  • Turn on a light as warm white (e.g. for living room): node "[full-path-to-code]\led.js" 1 on 10 - Light 1, turn on, to a warm white colour
  • Turn on a light as a cool white (e.g. for bathrooms): node "[full-path-to-code]\led.js" 1 on 100
  • Turn off: node "node [full-path-to-code]\led.js" 1 off
  • Dim warm white lights: "node [full-path-to-code]\led.js" 1 dim 10 ${intensity.percent}
  • Set all MiLights into night mode: "node "[full-path-to-code]\led.js" 0 night

Once you’ve tested it all works via the HA-Bridge interface - just one last step.

HA-Bridge -> SmartThings

  • Open SmartThings app, Add a Thing, all the lights you just created will show-up in here

Controlling it via Google Home

  • Link SmartThings and Google Home, it will automatically populate all your lights. You will be able to control these lights throuugh the standard commands. E.g. “Hey Google, turn on the [name of light]”, “Hey Google, set the [name of light] to 50%”.
  • To control items like “Night Mode”, I added a light called “Night” in HA-Bridge, then I say “Hey Google, turn on Night” - in the example above, it will put all lights into the Night Mode setting
  • This will not control color

Hope this helps others trying to do the same, I strung together a few examples and tweaked some code along the way - big thanks to:

I like it. Very similar to how I set my milights up in the end but also different.

Just to add, ha bridge will show up in ST as a Hue Hub. My 24/7 pc like you to keep things local is a PI3 :grinning:

What version of HA-Bridge do you use. I have it installed and Google Home finds it fine, but when I try to add it via SmartThings it never finds it.

Thanks,

Hi, I’m using 4.1.4, I planned to upgrade but haven’t had time. I left the
HA-Bridge on the default settings (port 80 - if google home found it, you
likely have this port in use) and I gave it a static IP address.

I’ve never encountered this issue myself.

I use version 4.5.5 and I see 4.5.6 is now available.

Hi, I was wondering if I could seek some help with the node-milight-promise.

I have followed the guide and managed to install NodeJS & HA-Bridge but encountered problem with node-milight-promise. Followings are steps I took;

  1. Setting up rasberry pie 3B, installed NodeJS & HA-Bridge.
    “node -v” returns v9.4.0.
    can access HA-Bridge Web Interface.

  2. Installed node-milight-promise within “habridge” folder using “npm install node-milight-promise”, which created “/habridge/node_modules/node-milight-promise”.

  3. Copied Yuriy’s script “/habridge/led.js” for testing purposes.
    only changing ip to Wifi Bridge ip address.

  4. Testing “nodejs led.js 1 off” within “habridge” folder; Zone 1 off.

  5. Received msg;
    “Invocation of asynchronous Milight commands done”
    “All command have been executed - closing Milight”

  6. No response from LEDs.

*** I can control LEDs via app. I can scan WiFi Bridge via LimitlessLED admin tool for windows.
*** LimitlessLED Wifi Bridge, model no. iBox2 (the one w/ black strip, I am guessing this is V6?)
*** This is best I can provide in my knowledge and skills, please let me know if there is a log I could access & provide?

The Question is what am I doing wrong, and is there any way I can test if Wifi Bridge itself or node-milight-promise is working properly? I am not sure where it went wrong.

Is node-milihgt-promise sending commands properly?
Did I make mistake invoking commands?
Did I make mistake installing node-milight-promise?

Any help would be greatly appreciated~!

Hi HarumHong. I’m working on a similar issue but the LimitlessLED.com site seems to be offline.
Are you able to upload a copy of the LimitlessLED Admin Tool for me please and post a link?

In case this helps, I found a copy of the /dev page:

That’s brilliant - thanks Brian.

One other thing while I think of it… do you know if anyone captured a copy of the LimitlessLED v6 Admin Tool? It would have been on their site as LimitlessLEDv6.zip

That’s been really hard to find elsewhere.

Ah, that I’m afraid I’m not to certain on. I unfortunately don’t have a copy, best of luck!

Hi everyone, I’ve made a repo that has a full archive of the dev page, https://github.com/Fantasmos/LimitlessLED-DevAPI

Not sure if it can help @Jellygoop , but https://github.com/Fantasmos/LimitlessLED-DevAPI/tree/master/Jan10 contains some code for emulating the V6 bridge. Hopefully it can be used in place of the admin tool!

Thanks Ben, appreciate you putting this together!

I actually found a copy of the v6 Admin Tool as well over the weekend. Link below…

http://forum.micasaverde.com/index.php?action=dlattach;topic=87358.0;attach=38542

Great to hear, i’d be happy to add it to the repo as well (but I can’t access it as there’s a login required to access it)

Sorry Ben - didn’t think that one through.

I’ve uploaded it to zippyshare. Hopefully you can access form there.

Steve

Thanks a ton, i’ve added it to the repo!