User Tools

  • (equal to forum credentials)

Site Tools


actions

Actions

Switch

Version
Available since pilight v6.0

Description
Changes the state of a switch, relay or dimmer.

Options

pilight v6.0

namerequiredmultiple valuesdescription
DEVICExxDevice(s) to change state of
TOx New state

pilight v7.0

namerequiredmultiple valuesdescription
FOR Determine how long this new state lasts before we change back to the previous state
AFTER After how long do we want the new state to be set

FOR and AFTER units are: - MILLISECOND - SECOND - MINUTE - HOUR - DAY

Examples

pilight v6.0

IF 1 == 1 THEN switch DEVICE light TO on
IF 1 == 1 THEN switch DEVICE mainlight AND bookshelve AND hall TO on

pilight v7.0

IF 1 == 1 THEN switch DEVICE light TO on FOR 10 MINUTE
IF 1 == 1 THEN switch DEVICE light TO on AFTER 30 MILLISECOND
IF 1 == 1 THEN switch DEVICE light TO off FOR 10 SECOND AFTER 30 MINUTE

Toggle

Version
Available since pilight v6.0

Description
Toggles a device between state X and state Y. This action is especially made for 'one-shot' devices such as a remote control button where a normal separate 'switch-on' and separate 'switch-off' rule doesn't apply. This action will check what the current state of a device is, and will change it to the non-current state.

Options

namerequiredmultiple valuesdescription
DEVICExxDevice(s) to change state of
BETWEENx State 1
ANDx State 2

Examples

IF 1 == 1 THEN toggle DEVICE television BETWEEN on AND off

Program

Version

Description
Start and stop a program.

Options pilight v6.0

namerequiredmultiple valuesdescription
DEVICExxProgram to change the state
TOx Running / stopped

Examples

pilight v6.0

IF 1 == 1 THEN switch DEVICE xbmcProgram TO running
IF 1 == 1 THEN switch DEVICE xbmcProgram TO stopped

Dim

Version
Available since pilight v6.0

Description
Dims a device to a new dimlevel or start a sequence from one dimlevel to another.

Options

pilight v6.0

namerequiredmultiple valuesdescription
DEVICExxDevice(s) to change state of
TOx New dimlevel

pilight v7.0

namerequiredmultiple valuesdescription
FOR Determine how long this new dimlevel lasts before we change back to the previous dimlevel + state
AFTER After how long do we want the new state to be set
IN To be combined with FROM. In what time do we want to change the dimlevel FROM x TO y
FROM To be combined with IN. From what dimlevel do we want to start a sequence to the target dimlevel

FOR, AFTER, and IN units are: - MILLISECOND - SECOND - MINUTE - HOUR - DAY

Examples

pilight v6.0

IF 1 == 1 THEN dim DEVICE mainlight TO 15
IF 1 == 1 THEN dim DEVICE mainlight AND bookshelve AND hall TO 10

pilight v7.0

IF 1 == 1 THEN dim DEVICE mainlight TO 15 FOR 10 MINUTE
IF 1 == 1 THEN dim DEVICE mainlight TO 15 AFTER 30 SECOND
IF 1 == 1 THEN dim DEVICE mainlight TO 15 AFTER 30 SECOND FOR 10 MINUTE
IF 1 == 1 THEN dim DEVICE mainlight TO 15 FROM 0 IN 45 MINUTE
IF 1 == 1 THEN dim DEVICE mainlight TO 15 FROM 0 IN 45 MINUTE FOR 15 MINUTE AFTER 5 MINUTE

Pushover

Version
Available since pilight v6.0

Description
Send a message to your mobile phone with the pushover API

Options

namerequiredmultiple valuesdescription
TITLEx Self-explanatory
MESSAGEx Self-explanatory
TOKENx Unique user account token from the pushover website
USERx Unique username from the pushover website

Examples

IF 1 == 1 THEN pushover TITLE Doorbell rang MESSAGE Doorbell rang TOKEN abcd123abc USER pilight

Pushbullet

Version
Available since in the pilight v7.0

Description
Send a message to your mobile phone with the pushbullet API

Options

namerequiredmultiple valuesdescription
TITLEx Self-explanatory
BODYx Self-explanatory
TOKENx Unique user account token from the pushbullet
TYPEx Message type

Examples

IF 1 == 1 THEN pushbullet TITLE Doorbell rang BODY Doorbell rang TOKEN abcd123abc TYPE note

Sendmail

Version
Available since in the pilight v7.0

Description
Send a message to any e-mail address

Options

namerequiredmultiple valuesdescription
TOx Self-explanatory
SUBJECTx Self-explanatory
MESSAGEx Self-explanatory

The Sendmail action requires some additional settings in the config like this:

       "settings": {
                ................
                "smtp-sender": "sender@domain.com",
                "smtp-host": "smtp.smtphost.com",
                "smtp-port": 465,
                "smtp-user": "smtpuser@domain.com",
                "smtp-password": "password"
        },

Explanation of the settings

namerequireddescription
smtp-senderxAddress the recipient will see as the address of the sender (from)
smtp-hostxValid smtp host address. Some examples: smtp.gmail.com, securesmtp.t-online.de, smtp.mail.yahoo.com
smtp-portxValid smtp-port number: 25 (unecrypted), 465 (SSL) or 587 (STARTTLS)
smtp-userxyour smtp username in the form of an e-mail address
smtp-passwordxYour smtp password

Examples

IF 1 == 1 THEN sendmail SUBJECT Doorbell rang MESSAGE Doorbell rang TO someone@somewhere.com

Label

Version
Available since the pilight v7.0

Description
Changes the text and color of a generic label device.

Options

pilight v6.0

namerequiredmultiple valuesdescription
DEVICExxDevice(s) to change label of
TOx New text
COLORx New color

pilight v7.0

namerequiredmultiple valuesdescription
FOR Determine how long this new label lasts before we change back to the previous label
AFTER After how long do we want the new label to be set

FOR and AFTER units are: - MILLISECOND - SECOND - MINUTE - HOUR - DAY

Examples

pilight v7.0

IF 1 == 1 THEN label DEVICE tempLabel TO on
IF 1 == 1 THEN label DEVICE tempLabel AND humiLabel TO No information
IF 1 == 1 THEN label DEVICE tempLabel TO 23.5 FOR 10 SECOND
IF 1 == 1 THEN label DEVICE tempLabel TO Bell rang AFTER 30 SECOND
IF 1 == 1 THEN label DEVICE tempLabel TO None FOR 10 MINUTE AFTER 30 SECOND

actions.txt · Last modified: 2016/06/15 21:23 by woutput