User Tools

Site Tools


actions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
actions [2015/03/20 23:52]
curlymo created
actions [2016/06/15 19:23] (current)
woutput typo
Line 7: Line 7:
  
 **Description**\\ **Description**\\
-Changes the state of a switch, relay of dimmer.+Changes the state of a switch, relay or dimmer.
  
 **Options** **Options**
Line 16: Line 16:
 |TO|x| |New state| |TO|x| |New state|
  
-pilight ​nightly+pilight ​v7.0
 ^name^required^multiple values^description^ ^name^required^multiple values^description^
 |FOR| | |Determine how long this new state lasts before we change back to the previous state| |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| |AFTER| | |After how long do we want the new state to be set|
 +
 +FOR and AFTER units are:
 +- MILLISECOND
 +- SECOND
 +- MINUTE
 +- HOUR
 +- DAY
  
 **Examples** **Examples**
Line 29: Line 36:
 </​code>​ </​code>​
  
-pilight ​nightly+pilight ​v7.0
 <​code>​ <​code>​
-IF 1 == 1 THEN switch DEVICE light TO on FOR 10 +IF 1 == 1 THEN switch DEVICE light TO on FOR 10 MINUTE 
-IF 1 == 1 THEN switch DEVICE light TO on AFTER 30 +IF 1 == 1 THEN switch DEVICE light TO on AFTER 30 MILLISECOND 
-IF 1 == 1 THEN switch DEVICE light TO off FOR 10 AFTER 30+IF 1 == 1 THEN switch DEVICE light TO off FOR 10 SECOND ​AFTER 30 MINUTE 
 +</​code>​ 
 + 
 +==== 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** 
 +^name^required^multiple values^description^ 
 +|DEVICE|x|x|Device(s) to change state of| 
 +|BETWEEN|x| |State 1| 
 +|AND|x| |State 2| 
 + 
 +**Examples** 
 +<​code>​ 
 +IF 1 == 1 THEN toggle DEVICE television BETWEEN on AND off 
 +</​code>​ 
 + 
 +==== Program ==== 
 +**Version**\\ 
 + 
 +**Description**\\ 
 +Start and stop a program. 
 + 
 +**Options** 
 +pilight v6.0 
 +^name^required^multiple values^description^ 
 +|DEVICE|x|x|Program to change the state| 
 +|TO|x| |Running / stopped| 
 + 
 +**Examples** 
 + 
 +pilight v6.0 
 +<​code>​ 
 +IF 1 == 1 THEN switch DEVICE xbmcProgram TO running 
 +IF 1 == 1 THEN switch DEVICE xbmcProgram TO stopped
 </​code>​ </​code>​
  
Line 51: Line 97:
 |TO|x| |New dimlevel| |TO|x| |New dimlevel|
  
-pilight ​nightly+pilight ​v7.0
 ^name^required^multiple values^description^ ^name^required^multiple values^description^
 |FOR| | |Determine how long this new dimlevel lasts before we change back to the previous dimlevel + state| |FOR| | |Determine how long this new dimlevel lasts before we change back to the previous dimlevel + state|
Line 57: Line 103:
 |IN| | |To be combined with FROM. In what time do we want to change the dimlevel FROM x TO y| |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| |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** **Examples**
Line 66: Line 119:
 </​code>​ </​code>​
  
-pilight ​nightly+pilight ​v7.0
 <​code>​ <​code>​
-IF 1 == 1 THEN dim DEVICE mainlight TO 15 FOR 10 +IF 1 == 1 THEN dim DEVICE mainlight TO 15 FOR 10 MINUTE 
-IF 1 == 1 THEN dim DEVICE mainlight TO 15 AFTER 30 +IF 1 == 1 THEN dim DEVICE mainlight TO 15 AFTER 30 SECOND 
-IF 1 == 1 THEN dim DEVICE mainlight TO 15 AFTER 30 FOR 10 +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 2700 +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 2700 FOR 60 AFTER 10+IF 1 == 1 THEN dim DEVICE mainlight TO 15 FROM 0 IN 45 MINUTE ​FOR 15 MINUTE ​AFTER 5 MINUTE
 </​code>​ </​code>​
  
Line 92: Line 145:
 **Examples** **Examples**
 <​code>​ <​code>​
-IF 1 == 1 THEN pushover TITLE \"Doorbell rang\" ​MESSAGE ​\"Doorbell rang\" ​TOKEN abcd123abc USER pilight+IF 1 == 1 THEN pushover TITLE Doorbell rang MESSAGE Doorbell rang TOKEN abcd123abc USER pilight
 </​code>​ </​code>​
  
  
-==== Pushover ​====+==== Pushbullet ​====
  
 **Version**\\ **Version**\\
-Available since in the pilight ​nightly+Available since in the pilight ​v7.0
  
 **Description**\\ **Description**\\
Line 113: Line 166:
 **Examples** **Examples**
 <​code>​ <​code>​
-IF 1 == 1 THEN pushbullet TITLE \"Doorbell rang\" ​BODY \"Doorbell rang\" ​TOKEN abcd123abc ​USER TYPE note+IF 1 == 1 THEN pushbullet TITLE Doorbell rang BODY Doorbell rang TOKEN abcd123abc TYPE note
 </​code>​ </​code>​
 +
 +
 +==== Sendmail ====
 +
 +**Version**\\
 +Available since in the pilight v7.0
 +
 +**Description**\\
 +Send a message to any e-mail address
 +
 +**Options**
 +^name^required^multiple values^description^
 +|TO|x| |Self-explanatory|
 +|SUBJECT|x| |Self-explanatory|
 +|MESSAGE|x| |Self-explanatory|
 +
 +The Sendmail action requires some additional settings in the config like this:
 +<​code>​
 +       "​settings":​ {
 +                ................
 +                "​smtp-sender":​ "​sender@domain.com",​
 +                "​smtp-host":​ "​smtp.smtphost.com",​
 +                "​smtp-port":​ 465,
 +                "​smtp-user":​ "​smtpuser@domain.com",​
 +                "​smtp-password":​ "​password"​
 +        },
 +</​code>​
 +
 +**Explanation of the settings**
 +^name^required^description^
 +|smtp-sender|x|Address the recipient will see as the address of the sender (from)|
 +|smtp-host|x|Valid smtp host address. Some examples: smtp.gmail.com,​ securesmtp.t-online.de,​ smtp.mail.yahoo.com|
 +|smtp-port|x|Valid smtp-port number: 25 (unecrypted),​ 465 (SSL) or 587 (STARTTLS)|
 +|smtp-user|x|your smtp username in the form of an e-mail address|
 +|smtp-password|x|Your smtp password|
 +
 +**Examples**
 +<​code>​
 +IF 1 == 1 THEN sendmail SUBJECT Doorbell rang MESSAGE Doorbell rang TO someone@somewhere.com
 +</​code>​
 +
 +==== Label ====
 +
 +**Version**\\
 +Available since the pilight v7.0
 +
 +**Description**\\
 +Changes the text and color of a generic label device.
 +
 +**Options**
 +
 +pilight v6.0
 +^name^required^multiple values^description^
 +|DEVICE|x|x|Device(s) to change label of|
 +|TO|x| |New text|
 +|COLOR|x| |New color|
 +
 +pilight v7.0
 +^name^required^multiple values^description^
 +|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
 +<​code>​
 +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
 +</​code>​
 +
actions.1426895551.txt.gz · Last modified: 2015/11/27 21:08 (external edit)