Skip to content

Domoticz blocks: Block definition and block parameters

Lokonli edited this page Mar 9, 2019 · 1 revision

Work in progress

A block can be configured via parameters as follows:

block[IDX] = {
parameter1: value1,
parameter2: value2,
...
}

The following table summarizes all available parameters.

Parameter Value Example Description
width Number 1-12 4 Defines the width of the block
title String 'living room' Defines alternative name of the device or block. Empty is the name from Domoticz
icon String 'far fa-eye' Defines alternative icon of the device instead of the default, choose from: https://fontawesome.com/v5.7.2/icons/
image String 'bulb_off.png' If you want to show an image instead of an icon, place image in img/ folder
switch Boolean true If you want the title and data to be switched
hide_data Boolean true If you don't want the data to be shown
last_update Boolean true If you want to show the last update specific for this block
hide_stop Boolean true If you want to hide stop button, for example from the blinds switch
playsound String 'sounds/ping.mp3' Play a sound when a device changes
playsoundOn String 'sounds/ping.mp3' Play a sound when a device changes to On
playsoundOff String 'sounds/ping.mp3' Play a sound when a device changes to Off
speak String 'Device status has changed' Speaks text when a device changes
speakOn String 'Device is on' Speaks text when a device changes to on
speakOff String 'Device is off' Speaks text when a device changes to off
protected Boolean true Protect switching manually in Dashticz, not in Domoticz
gotoslide Number 2 Goto screen when a device changes
gotoslideOn Number 2 Goto screen when a device changes to on
gotoslideOff Number 2 Goto screen when a device changes to off
openpopup Popup Object See below Open a popup when a device changes
openpopupOn Popup Object See below Open a popup when a device changes to on
openpopupOff Popup Object See below Open a popup when a device changes to off

Example of an Popup object

blocks[IDX] {
    openpopup : {
    url: 'http://www.urltocamera.nl/image.jpg', // url which will be opened
    auto_close: 5                               // Autoclose popup after x seconds
    }
}
Clone this wiki locally