How to Control your Smart Lights with the OpenHab MiLight Binding

In this post, I will explain to you how to install and configure the OpenHab MiLight Binding. After going through the tutorial you will be able to control your MiLight bulbs using Openhab. If you are not familiar with Openhab yet you will want to learn about the difference between Things and Items and how to create Sitemaps.

If you haven’t heard about the MiLight products you may want to check them out. They are known by different names Easybulb/limitlessLED/MiLight but they are all controlled using the same bridge and SmartPhone app. They are an affordable alternative to Phillips Hue and perform very decently for the price.

What Do You Need?

OpenHab MiLight Binding - Components




OpenHab MiLight Binding Setup Guide


1. First Steps with MiLight Smart Bulbs

You just received the new gadgets, now what? I have very good things to say about its performance, but the documentation…oh boy!

The linking process is fairly short, is it intuitive? Hell no!

I think the setup is much better explained with a video, but before you watch it, there are two things you should know.

  • It is not mentioned anywhere, but if you have a dual-band router with two signals, 2.4Ghz and 5Ghz, be sure to connect you iBox to the first one, the bridge doesn’t get along very well with the latter.
  • Another thing that is rather ignored in the documentation is that you need to select the right remote in order to link your bulbs. If you don’t do it,  the smart lights will not react to the linking process, it is rather frustrating…

So which one is your remote, you might be wondering…

It depends on the type of bulb and it is indicated on the packaging.

OpenHab MiLight Binding - Packaging


Now you know everything there is to know. Enjoy the video courtesy of Easybulb Plus.


Were you able to link the bulbs? If you had any issue post it in the comments or contact me. I will do my best to help.


2. OpenHab MiLight Binding Installation

OpenHab allows you to install bindings through the Paper UI,  that is the easiest way,  unfortunately, this time we are going to have to go manual. Why is that? Paper UI pulls the latest stable version of the binding but that one doesn’t support the MiLigh iBox yet.

If you know how to build packages using Maven you can clone the OpenHab Repository and do it yourself it will take just a few minutes.  I have added the build that I use so you don’t have to do it yourself.

Let’s get started with the installation.

  1. Download the jar for MiLight Binding. Once you download it, you need to rename it to remove the .txt.
  2. Copy the jar file into the addons folder of your Openhab server.
    1. If you installed Openhab using my tutorial, you should have access to the shared folder where you have to drop the file.
    2. If that is not the case, you will have to ssh to your OpenHab server and drop the file under “/usr/share/openhab2/addons”.
  3. Restart your OpenHab server.
OpenHab MiLight Binding – Install Addon


The installation process is complete. it was quick, wasn’t it?


3. OpenHab MiLight Binding Configuration

Once OpenHab is back up and running you can start configuring the binding.

Before I get into details there is something I want you to keep in mind:

In the first step of the tutorial, you linked every one of your smart lights to a zone. That tells you that the iBox doesn’t really talk to the bulb individually but rather to a zone or group of them.  OpenHab doesn’t know which type of MiLight bulbs you have, hence it will show you every item that the iBox can control and let you chose.

How do I know what type of smart bulb is mine? You have to check the packaging again. In my case, I have the RGBW type.

 Add MiLight Bridge Thing through PaperUI

Let’s open the Paper UI and check what do you have in the Inbox. You will see a thing called Bridge along with a MAC address. If you see more than one object called bridge in your inbox check the troubleshooting section at the end of the post.

Click on the tick to the left of the object and OpenHab will automatically add your MiLight Ibox.

OpenHab MiLight Binding - Install iBox Bridge


Add MiLight Smart bulbs Things through PaperUI

Right after you add the Milight iBox, Openhab will through a number of new things into your Inbox. There are five types of Things in the list.

  • All rgbw color: Thing to control all the zones for the RGBW smart bulbs.

  • All rgbww color: Thing to control all the zones for the RGBWW smart bulbs.

  • Color (iBox): This is to control the iBox itself. It has a small colorful led inside.

  • Rgbw Color (Zone N): Thing to control zone N for the RGBW smart bulbs.

  • Rgbww Color (Zone N): Thing to control zone N for the RGBWW smart bulbs.

Which ones do I need to add, you might be wondering…

