Go to documentation repository
...
The GRAY object sends events presented in the table. Procedure is started when the corresponding event appears.
Format of events procedure for the sensor:
Code Block |
---|
OnEvent("GRAY","_id_","_event_") |
occurs.
...
Event | Event description |
ALARM |
Event
Description
Alarm. This event is received |
when the sensor is opened or closed (it depends on object settings) if sensor is armed. If sensor is disarmed, then Sensor opened and Sensor closed events are received |
respectively |
ARM |
Sensor is armed |
CONFIRM |
Alarm received |
DISARM |
Sensor is disarmed |
NOT_VALID_STATE |
Zone is not ready |
OFF |
Sensor is opened. This event is received |
when the sensor |
is opened if the sensor is disarmed |
ON |
Sensor is closed. This event is received |
when the sensor |
is closed if the sensor is disarmed |
SIGNAL_LOST |
Connection with the sensor is lost |
Operator format to describe actions with the sensor is:
...
DoReact("GRAY","_id_","_command_");
List of commands and parameters for the the GRAY object is presented in the following table:
Command – command description | Parameters | Description |
"ARM" – —arm the sensor. | - | - |
"DISARM" – —disarm the sensor. | - | - |
“CONFIRM” – —confirm an alarm. | - | - |
“SETUP” – —settings for the sensor. | chan<> | Output number (0 – 150–15) |
flags<> | Flags | |
name<> | Object name | |
type<> | Type of sensor object (0 – —on closing, 1 – —on opening) |
Properties of the GRAY object are shown in the table.
Properties of the GRAY object | Description of properties |
ID<> | Object ID |
PARENT_ID<> | Parent object ID |
REGION_ID<> | Region ID |
Check function of the GRAY object state:
Code Block |
---|
CheckState ("GRAY","number","state") |
The GRAY object The GRAY object can be in the following states:
State of the GRAY object | State description |
"ARMED" | Sensor is armed |
"DISARME"” | Sensor is disarmed |
"ALARMED" | Alarm |
"CONFIRMED" | Alarm confirmed |
"DISARMED_ALARM" | Not ready |
"DETACHED_ARMED" | Connection lost when the sensor was armed |
"DETACHED_DISARM" | Connection lost when the sensor was disarmed |
“OFF” | Normal |
Examples of using events and reactions of the Sensor object:
It is required to switch over the second sensor to the second input if connection with the first sensor is lost.
Code Block |
---|
OnEvent("GRAY","1"," SIGNAL_LOST") //connection with first sensor is losst
{
DoReact("GRAY","2","SETUP","chan<2>"); //sensor is on the second input
} |
Open the second sensor and enable the rollback record of the first video camera in case of the first sensor is closed.
...