Automation: Difference between revisions
m →Scripts |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 45: | Line 45: | ||
==Events system scripts== | ==Events system scripts== | ||
Domoticz allows you to write scripts in the Web-Interface just go to the [[Events|Event system]]: | Domoticz allows you to write scripts in the Web-Interface just go to the e [[Events|Event system]]: | ||
'''Setup -> More Options -> Events''' in this view you see a "+" sign in a tab to choose what script you want to write. | '''Setup -> More Options -> Events''' in this view you see a "+" sign in a tab to choose what script you want to write. | ||
| Line 51: | Line 51: | ||
;Script Method | ;Script Method | ||
:You have a choice of [[Blockly]], [[Python Events|Python]], [[LUA commands|LUA]] or [[DzVents: next generation Lua scripting|dzVents]]. Blockly is the easiest way to start. You'll get more power with dzVents but Blockly is a great place to start! | :You have a choice of [[Blockly]], [[Python Events|Python]], [[LUA commands|LUA]] or [[DzVents: next generation Lua scripting|dzVents]]. Blockly is the easiest way to start. You'll get more power with dzVents but Blockly is a great place to start! | ||
==== DzVents automation wizard ==== | |||
In 2026.2 the [[DzVents automation wizard]] has been introduced which makes it easier to create the dzvents scripts, no code required. | |||
;[[Events|For more info on the event sytem check wifi page Event system]] | |||
;[[File:Events_user_interface.png|none|frame|[[File:Blockly example.png|alt=|left]]]] | ;[[File:Events_user_interface.png|none|frame|[[File:Blockly example.png|alt=|left]]]] | ||
Latest revision as of 07:30, 10 July 2026
New to Domoticz? Have a look at the Getting started page to connect your first devices, services or gateways.
Introduction
This page gives an overview of different methods of automation for devices to act on input from sensors or switches.
Scenes and Groups
What is the difference between Scenes and Groups:
- A "Group" is a set you can turn on or off together. Like a big extension cord with a power switch. They all go on or off. But every device can switch on with different characteristics like dim level, color etc.
- A "Scene" is a predefined setup of lights and devices. So you can setup 1 light to be on, another to off. Have the ledstrip/milight set to a nice blue color, close your curtains, switch on your radio on station Xyz. That's also why you can't switch a scene off, but only to on. You will have to make an extra scene (or group) to switch the devices off.
So for example a group is used to turn all lights off when you leave the house.
And a scene is used when you have a nice setup of lightning you want when you are going to watch a movie.
For more instructions go to page Managing devices - Scenes and Groups
Timers
Each switch, group, scene or thermostat device can be activated by timers to change the status or for thermostats, the setpoint temperature.
There can be more timers per switch/thermostat so you can make a complete schedule. They also make part of a timer plan so you can set up for example a holiday schedule for your lights.
The timer options are partly dependent of the switch type and Timer type. There are lots of timer types like "x minutes after sunset", monthly, even day numbers, daily at time xx:xx etc.
See for more instructions page Managing Devices - Edit Device Timers
Notifications
There are a great selection of notification types so it's possible to do some interesting things with this but chances are any of those interesting things should go under the action scripts.
This option is available on the Switches screen when you select a switch to work with.
See also the Application Settings, section Notifications for general setup of notifications and page Managing Devices - Edit Notifications for creating device notifications.
Scripts
For more complex automation scripts can be used.
You have a choice of Blockly, Python, LUA or dzVents. Blockly is the easiest way to start. You'll get more power with dzVents.
Please see the scripting details on how to use either of these scripting methods.
Devices Action Scripts

Devices (Switches) have an On Action and Off Action option that allows you to run a script either via a URL or via the script folder. This will be discussed in the script page.
To get to these you need to edit a switch.
See also page Managing Devices
Events system scripts
Domoticz allows you to write scripts in the Web-Interface just go to the e Event system:
Setup -> More Options -> Events in this view you see a "+" sign in a tab to choose what script you want to write.
- Script Method
- You have a choice of Blockly, Python, LUA or dzVents. Blockly is the easiest way to start. You'll get more power with dzVents but Blockly is a great place to start!
DzVents automation wizard
In 2026.2 the DzVents automation wizard has been introduced which makes it easier to create the dzvents scripts, no code required.
Lua, Python and DzVents File System Based
For technical users that want to write complicated scripts and include additional Lua, DzVents or Python modules and scripts, Domoticz also supports file-based scripts. These are not included in the Domoticz standard Backup & Restore functions and are not versioned so this needs to be done manually. For more info check page Scripting in Domoticz
Continue to the next page of the introduction

