Go to documentation repository
Documentation for Intellect 4.11.0-4.11.3. Documentation for other versions of Intellect is available too.
The SetObjectState method changes the state of objects.
Syntax for method invocation:
function SetObjectState(objtype : String, id : String, state : String)
Method arguments:
- objtype is a required argument. It corresponds to the type of system object, the state of which you want to change. Possible values: String type, range is limited by object types registered in the system.
- id is a required argument. It corresponds to the identification (registration) number of the object specified by the objtype argument. Possible values: String type, the range is limited by the identification numbers of objects of the specified type registered in the system.
- state is a required argument. It corresponds to the state to which you want to switch the object. Possible values: String type, range is limited by the states available for this object.
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"); } }
Overview
Content Tools