It depends on the product that you bought. Grab the box of the Smart Bulb and see if your bulbs are RGBWW or RGBW. If you have the latter for example, you will need to add:

  • All rgbw color: Thing to control all the zones for the RGBW smart bulbs.

  • Color (iBox): This is to control the iBox itself. It has a small colorful led on the inside.

  • Rgbw Color (Zone N): Thing to control zone N for the RGBW smart bulbs.

 You can delete the rest of the things from the inbox.

Add all the things providing a meaningful name for them.

 Link an Item to a Channel

I will only do this for one of the zones since the process is exactly the same for all of them.

1. Go to Configuration -> Things

2. You will see a number of Things there. Let’s pick for example the first zone. I named it milight_rgbw_zone1. Very creative…

3. Click on the Thing and Openhab will list all the available channels.

OpenHab MiLight Binding - Channels

Here  you have a few details on how to use  each of them:

  • Nightmode:  A setting to use your bulbs as a nigh light. It sets the bulbs to very low brightness.
  • Whitemode: Returns the smart bulbs to white mode if you had them in a different color.
  • Brightness: Very self-explanatory,  it controls the intensity of bulb.
  • Color: Also self-explanatory, it allows the user to change the color of the light.
  • Animations: Animations are not very reliable with the binding right now.  I will add the details to the tutorial once I get them working.

You might be wondering why some of the channels have a blue icon while the other ones have a grey one. The blue ones can be configured using Paper UI, for the rest you need to deal with configuration files.

Configuration of the channel using PaperUI

Click on one of the channels with the blue icon and provide a name for it. Let’s take brightness for example.

OpenHab MiLight Binding - Link Channel

Configuration of the channel using the configuration files

As you can see, some of the channels can’t be configured automatically using Paper UI, but don’t worry,  the process is not complex.

  1. Open the shared location \\OPENHABIANPI\openHAB-conf\items.
  2. Create a file called default.items with the following content.

You might be wondering where did I get the long string channel=”milight:rgbwLed:F0FE6B1690E4:1:lednightmode“.  They are written under the name of the channel, in the channels list.


OpenHab MiLight Binding - Channels


Test your new MiLight Bulbs!

You can use the Control Dashboard in Paper UI to test your smart lights before you add them to your sitemap.


OpenHab MiLight Binding - Openhab Control Dashboard


There you go, the OpenHab MiLight Binding is configured. Now you can add a few switches and dimmers to your Openhab Sitemap and you are good to go.  I hope you liked the tutorial.


OpenHab MiLight Binding Troubleshooting

1. When I Open my Inbox in the Paper UI I see more than one Milight Bridge.

Don’t worry, this is very common. Sometimes OpenHab MiLight Binding confuses other devices in the network with you Milight bridge.

OpenHab MiLight Binding - Troubleshooting

What should you do about this?

Well, one of the devices is definitely an impostor. Which one though?

One way to know is by looking at the MAC address in the name, but if you don’t know the MAC address of your MiLight iBox just add all of them.

Go to Configuration->Things

You will see several MiLight Ibox, you just need to remove all of those that appear as Offline. 

This Post Has 7 Comments

  1. Heya exceptional blog! Does running a blog such as this take
    a great deal of work? I’ve virtually no knowledge of programming however I had been hoping to start
    my own blog in the near future. Anyway, should you have any recommendations or tips for new blog owners please
    share. I know this is off subject but I just wanted
    to ask. Thanks!

  2. jimmy

    Hi everything works perfectly, only I can’t click on any channel names. The cursor just wants to select text. I could use the config files like i have done in a previous setup but it would be so much easyer to use paper UI. any ideas?

  3. David C.

    Hi Jimmy,
    I am actually moving to files now, I find it more convenient. Having said that, I have been using it so far through the PaperUI. Have you used the jar in the post or you downloaded it from the repository?

  4. LEiPo

    Hi there, great article! I have one question:
    When i create a manual Bridge (thing) the properties [host , bridge id] won’t apply.. any ideas?

  5. David C.

    Hi Leipo, Sorry I missed this comment. What version are you on?

    There are quite a few changes on the latest upgrade.

  6. Mark

    Hi David,

    I have one simple question. If I use the wifi ibox to control the lights via milight app wihtout any remote control, will it work with this method or the actual remote control is required with openhab?

    Many Thanks

  7. David C.

    Hi Mark,

    I missed this comment, sorry about that. You don’t need the remote if you have the iBox. To my knowledge the remote is only for RF control so as long as you are not interested on that you are good to go.

Leave a Reply