2N® Helios IP Automation Configuration
1.2
Use of Variables
The event block variables (parameters) help transfer additional information between
blocks – send ID of the detected card via HTTP to another device, use parameters
received in HTTP for setting parameters of a tied action and so on. Their values are
updated whenever the event is generated. Use the following syntax to refer to a
variable in the configuration parameters of another block:
$(block_number.variable_name) – the block number and variable name are separated
with a dot.
Example:
1: Event.KeyPressed: Key=Any
2: Action.SendHttpRequest: Event=1; Uri=http://192.168.1.1/ABCD?Key=$(1.Key)
Press any key (block 1 Event.KeyPressed) to send the HTTP request (block 2
Action.SendHttpRequest) to IP address 192.168.1.1. For example, if you press *, the
HTTP request URI will be as follows:
http://192.168.1.1/ABCD?Key=*
Every event defines the
TimeStamp
and
Count
variables.
TimeStamp
contains encoded date and time of the last event generation in the Unix
Time format (second count from 00:00:00 1.1.1970).
Count
contains the count of event generations after the device start or last block
configuration change. The variable increases by 1 after each event generation.
Refer to the following subsections for more variables with specific functions.
Tip
The Upper/Lower case is not be respected in the variable names.
Caution
You cannot use the variables in the block relation defining parameters, i.e.
Event, Condition, etc.