Home PageMilight ha bridge control

Milight ha bridge control

The ha bridge software emulates a Philips hue bridge. This means you can use the functionality built in to the amazon echo and its integration with the philips hue.
This is the location of the echo bridge software
You can install the software onto the raspberry pi as follows.
Create a directory echobridge for example and install the software as follows.
pi@raspberrypi:~/echobridge $ wget https://github.com/bwssytems/ha-bridge/releases/download/v1.4.2/ha-bridge-1.4.2.jar
You need to make the directory read write so that you can save the database file later.
Turning on the software can be done when you know the IP of the raspberry.
pi@raspberrypi:~/echobridge $ java -jar ha-bridge-1.4.2.jar -upnp.config.address=
Then you need to edit the configuration. This is done by going to with your browser.

Logitech Squeezebox

Logitech squeezebox

This device is a network music player which can be controlled in a variety of ways.
I already made some attempts to control it through the web here.
But what would becooler than to be able to control it through the amazon echo and have it fully voice controlled.
So how to make this happen. Well first step is to give the device a name eg a radio veronica or something.
Select Vera Device from the Map Type.
Http Verb is GET and Content Type is text/plain.
Then you can fill in the On, Off and Dim URL.
Some suggestions.
Turns on the favourite station number four which happens to be radio veronica.
Stops the squeezebox player
DIM URL :${intensity.percent}
This sets the volume of the current radio station to x percent. I have this DIM command on every radio station that i have so that you can set the volume by using the device.
Alexa, Set radio veronica to 50 percent.
The ${intensity.percent} comes from the philips hue bridge.
Of course you need first to discover the new devices by saying Alexa, discover devices.
Once discovered you can say the following.
You can say the following things.
Alexa, Set radio veronica to 40 percent
Alexa, turn on radio veronica
Alexa, turn off radio veronica
To have the amazon echo change the station simply create another device with the same name and change the index number to match that station.
The IP of the squeezebox needs to be in the same network as the raspberry pi running tha ha bridge software.

Milight bulbs

For Limitless LED its the same procedure but here you need the UDP commands.
ON URL: udp://
OFF URL: udp://
The DIM command can not work using the standard Philips hue interface because the milight bulbs require multiple commands to be sent one after another.
You can read about this on the Milight PHP control page. Below you can see some of these commands.

set to white max brightness

Dim to 50%

Change colour to red
$milight->rgbwSetColorHexString(‘FF1254’); // or #FF1254

Increase brightness to max


You can however use PHP to execute these two commands and direct the ha bridge to the PHP page.
So i set the ON URL to eg
The milightblue.php contains the code to turn the milight to blue. This is simply the code below.
require ‘Milight.php’;
$milight = new Milight(‘’);
$milight->rgbwSetColorHexString(‘0000FF’); // or #FF1254
Create this file in the same network as the raspberry pi running the ha bridge software.

In the same way it is possible to set the brightness of the milight bulb.${intensity.percent}
The relevant php file is.
//to keep it simple using require
require ‘Milight.php’;
$milight = new Milight(‘’);
// The value of the variable name is found
echo “<h1>Hello from Milight” . “</h1>”;
echo nl2br (“Set milight brightness to “. $var1 . “%\n”);

Finally i want to use the philips hue emulator so simulate a Philips Hue bridge and allow the milight to be controlled as a Philips Hue bulb with the Amazon echo. I use the following emulator to control my squeezebox network music player and this works exactly the way i would like to control the milight bulb. You are able to pass a parameter to the device using ${intensity.byte}, ${intensity.percent} or ${intensity.math}.
The commands to the Amazon echo are then.

To do this… Say this…
Discover “Alexa, discover my devices.”
Turn On “Alexa, turn on the kitchen light.”
Turn Off “Alexa, turn off the kitchen light.”
Brighten “Alexa, brighten the kitchen light.”
Dim “Alexa, dim the kitchen light.”
Dim “Alexa, Dim the lights to 40%.”
Set “Alexa, set the kitchen light to 50%.”
Set “Alexa, Set brightness to 60%.”