• Home
  • About
  • Resume

Full control of your Limitless LED/Milight bulbs from Amazon Echo

By , 05/12/2016 11:34 AM

Limitless LED Limitless LED offers full color RGBW light bulbs that you can control over Wi-Fi/4G from your computer, phone or smartwatch. They’re an inexpensive alternative to Philips Hue and they look really cool.
But I, being lazy ass that I am, was wondering if you can control the lights from Amazon Echo by voice commands alone. Out of the box Echo and Limitless LED don’t recognize each other. Amazon can see and control Hue, but not Limitless LED. Fortunately geniuses of BWS Systems came up with a really cool piece of software – home automation bridge “HA-Bridge”. It’s free and written in Java so it can run pretty much in any environment under any OS. What it does – it emulates Philips Hue API so other devices on your network – like Echo – can see and interact with it.

It’s pretty easy to run and configure and it has a tab in UI where you can manually add any device unsupported out of the box. All you have to do is give your device a name and specify which commands to send to device for ON, OFF and DIM requests. Commands can be scripts or simple TCP/UDP data sent directly to the IP/port of your device. Here’s where Limitless LED API comes very handy. According to it – all you have to do to control your bulbs is send set of specific bytes to the IP of your WiFi bridge. For example to Turn ON lights in Zone 1 you have to send hex sequence 45, 00, 55. To turn them OFF – the sequence is 46, 00, 55. To set specific brightness level – first you need to send ON sequence and then 4E, <brighness level>, 55. This resulted in following manual config:

limtiless0

Note that I gave this device name “Lights” – I did it for shortness, but you can call it “Living Room Lights” or “Office Lights” or whatever you want – this is the name Amazon Echo will recolonize the device by. Before using newly added device you need to tell Echo to find it: “Alexa, discover devices”. Once discovery is finished you can issue command for your <device name>. In my case – “Alexa, turn lights ON”, “Alexa, brighten lights to 10”, “Alexa, dim lights to 2”, “Alexa, turn lights off”. Magic.

This is all fine and good – but you have full color lights. And you want to be able to control colors as well. But both Echo and HA-Bridge API support only basic On/Off/Dim commands. What to do? Why not add another device for color control? According to Limitless LED API to control color you need to issue command 40, <color code>, 55. To reset it back to white the command is C5, 00, 55 (note that these will differ per group/zone – mentioned are command for Zone 1). Hence comes this setup:

limtiless1

Here <color code> = 60 “green”. Note that I call this device “Green Light”, so now I can issue command “Alexa, turn green light ON”. Command “Alexa, turn green light OFF will reset color to white. DIM command set up previously works on colors as well. Don’t forget you need to tell Alexa to discover devices after you add new ones.

Using this approach you can control as many colors as you want or even pass color number to bulbs directly. Again – magic.

UPDATE: 02/2017 Here’s a better resolution screenshot. It also features newer v4.x version of HA-Bridge with more streamlined UI (e.g you no longer have to bundle multiple URLs into JSON arrays).


If you have any questions or would like to share some hacks, please with our forum.


