In the past we have talked about how you can control the MiLight / LimitlessLED / EasyBulb wireless LED bulbs using a Raspberry Pi and a command line utility. The details can be found in this article. We have also examined the very nice free home automation software named Domoticz. Now it is time to put the pieces together and take a look at how we can configure Domoticz to control the Milight lights directly and making them part of an integrated home automation system.
About the Milight / LimitlessLED / EasyBulb lights
The only weak side of the Milight lights is that they are stateless. And by that I don’t mean that they forget their state when turned off or when power is lost. They do remember their state (on/off, color, brightness, etc.). But you cannot query their state. It is not possible for a controller to ask the lights for information about their on/off state, about their brightness level or about the current color. This makes some more advanced home automation tasks difficult (if not impossible) and it is the only thing that I can bring up as a negative about the Milight bulbs and LED strip controllers.
Configuring Milight / LimitlessLED / EasyBulb in Domoticz
Let’s see how we can extend the capabilities of Domoticz to make it able to control Milight devices. Luckily Domoticz supports the Milight hardware out of the box, so we can simply open up the web interface of Domoticz, go to Setup -> Hardware and add a new hardware controller of type “Limitless/AppLamp/Mi Light with LAN/WiFi interface“:
The Remote Address field should contain the IP address (or domain name) which can be used to access your network from the outside. This is needed if you wish to be able to control your lights within Domoticz from outside networks. The Port field should contain the port number used to access the Milight wireless bridge (8899 by default). No need to set a Data Timeout.
The next step is to configure the newly added Milight interface by setting the type of lights that you wish to use. Click on the “Set Mode” button next to the Milight hardware (in the list of hardware added to Domoticz (Setup -> Hardware)) and choose the type of your bulbs or LED strips: RGBW, RGB or White.
Now that the hardware interface is set up, it’s time to activate the Milight switches. Go to Settings -> Devices and hit the “Unused” button. There you should see 5 new inactive devices corresponding to the master switch (which controls all 4 Milight zones) and to the 4 individual Milights zones:
Activate each of these 5 new devices by hitting the green arrow icon at the right side of their row. You can give them descriptive names like “All lights”, “Living Room Lights”, “Kitchen Lights”, etc.
If everything went well, you should be able to see your light switches in the Switches menu:
You may set a light bulb icon for them (if they show up with a different icon) by hitting the “Edit” button for each of these switches. You can also add them to your Dashboard by clicking the star icon on each switch device.
You should now be able to control your MiLight / LimitlessLED / EasyBulb lights from within Domoticz. Enjoy!