NOTE: when a value referenced below uses a # in it, it can be any channel number available for that value.
Internal I/O | |
---|---|
din[#].state |
Returns the state, 0 or 1, for the digital input represented by the #. |
din[#].counter |
Returns the counter for the digital input represented by the #. Ranges from [0 - Integer.MAX] |
din[#].usagemeter |
Returns the usage meter for the digital input represented by the #. Ranges from [0 - Long.MAX] |
rout[#].state |
Returns the state, 0 or 1, for the relay output represented by the #. |
rout[#].usagemeter |
Returns the usage meter for the relay output represented by the #. Ranges from [0 - Long.MAX] |
Temperature Probe and Environmental Sensor | |
---|---|
temp[#].f or temp[#].farhenheit |
Returns the temperature in farhenheit from the Temperature Probe. |
temp[#].c or temp[#].celsius |
Returns the temperature in celsius from the Temperature Probe. |
Environmental Sensor I/O | |
---|---|
env[#].f or env[#].farhenheit |
Returns the temperature in farhenheit from the Environmental Sensor. |
env[#].c or env[#].celsius |
Returns the temperature in celsius from the Environmental Sensor. |
env[#].h or env[#].humidity |
Returns the humidity from the Environmental Sensor. |
Random | |
---|---|
Double.random() or Double.random(upper bound) or
Double.random(lower bound, upper bound)
|
0 to 1 default. Optionally an upper bound can be specified. This would give you a random value between 0 and the upper bound. Optionally a lower and n upper bound can be specified. This would give you a random value between the lower bound and the upper bound. |
Int.random() or Int.random(upper bound) or
Int.random(lower bound, upper bound)
|
0 to 1 default. Optionally an upper bound can be specified. This would give you a random value between 0 and the upper bound. Optionally a lower and n upper bound can be specified. This would give you a random value between the lower bound and the upper bound. |
Trigger Name | |
---|---|
task.caller
|
To be used in a task that was executed by a trigger. Returns the name of the trigger that executed this task. |
Trigger Execute Time | |
trigger.time |
To be used in a task that was executed by a trigger. Returns a long representing the current time the trigger was executed to call said task. |
Trigger State | |
trigger.state |
To be used in a task that was executed by an I/O trigger. Returns the state of the signal that activated the trigger that executed this task. |
Trigger Signal Name | |
trigger.signalname |
To be used in a task that was executed by a trigger. Returns the name of the signal in the trigger that executed this task. |
Trigger Control Panel Switch | |
trigger.controlpanelswitch |
To be used in a task that was executed by a control panel trigger. Returns the switch number used in the trigger that executed this task. |
Buffer | |
---|---|
(devicename)_buffer |
References the data that the defined device has received from a Device-Send Action when the "Listen for Response" checkbox is enabled. This will return you whatever data has been received from the device with that name given. |
Parse | |
---|---|
Double.parse(string) |
Parses a string as a double |
Int.parse(string) |
Parses a string as an integer |
Validate Days of Week | |
---|---|
date.isDay(montuewedthufrisatsun) |
Returns true or false if the current day abbreviations matches one of the abbreviations provided. For example, providing “montuewedthufri” would return true on a weekday where “satsun” would return true on the weekend. |
Validate Time of Day | |
---|---|
time.isBefore("HH:MM") |
Returns true or false if the current time of day is equal to or before the string representation. The string representation must be in 24 hour format. For example, is the current time before or equal to “14:00”. |
time.isAfter("HH:MM") |
Returns true or false if the current time of day is equal to or after the string representation. The string representation must be in 24 hour format. For example, is the current time equal to or after “14:00”. |
Current Date | |
---|---|
Date.currentmillis() |
Returns a long representing the current time in milliseconds since Jan 1 1970. |
String Format | |
---|---|
String.formatdecimal(value) or String.formatdecimal(value, format string) |
Returns a formatted string representation of the given value. A default of 2 decimal places is used if a format string is not provided. |
String.frombytes(bytes) |
Returns a formatted string representation from a given byte value. Can be used on (devicename)_buffer data from a Device-Send Action to convert the buffer data from bytes to a string. |
HexUtils | |
---|---|
hexutils.bytestohex(bytes) |
Returns a formatted hex representation from a given byte value. Can be used on (devicename)_buffer data from a Device-Send Action to convert the buffer data from bytes to a hex. |
File | |
---|---|
File(filename).size |
Returns the size of the file represented by the filename. |
Read Registry | |
---|---|
Registry.read(key) or Registry.read(key, default value) |
Reads a registry key. Optionally, a default value can be specified. |
Arrays | |
---|---|
ArrayUtils.getshort(ref to byte array, offset) or
ArrayUtils.getshort(ref to byte array, offset, swap endian)
|
Returns a short that is represented by 2 bytes in the referenced array starting at the offset. The Int will be represented in little-endian byte default. To read the array with big-endian format you must specify true for the swap endian parameter. |
ArrayUtils.getint(ref to byte array, offset) or
ArrayUtils.getint(ref to byte array, offset, swap endian)
|
Returns true or false if the current time of day is equal to or after the string representation. The string representation must be in 24 hour format. For example, is the current time equal to or after “14:00”. |
ArrayUtils.getlong(ref to byte array, offset) or
ArrayUtils.getlong (ref to byte array, offset, swap endian)
|
Returns true or false if the current time of day is equal to or after the string representation. The string representation must be in 24 hour format. For example, is the current time equal to or after “14:00”. |
ArrayUtils.getdouble(ref to byte array, offset) or
ArrayUtils.getdouble(ref to byte array, offset, swap endian)
|
Returns true or false if the current time of day is equal to or after the string representation. The string representation must be in 24 hour format. For example, is the current time equal to or after “14:00”. |
4-20ma I/O | NOTE: When 2 4-20ma modules are connected, using 1 through 4 references the first modules inputs and using 5 through 8 reference the second modules inputs. As for outputs, using 1 or 2 refrence the first modules outputs and using 3 or 4 reference the second modules outputs. |
---|---|
iin[#].desc |
Returns the string that represents the description for the # channel. This can be set in the WebUI for each channel. |
iin[#].raw |
Returns the raw value of the 4-20ma input. 0-65520. |
iin[#].scaled |
Returns the scaled value. 4-20ma. The minimum and maximum for the scaled range can be set in the WebUI for each channel. |
iin[#].units |
Returns the string that represents the units for the # channel. “ma” will be returned by default. This can be set in the WebUI for each channel. |
iout[#].desc |
Returns the string that represents the description for the # channel. This can be set in the WebUI for each channel. |
iout[#].raw |
Returns the raw value of the 4-20ma output. 0-65520. |
iout[#].scaled |
Returns the scaled value. 4-20ma. The minimum and maximum for the scaled range can be set in the WebUI for each channel. |
iout[#].units |
Returns the string that represents the units for the # channel. “ma” will be returned by default. This can be set in the WebUI for each channel. |
10volt I/O | NOTE: When 2 Ten Volt modules are connected, using 1 through 4 references the first modules inputs and using 5 through 8 reference the second modules inputs. As for outputs, using 1 or 2 refrence the first modules outputs and using 3 or 4 reference the second modules outputs. |
---|---|
vin[#].desc |
Returns the string that represents the description for the # channel. This can be set in the WebUI for each channel. |
vin[#].raw |
Returns the raw value of the 4-20ma input. 0-65520. |
vin[#].scaled |
Returns the scaled value. 4-20ma. The minimum and maximum for the scaled range can be set in the WebUI for each channel. |
vin[#].units |
Returns the string that represents the units for the # channel. “ma” will be returned by default. This can be set in the WebUI for each channel. |
vout[#].desc |
Returns the string that represents the description for the # channel. This can be set in the WebUI for each channel. |
vout[#].raw |
Returns the raw value of the 4-20ma output. 0-65520. |
vout[#].scaled |
Returns the scaled value. 4-20ma. The minimum and maximum for the scaled range can be set in the WebUI for each channel. |
vout[#].units |
Returns the string that represents the units for the # channel. “ma” will be returned by default. This can be set in the WebUI for each channel. |
Control Panel | |
---|---|
fpled[#].state |
Returns true or false if the LED for the control panel channel is on or off. |