Go to documentation repository
The SetObjectState method changes the state of objects.
Syntax for method invocation:
function SetObjectState(objtype : String, id : String, state : String)
Method arguments:
Example. Check if camera 1 is armed every hour. If camera 1 is disarmed, arm it.
Note
You must create the Timer object with identification number 1 beforehand. Set the Minutes parameter of the Timer object to 30. The timer will go off every hour, for example, 09:30, 10:30, 11:30, and so on.
if (Event.SourceType == "TIMER" && Event.SourceId == "1" && Event.Action == "TRIGGER") { if (GetObjectState("CAM", "1") == "DISARMED") { SetObjectState("CAM", "1", "ARMED"); } }