System events
@Tick(uptime)
The @Tick function is called automatically once every second.
Parameter
Description
uptime
Number of seconds since last system reset.
@Alarm(sourcetype, sourceid, alarmno)
The @Alarm function is called each time an alarm event is generated from
the configuration. The function is called even if there are no actions
configured, and regardless of conditions on any existing actions.
Parameter
Description
sourcetype
Indicates the source of the alarm event, and is one of:
SOURCE_INPUT
(1) – source is an input
SOURCE_SCHEDULE
(2) – source is a schedule
SOURCE_TIMER
(3)– source is a timer
sourceid
Indicates the source index, e.g. the input number (1-40), schedule number (1-20) or
timer number (1-20)
alarmno
Indicates the alarm number (1-4)
@Restore(sourcetype, sourceid, alarmno)
The @Restore function is called each time a restore event is generated from
the configuration. The function is called even if there are no actions
configured, and regardless of conditions on any existing actions.
Parameter
Description
sourcetype
Indicates the source of the restore event, and is one of:
SOURCE_INPUT
(1) – source is an input
SOURCE_SCHEDULE
(2) – source is a schedule
SOURCE_TIMER
(3)– source is a timer
sourceid
Indicates the source index, e.g. the input number (1-40), schedule number (1-20) or
timer number (1-20)
alarmno
Indicates the alarm number (1-4)
Page 114 of 121