IP Clockwise‎ > ‎

Embeddable Control Commands

Clockwise supports several control commands that can be embedded in the scrolling text strings used in alerts and events. 

Example:

message text: Today is {dayofweek}, {date}, and the {green}US debt{/green} is currently {usdebt}, which is up {usdebt_year}  this year.
would produce: Today is Tuesday, 10/18/2013, and the US debt is currently $16.8T, which is $318B↑ this year.

Note that some fields automatically color themselves, for example: if the debt is down, the $ value is green, debt up, it is red

A summary is below of the available commands:


Date/Time Related codes

 Command Is replaced with Example result
 {date} The current date 10/18/2013
 {time} The current time 9:15
 {dayofweek} The day of the week Friday
 {month} The current month October
 {day} The current day of the month 18
 {year} The current year 2013
 {hour} The current hour 9
 {minute} The current minute 15
 {second} The current second 23


Internet-Down Related Codes

These codes should primarily be used with the "Internet Availability" traps (i.e. the trigger source in an Alert). The date-reporting codes may otherwise be incorrect or meaningless.
Command Is replaced with Example result
 {internet_status}The status of the internet connection. Possible results include UP, QUESTIONABLE, or DOWN. QUESTIONABLE means 1, 2, or 3 successive attempts have been made to the internet, without success. If 4 or more unsuccessful attempts occur, the status will be changed to DOWN. UP
 {internetdown_time}The date/time the internet last went down. Useful when the "Came Back Up" sub-type is used on the "Internet Availability" trigger is used in an Alert.4/12/2018 9:00AM
 {internetup_time}The date/time the internet came back up4/12/2018 9:04AM
 {internetdown_timespan}The current timespan the internet was down for. Useful when the "Came Back Up" sub-type is used on the "Internet Availability" trigger is used in an Alert.4 minutes and 32 seconds
 
 {network_status}The status of the network connection. Possible results include UP, QUESTIONABLE, or DOWN. QUESTIONABLE means 1, 2, or 3 successive attempts have been made to the internet, without success. If 4 or more unsuccessful attempts occur, the status will be changed to DOWN.UP
{networkdown_time}The date/time the local network last went down. 4/12/2018 9:00AM
 {networkup_time}The date/time the local network came back up4/12/2018 9:04AM
 {networkdown_timespan}The current timespan the network was down for. 4 minutes and 32 seconds


Color Related codes

 Command Is replaced with Example result
 {cherry} Change the color in the text string to cherry, to change it back, use {/cherry} 
 {red} Change the color in the text string to red, to change it back, use {/red} 
 {hunter} Change the color in the text string to hunter, to change it back, use {/hunter} 
 {sienna} Change the color in the text string to sienna, to change it back, use {/sienna} 
 {terracotta} Change the color in the text string to terracotta, to change it back, use {/terracotta} 
 {vermillion} Change the color in the text string to vermillion, to change it back, use {/vermillion} 
 {olive} Change the color in the text string to olive, to change it back, use {/olive} 
 {tan} Change the color in the text string to tan, to change it back, use {/tan} 
 {ochre} Change the color in the text string to ochre, to change it back, use {/ochre} 
 {pumpkin} Change the color in the text string to pumpkin, to change it back, use {/pumpkin} 
 {green} Change the color in the text string to green, to change it back, use {/green} 
 {yellow} Change the color in the text string to yellow, to change it back, use {/yellow} 
 {gold} Change the color in the text string to gold, to change it back, use {/gold} 
 {orange} Change the color in the text string to orange, to change it back, use {/orange} 
   
 {flash_fg=normal_fg} Removes Flash settings from text following this tag 
 {flash_fg=default} Applies Flash settings to text following this tag 


Trigger Related codes

 Command Is replaced with Example result
 {trigger} Type, channel and state of trigger activated (GPIO In, Temp Sensor, Internet Availability) (GPIO In : 1 : Set)
 {trigger.source} Description and MAC address of endpoint which caused the trigger IPSpeaker(20:46:f9:03:2b:71)
 {trigger.source.description} Description of endpoint which caused the trigger IPSpeaker
 {trigger.source.mac} MAC address of endpoint which caused the trigger 20:46:f9:03:2b:71
 {trigger.source.ip} IP address of endpoint which caused the trigger192.168.6.123
 {trigger.source.location} Location of endpoint which caused the trigger North Hallway


US Debt Related codes

Command Is replaced with Example result
 {usdebt} The current US national debt $16.8T
 {usedebt_between_reads} The change in US debt from the last time it was retrieved $1.1M
 {usedebt_day} The change in US debt for the current day, so far (since midnight) $2.4M
 {usedebt_year} The change in debt for the current year, so far (since January 1) $318B


Comments