82 Responses to “Full control of your Limitless LED/Milight bulbs from Amazon Echo”

  1. Chris says:

    Hi, cheers for this post but I’m struggling to read your screengrabs.
    Could you check my code matches or what I’m typing wrong!

    [{“item”;”udp://192.168.1.90:8899/0x450055″),
    {“item”;”udp://192.168.1.90:8899/0x406055″}]

    Thanks
    Chris

  2. Yuriy says:

    @Chris Sorry about this, should’ve had links to larger screenshots. Here’s correct format

    [{"item":"udp://192.168.1.90:8899/0x450055"},
    {"item":"udp://192.168.1.90:8899/0x406055"}]

  3. SwisherBang says:

    This might be dumb to ask but how do I install HA-bridge to my mac??

  4. Yuriy says:

    @SwisherBang not sure exactly how Java works on Mac, on Windows box after downloading the JAR file I simple run java -jar ha-bridge.jar, perhaps something similar in Mac’s terminal?

  5. Carl says:

    My DIM code isnt doing anything

    [{“item”:”udp://192.168.0.7:8899/0x470055″},
    {“item”:”udp://192.168.0.7:8899/0x4E0255″}]

  6. Yuriy says:

    @Carl do other commands (ON/OFF) work? Also can you verify the DIM command outside of Alexa? E.g. if you have Android phone – you can use UDP Sender (https://play.google.com/store/apps/details?id=com.hastarin.android.udpsender) to send commands

  7. Andy says:

    @Carl I found this dim command works well:

    [{“item”:”udp://192.168.0.14:8899/0x450055″},{“item”:”udp://192.168.0.14:8899/0x4E${intensity.math((X*27)/255)}55″}]

    First line turns the light on (so you can go from an off state to a dimmed state with just the “Alexa, set to 50%” type command.
    Second line takes the binary number (X) (converted from the spoken percentage to 0-255 range) and rescales it to the 0-27 range that the Milights use.

    If you stil have problems either watch the console messages (assuming you ran the .jar in a terminal or go to the logs tab of HA-Bridge, change the log level to DEBUG at the bottom and play around with the dim values whilst checking the log messages. This should tell you whats going wrong.

  8. Jonathan Mayberry says:

    Hi guys, any idea what i am doing wrong? I get no response with the on or off codes like these:

    ON- udp://192.168.1.69:8899/0x450055
    OFF- udp://192.168.1.69:8899/0x460055

    However, if I change the off code to:

    udp://192.168.1.90:8899/0x406055

    The lights turn green, so I know im sending responses, any way there is another on/off code?

    Thanks so much for this article!

  9. Jonathan Mayberry says:

    My last comment should have read for OFF code that turns green:

    udp://192.168.1.69:8899/0x406055,

    I had improper ip in my first comment, thanks again!

  10. Jonathan Mayberry says:

    Nvm, thanks again! I found the codes I was in need of, here is a list that may help some others:

    # 4 Zone LED Controller (thnx to Detlef Fossan to provide these data)
    #
    # 40 xx – color selection (xx = value between 00 and FF, 00 = blue, FF = purple)
    # 41 00 – turn master off
    # 42 00 – turn master on
    # 43 00 – speed down
    # 44 00 – speed up
    # 45 00 – turn Zone 1 on
    # 46 00 – turn Zone 1 off
    # 47 00 – turn Zone 2 on
    # 48 00 – turn Zone 2 off
    # 49 00 – turn Zone 3 on
    # 4a 00 – turn Zone 3 off
    # 4b 00 – turn Zone 4 on
    # 4c 00 – turn Zone 4 off
    # 4d 00 – light changing mode
    # 4e xx – brightness selection (xx = value between 00 and 1F)

  11. Jonathan Mayberry says:

    Anyone know how I could dim or adjust brightness of white only lights using the codes below? It would really help me out as I can not figure it out a working dim code. There is no brightness selection code I can find as there is for RGBW zones.

    # 39 00 55 – turn off
    # 35 00 55 – turn on
    # 3c 00 55 – turn brightness up
    # 34 00 55 – turn brightness down

  12. David Hayward says:

    Unfortunately I can’t get the dim to work – I keep getting SyntaxError: Unexpected token < in JSON at position 0

    Looking at the formula:-
    [{“item”:”udp://192.168.0.14:8899/0x450055″},{“item”:”udp://192.168.0.14:8899/0x4E${intensity.math((X*27)/255)}55″}]

    Shouldn't this be:-
    [{“item”:”udp://192.168.0.14:8899/0x450055″},{“item”:”udp://192.168.0.14:8899/0x4E${intensity.math((X/255)*27)}55″}]

    So for full brightness user input 255/255*27 = 27
    or for half brightness user input 127/255*27 = 13

    Would this need a .toString(16) to also convert this to Hex?

  13. Paul says:

    Are you having to set a static IP for this to work?

  14. Yuriy says:

    @Paul It’s preferable (and shouldn’t be a problem in modern routers). Local IPs live long, but if they’re leased you never know when they may change

  15. Paul says:

    Thanks for the reply, @Yurli. I guessed as much. I currently control my limitless/easy bulb lights with tasker/auto voice which pretty much does the same thing.

    One thing I’m not sure of with the HA-Bridge. Does the PC/Laptop the software is installed on need to be always on or do you run the software, add devices and you’re done?

    Thanks in advance.
    Paul.

  16. Yuriy says:

    @Paul Yes, it has to be always on since Echo, when it hears a command, passes it to HA-Bridge first. And HA-Bridge in turn passes it to Limitless LED bridge. But since HA-Bridge is written in Java – it can run on variety of devices – Arduino, Raspberry Pi, variety of stick-PCs etc. Doesn’t have to be your laptop.

  17. Paul says:

    Thanks for that, Yuriy.

  18. Keith says:

    I am trying to switch between colour and just white LEDs, where with remote you hold down the “On” control for about 2 seconds to do this. I can’t work out how to do this in HA Bridge. I see the code 0xCB (for group 4 which applicable for my setup)but not sure if this is correct or how to implement it, any help appreciated

  19. Juan C Galvez says:

    I am having the same message that David Hayward.

    “Unexpected token < in JSON at position 0"

    In my case On Url is:

    mosquitto_pub -h 192.168.0.164 -p 1883 -t /lights -m livingroom-on

    What could be wrong?

    Sorry if I am a little bit off topic here.

  20. Martijn says:

    Hi, my version of HA-bridge has extra fields with Http Verb, Content Type, Content Body On, Content Body Dim, Content Body off.
    What should be entered there?

  21. TimG says:

    I’ve got everything working *except* the switch to white. This command is always completely ignored. It is as though the API has been changed in this point. The Milight remote still works for it though, so the command must be there. This is what I am using for zone 2:

    [{“item”:”udp://192.168.178.76:8899/0x470055″},
    {“item”:”udp://192.168.178.76:8899/0xC70055″}]

    The first line activates the zone and turns on the lights, but the second does nothing. The syntax is definitely correct. For example, this activates green, no problems:

    [{“item”:”udp://192.168.178.76:8899/0x470055″},
    {“item”:”udp://192.168.178.76:8899/0x406055″}]

    And this is the current sequence for white in zone 2 from http://www.limitlessled.com/dev/, so that should be correct as well:

    SET COLOR TO WHITE (GROUP 2) 0x47 100ms followed by: 0xC7

    Ideas, anyone??

  22. GorgiS says:

    If someone gets Unexpected token < in JSON at position 0 you should write the code not copy it from here.

    Cheers

  23. Ashley Wainwright says:

    Hi,
    I’ve set up my HA Bridge on my Raspberry Pi, however, when I add a device, none of the commands work. My Milight Wi-fi box has the IP address 192.168.1.228, I have even confirmed this by logging into it. The port is also set at 8899. My on command is
    udp://192.168.1.228:8899/0x450055
    and my off command is
    udp://192.168.1.228:8899/0x460055
    I have no idea why it isn’t working. Does anyone else?

  24. Dexteryout says:

    Hi guys great thread, however, I get this working with 1 bulb, but I have any more, can anyone point me in the right direction to a) add more bulbs in, and b) add just white lights not the RGBW also

    Thanks

  25. FrankB says:

    Hi all,

    i have the same problem as TimG, is there already a solution?

    Furthermore, I have tried dimming to change the color. Unfortunately not all colors are available. Does somebody has any idea?

    [{“item”:”udp://192.168.178.133:8899/0x450055″},
    {“item”:”udp://192.168.178.133:8899/0x40${intensity.byte}55″}]

    For info: I use RGBWW stripes.

    Thanks

  26. timbiotic says:

    Ugg i am lost, is this supposed to work for milight too? Also is there any other setup required? Like do i have to add my current philips hue first? Or should it be off completely? Can they not be on at same time. I followed the examples here and cannot get it to do anything. Well I take that back if i add my current philips hue in the config, push the blue button, it will detect all my current lights. But I am trying to get control of my milights.

  27. timbiotic says:

    Ashley same here, i wonder if its because of the code version of the MiLight Controller. Do you have the ibox2? Also what version of firmware? Mine is V1.0.08. The SSID is set for Milight3.0-1E2826 which makes me wonder if this is the new 3.0 software maybe not compatible with the ha-bridge version?

  28. timbiotic says:

    v6 for limitless i think they have changed commands in v6. I am curious, can some of you download and test the sample windows app found here http://www.limitlessled.com/dev/ to see if you can send light commands from it? Mine works fine from within the app, but not from UDP packets from that app or the HA Bridge

  29. kaigame says:

    Milight/limitlessled changed the api on the V3 kit(V6 API), which is really annoying, it’s now bidirection token(temporary) based. Can’t just send a command to them anymore. If you have the new Ibox(the crappy lamp you can’t turn on and off without an app) then this won’t work unfortunately. I haven’t found a working solution as of yet 🙁

  30. timbiotic says:

    Nuts, i found people having luck here https://github.com/mwittig/node-milight-promise/issues/7 … I was going to try with the packet software he referenced. I have the “ibox2” but it uses the MiLight3.0 SSID so i think its the new stuff. I might have to buy the ibox1 controller if i dont have luck with this. So sad they would gimp the product which might kill alexa integration. But it is to secure it so i get it.

  31. Joerg says:

    my code for green is working fine:
    [{“item”:”udp://192.168.0.155:8899/0x450055″},
    {“item”:”udp://192.168.0.155:8899/0x406055″}]

    same logic for red is not working…
    [{“item”:”udp://192.168.0.155:8899/0x450055″},
    {“item”:”udp://192.168.0.155:8899/0x40B055″}]

    Any ideas?? I’m totally lost!

  32. Joerg says:

    With UDP Sender udp://192.168.0.155:8899/0x40B055 is working.
    So it seems this is a bug in HA Bridge!?? Can someone confirm?

  33. FrankB says:

    @Joerg

    Yes I can confirm that. For me it is the same. By HA-bridge and echo it does not work, by UDP transmitter already.

  34. TimG says:

    Same here. The problem is the combination with HA Bridge. I’m running it on my Synology.

  35. kaigame says:

    I’m using this with ha bridge:
    http://epocapp.bitbucket.org/milight/

    It’s a windows app, controls up to 4 bridges, seperate zone control is available on the pro version.

    I’ve got it configured to use http, so the ha bridge sends the commands to the web interface, seems to be working quite well on the v6 controller, although brightness doesn’t work too well at the moment.

    I’m lucky that my ha bridge is running on a windows environment, so the two can run from the same box.

  36. Timbiotic says:

    I bought the v2 controller and am now running into white issue anyone get it going?

  37. Doug Dalton says:

    [{“item”:”udp://192.168.2.90:8899/0x450055″},
    {“item”:”udp://192.168.2.90:8899/0x4E${intensity.math((X/255)*27)}55″}]

    works well for dimming, just make sure when you copy it check the copied code by refreshing, mac will add weird quote characters and give you the json error

  38. Dexteryout says:

    I seem to be struggling with the dimming part of all this.
    for the dim URL I have
    udp://192.168.0.32:8899/0x340055 which for my lights (white bulbs only) dims them a little at a time, but how do i make it brighter?

    Thanks

  39. Peter says:

    Hi, has someone found a solution for this “white problem”? Also red (0xB0) doesn’t work and some other colors.

  40. Peter says:

    Hi again. Solved with the new Habridge Version 4.0.2!

    Now I need to know, how to mix white LEDs and color LEDs together. There are no information on the limitlessLED Dev website.

  41. Oliver says:

    Hi

    Can anyone tell me how you do this with mi light and ha bridge 4.0.2

  42. Oliver says:

    Hi thien

    No you need the wifi controller

  43. Timbiotic says:

    You need the controller. The one in that pic looks like the one you need (Mi-Light v2). Just don’t get ibox 2 if you want to use the method on this page. Also I have found muzzley app works with Alexa without having to use HA Bridge at all.

  44. larryllix says:

    Don’t forget for the MiLight hub/controller you always need to address the group/bulb first by sending an On command. Then you need a minimum of 100mSec delay before sending any other colour or brightness level.

    The 100mSec delay may be hard to achieve.

    I always dim my units to the lowest, about 6%, before turning them off so that you don’t see a 100 mSec. colour flash when the On is sent, before you can change the levels, next usage.

  45. jacky says:

    If I enter this code

    [{“item”:”udp://192.168.2.90:8899/0x450055″},
    {“item”:”udp://192.168.2.90:8899/0x4E${intensity.math((X/255)*27)}55″}]

    After saving i have this shit code

    [{���item���:���udp://192.168.2.90:8899/0x450055���},
    {���item���:���udp://192.168.2.90:8899/0x4E${intensity.math((X/255)*27)}55���}]

    What am I doing wrong ?

    I use the Ha-Bridge on Zyxel NAS with ARM CPU

  46. Yuriy says:

    PSA: New v4.1.4 version of HA-Bridge has much more intuitive UI. Just got a new Echo and set lights up in mere minutes. Get the latest version at http://bwssystems.com/

  47. Hi Yuriy

    Could you post a grab of one of your config screens from the updated HA-Bridge.
    Would be a great help!

    Thanks

  48. Yuriy says:

    @Chris, here’s one example: http://i.imgur.com/GOJcrp7.png
    What I like the most – I don’t have to mock around with JSON anymore with multiple commands. I can just add as many commands as I need in UI.

  49. Renji says:

    What is the code to set the bulb back to white? Set to any Color via HA-Bridge works fine, but set back to white wont work.

Leave a Reply

Panorama Theme by Themocracy