Automation - Domoticz (2024)

New to Domoticz? Have a look at the Getting started page to connect your first devices, services or gateways.

Contents

  • 1 Introduction
  • 2 Scenes and Groups
  • 3 Timers
  • 4 Notifications
  • 5 Scripts
    • 5.1 Devices Action Scripts
    • 5.2 Events system scripts
    • 5.3 Lua, Python and DzVents File System Based
  • 6 Continue to the next page of the introduction

This page gives an overview of different methods of automation for devices to act on input from sensors or switches.

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

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

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.

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

Automation - Domoticz (1)

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 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!

Automation - Domoticz (2)

Automation - Domoticz (3)

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

Scripts

Automation - Domoticz (2024)
Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 5512

Rating: 5 / 5 (80 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.