Using Events in Domoticz

In previous post we learned how to group two devices (post can be found here). In this post we will use the Events interface in Domoticz to tell a switch to act on a certain event that appears. We make sure that we have ”ungrouped” our Multisensor and Z-Wave power plug from previous post, since we are going to use events instead in this post. You ungroup in the same ”Groups & Network” view showed in previous post. In this post we will use Events in Domoticz to control a Z-Wave power switch when an Aeon Labs Multisensor is triggered.

Equipment used in this post to control using Events in Domoticz

We will be using the same equipment as previous post:

Opening the Events interface in Domoticz

You find the Events editor by selecting ”More Options” in the ”Setup” menu and the select ”Events”.


In the Events editor. You find a list of categories on the left. You can see this as the toolbox of blocks you will be using to control and manage your events. Click on the first entry in the list ”Control”.


You see two blocks that looks like pieces in a puzzle, which they in fact are. We will be combining puzzle pieces in order to control our Z-Wave power plug when our Aeon Labs Multisensor is triggered. We start by dragging the first ”If/Do” block piece to the white work space.


This ”If/Do” block will allow us to ”do” something ”if” something else happens. If you’re a programmer, this is simple for you. If not, you will understand when you go through the next steps. Since we want to DO turn on our Z-Wave power plug IF our motion sensor is triggered, we go to ”Devices” and select ”Switches”. Here we find our motion sensor.


We click on ”Our motion sensor” in order for it to appear next to the ”If/Do” block that we place on the work space.


We do the same thing with our Z-Wave power plug.


Now, to control the logic so that the power plugs turns on when the motion sensor is triggered we need some additional logic blocks. Go to ”Logic”.


Select the first green block with the ”=” sign so it appears on the work space.


Go back to the ”Logic” category and select the green box that says ”On”. We now see the following blocks.


Since we want to DO something IF our motion sensor turns on, we attach the blocks to one another like this:


We almost done, but the power plug block is still not connected. We need a ”Set” block and an ”On” block to trigger the power plug.  Select these from the ”Logic” category as you did with the previous blocks.


We connect these blocks to the ”Do” part.


The logic won’t just work yet. We need to save it.


On the right side in Domoticz, enter a name of your choice, tic the ”Event active” box, and click ”Save”. If you now trigger the motion sensor, the Z-Wave power plug turns on. Yes! If you want the power plug to turn off when the motion sensor turns off, you can build the following logic. Don’t forget to save it for it to work.


The Aeon Labs motion sensor has a default time out set to 4 minutes.

In upcoming posts we will go through how to make more advanced logic using the Events editor in Domoticz.