RULES

Each event associated with the resources (channels) of the device can be used as a TRIGGER that activates the execution of a RULE.


Within the rule can be defined up to 5 CONDITIONS that will be checked every time the rule is activated.


If all conditions are verified the device will perform up to 5 ACTIONS.


An action contains one or more COMMANDS  


Remember that actions are queued to be performed once the resource is available: therefore a hardware resource such as a relay output is activated immediately while a phone call could be postponed until the resource is available.

TECHNICAL NOTE


Up to 500 rules can be defined, stored in the R unit which is divided in subfolders, each of which contains the rules associated with a specific event.


Each rule is assigned a number which also represents the file name.


For more details:

File system > Unit R


The rules can be defined using the Avior.Suite software or from the web interface available here:

https://avior.webadmin.mobi


Advanced users can also enter rules directly with a command as shown

here


A simple example of a rule can be the following:



DIGITAL INPUT 1

TRIGGER EVENT

INPUT 1 STATUS = 1

CONDITION 1

BATTERY AVERAGE > 3600

CONDITION 2


CONDITION 3


CONDITION 4


CONDITION 5

out1=on

ACTION 1

AT#SPK=4

ACTION 2


ACTION 3


ACTION 4


ACTION 5




evento trigger is the change of state of digital input 1.


The first CONDITION to check is that the digital input 1 is in the logical state 1, ie closed.


The second CONDITION is that the average value of the battery voltage is higher than 3600 mV.


The first ACTION is the command that activates digital output 1.


Then the second ACTION will be performed which contains the command to play a tone on the internal speaker.