From Domoticz
Jump to: navigation, search


Domoticz provides a wide range of capabilities in controlling your devices, but when further integration is needed, scripting opens up a tremendous degree of control for advanced users.

This page is a place to find & share useful scripts to enhance the capabilities of your Domoticz system, including specific details related to specific scripting languages.

For an introduction and overview/tutorial specific to Domoticz, see this wiki page: Scripting in Domoticz.

Scripts and logic to do that can be found under the automation part of this Wiki.

Adding your script to this list

We highly encourage you to add your working scripts to our Wiki! You can login the Wiki with the same name and password as the forum. Remember your brilliant script or guide on a forum page is difficult to find even with a good search engine.

Please follow the page naming convention,and name your script wiki page in this format: script language - short description i.e. "Lua - Automatic Garage Door Opening" / "Bash - Switch Lights Off When House Empty"

By placing double square brackets around the title the Wiki will automatically turn it into a link to a new empty wiki page.


On your new script page please include these sections if relevant:

  1. Purpose
  2. Dependencies - hardware / software / operating system
  3. Domoticz Setup - switches, variables, version
  4. Installation instructions
  5. Script with comments
  6. Example of use (if relevant) i.e. output files / screen displays
  7. Link to forum posts

You can use the tag <syntaxhighlight lang="python"> CODE_HERE </syntaxhighlight> for colored highlighting of your code.
A list of all of the available languages can be found here:


To make it easier for others to find your scripts use the following category conventions.

Pick the right items from the following trees, if you choose a lower item in the tree, like "TV" also include the categories higher up in the tree. And add them to the end of your Wiki page.

For example is you create a Wiki page on TV's thus adding the "TV" category, you also add the higher categories "Media" and "Hardware" .


[[Category:Domoticz]] (pick one, or more)







Operating Systems (leave empty if all)

      [[Category:Raspberry Pi]]

This list is incomplete! Please add your new categories here! And add missing categories to Wiki pages when you visit and notice them missing, it will help a lot for new users to navigate through the mountain of information hidden in this Wik!


For example the Philips HUE page has as category syntax at the end of the Wiki page:



Batch Scripts (MSWindows)

Use the Edit button of a switch on the Switches tab. Use in the "On Action" or "Off Action" field: script://Domoticz\scripts\soundplay.bat to execute a batch file in the directory Domoticz/scripts on the same disk as the Domoticz installation. To play tada.wav the soundplay.bat file can contain: c:\PROGRA~1\VIDEOLAN\VLC\vlc.exe --play-and-exit %WINDIR%\media\tada.wav (assumed VLC is installed).

Blockly Scripts


Lua Scripts





Bash Scripts



Perl Scripts


  • Tutorial on Devices, Ping, Sqlite3, Xively,, GPIO and Arduino


PHP Scripts



Python scripts