Skip to main content

Restarting Home Automation

Many years ago, I attempted to embark on home automation. Those were the days of X-10 and honestly, a lot of effort to make simple things work. Needless to say, I didn't get very far and gave up pretty much early into the game to wait for more sustainable standards.

This year, I decided to go home automation shopping and picked up a bunch of the most popular / stable products off the shelf and add them to my semi smart home.

The whole setup now consists of

1. Alexa Echo and Echo Dot
2. Philips Hue Lights
3. Apple TV
4. Sonos (Playbar and sub (for TV), Play1 and a Play5)
5. Dlink NAS
6. Raspberry Pi
7. Bluetooth audio receiver
8. Fibaro Home Center Lite (HCL) Z-Wave Bridge and various Z-wave devices including
(i) Power Plug Switches with/without power metering
(ii) Door Sensor
(ii) Motion Sensor
9. Computer
10. Mobile phones

I also managed to hook up the old CCTV unit to the Fibaro HCL using polled extraction of JPEG.

After hooking it all up, the last couple of weeks have been really interesting with lights coming on at odd and devices refusing to turn on by Alexa. It does take a while to determine patterns to program behaviors accordingly.

As there was a lot of integration work that was done to have everything work together, I decided to start posting again. Stay tuned for home automation use cases and how to get it all working together.


Popular posts from this blog

Multiple Broadlink RM mini 3 integration using MQTT

Broadlink now has quite a lot of integration options almost out of the box. If you enable Broadlink IHC, you can directly link it to Alexa by giving the device a unique name.

There is a homebridge plug in for homekit integration but I haven't tried or tested this.

I wanted to put the device in domoticz so I can have more control over what can trigger my broadlink. I decided to use broadlink-mqtt for this, which is a fairly easy method to trigger from any source.

Setup Instructions for broadlink-mqtt

1. git clone

2. vi /home/pi/broadlink-mqtt/mqtt.conf

3. Update the mqtt.conf file with the device type set as multiple_lookup

device_type = 'multiple_lookup'
mqtt_multiple_subprefix_format = '{type}_{mac_nic}/'
4. Start the python script and check that it started and detected all the RM devices.
Check the log file to see what the IP / MAC addresses are. DEBUG Connected to RM2 Broadlink device at …

Fibaro HCL Virtual Device Slider

How to setup Fibaro home center lite (HCL) slider for virtual devices.

As the Fibaro HCL does not support LUA. The question was how to update the number value of the slider to send to the HTTP string. Thanks to this site which is a really good reference

The 2 use cases here are;

Sonos HTTP API Volume

To allow for volume control for all Sonos devices, add a virtual device with the IP address for SONOS HTTP API and specify the default port to 5005. Create Slider and put the following text into the string.

GET /volume/_sliderValue_ HTTP/1.10x0D0x0A0x0D0x0A

Domotiz Virtual Devices

GET /json.htm?type=command&param=switchlight&idx=XX&switchcmd=Set%20Level&level=_sliderValue_ HTTP/1.10x0D0x0A0x0D0x0A

Replace XX with the device ID.

Restart Fibaro HCL when it stops working automatically

It seems that the Fibaro HCL seems to hang every now and then. Instead of trying to restart it regularly, which doesn't really work, as it's almost impossible to predict when this will happen.

This method checks that the HCL is actually running and in the event it stops working, trigger a script that will restart it.

1. Get a non Fibaro controlled power plug and scripts to control it.

I used a wifi smart plug, TP-link HS100 and downloaded the scripts from

2. Create a bash script to restart the Fibaro, e.g.



$scripts/ -t $ip_addr -c off
sleep 10
$scripts/ -t $ip_addr -c on

3. Create a test global variable in the Fibaro HCL

Go to the variables panel and create a test variable, e.g. Test

4. Add a cron entry to test that the Fibaro API is still working and restart if it's not.

The cron script is scheduled ev…