Introduction: Shelly - Domoticz – Aqara - Google Home

At my home I am using Domoticz to create a smart home. Domoticz is a Home Automation System that lets you monitor and configure various devices like: Lights, Switches, various sensors/meters like Temperature, Rain, Wind, UV, Electra, Gas, Water and much more. Notifications/Alerts can be sent to any mobile device. For more information see https://www.domoticz.com/

In my hallway by the front door there is a light which I want to control by Domoticz but also still be able to use the regular switch on the wall. For that I chose a Shelly 1. The smallest, smartest & the most powerful Wi-Fi switch for your automation solution. For more information see https://shelly.cloud/shelly1-open-source/

The light must also be controlled by the front door. So that in the evening when the door gets open the light in the hallway will go on. Also, I want to turn on/off the light use voice control by Google home.

I will describe the steps I took to get this done.

Step 1: Shelly

Behind the switch in the hallway I installed the Shelly 1. By doing this I can still use the regular switch to turn on/off the light.

After that I installed the Shelly app on my Phone and connected the Shelly to my Wi-Fi. In the app as a button type I selected Edge Switch. In this case I can use the regular switch and also Domoticz or the Shelly app to turn on/off the light.

I did not connect the Shelly to the Cloud because I want the Shelly to connect to my MQTT server in Domoticz. You can do that by connecting to the Shelly in Internet Explorer by IP address. Under Advanced – Developer Settings you can fill in your settings.

Step 2: Aqara - Zigbee2MQTT

At the front door I installed the Xiaomi Aqara Window Door Sensor. This little device uses Zigbee as the wireless protocol and with the ZigBee CC2531 USB stick/dongle attached at my Raspberry, Domoticz can ‘speak’ Zigbee.

In Domoticz I installed these 2 plugins so that Domoticz can speak and understand Zigbee.

- https://github.com/Koenkk/zigbee2mqtt Allows you to use your Zigbee devices without the vendors bridge or gateway. It bridges events and allows you to control your Zigbee devices via MQTT. In this way you can integrate your Zigbee devices with whatever smart home infrastructure you are using.

- https://github.com/stas-demydiuk/domoticz-zigbee2... Python plugin for Domoticz to add integration with zigbee2mqtt project.

For Domoticz to use the Shelly I had to install Shelly_MQTT. Domoticz Python plugin for managing Shelly MQTT devices. https://github.com/enesbcs/Shelly_MQTT. Now I can see and control the Shelly.

Step 3: Domoticz

In Domoticz you can create Events. I created this event. In Dutch but I will translate 😊

If front door is open and it is dark and the light is the hall is off, turn on the light in the hall for 5 minutes.

Else if the door is closed and it is dark and the light is the hall is on, turn off the light after 55 seconds.

In this case when someone is at the door in the evening and I open the door the light in the hall will go on for 5 minutes. Also, when I come home in the dark and I open the door the light will go on and go off after almost 1 minute.

Step 4: Google Home

Still one thing I wanted to accomplish and that was turning the light on/off by voice. For that I use Controlicz. Controlicz is the gateway between Google Home and Amazon's Alexa services and Domoticz Home Automation. See https://www.controlicz.com/

These were the steps I took so that I can turn on/off the light by Voice, App, Domoticz and still use the regular switch. For the length off this article I did not describe how I installed and configured Domoticz and the plugins but I put in the URL’s so that you can find out how it is done.