Configuration > Rules Configuration

Get status of "all" devices?


Now that the omni driver has lock status working, I'm trying to set up a rule to check the status of all locks at once.
So basically I want to do something like this:

--- Code: ---if (omni.LockStatus[ALL]==0)
--- End code ---

Is there a way to do this with one line or just list them all one at a time?

Elk guy here,  but I'll take a stab.  Are locks treated like a zone? if so can you define a new area consisting of all your locks and then check if the area is secure?

Sent from my SCH-I545 using Tapatalk

Actually I'm just looking for the C# code. Just need to know if there's an equivalent for the word "ALL" in that example I wrote.

There is no simple way to do all in the elve script language as far as I know.  C# itself could do it, but that isn't exposed into the scripting language..

I haven't tested it, but something like this:

--- Code: ---boolean allLocked = true;
for(counter=0; counter<omni.LockStatus.Length; counter++){
  allLocked = allLocked && omni.LockStatus[counter] == 0;
--- End code ---

Thanks! I'll give it a shot.


[0] Message Index

Go to full version