Go to documentation repository
...
The GRELE object sends events presented in the table. Procedure is started when the corresponding event appears.
Format of events procedure for the relay:
...
occurs.
Event | Description |
OFF |
Relay |
is off |
ON |
Relay |
is on |
SIGNAL_LOST |
Connection lost |
Operator format to describe actions with the relay is:
| Code Block |
|---|
DoReact("GRELE","_id_","_command_"); |
List of commands and parameters for the the GRELE object is presented in the following table:
Command |
—command description | Parameters | Description |
"ON" |
—enable relay | - | - |
"OFF" |
—disable relay | - | - |
"SETUP" |
—settings for relay | chan <> | Output number ( |
0–15) | |
flags<> | Flags |
name<> | Object name |
Properties of the GRELE object are shown in the table.
Properties of the GRELE object | Description of properties |
ID<> | Object ID |
PARENT_ID<> | Parent object ID |
REGION_ID<> | Region ID |
...
| Code Block |
|---|
CheckState("GRELE","number","state") |
The GRELE object can be in the following states:
State of the GRELE object | State description |
"ON" | Relay |
is on | |
"OFF" | Relay |
is off | |
"DETACHED_ON" | Connection lost, relay was on |
"DETACHED_OFF" | Connection lost |
Examples of using events and reactions of the Relay object:
Enable relay 2 while connection with relay 1 is lost.
...
, relay was off |