Rule system
Rules are of the form
when (event) if (conditions) then (actions)
Common actions are printing, generating other events, changing properties, etc. Rules are grouped in modules. Common actions are printing, generating other events, changing properties, etc.
Custom Rules
To control interactions, apart from the triggers in the CMS you can use custom rules in the Broox Controller.
Those are defined in a rules.json
file, referenced in controller.ini.
...
[rules]
extra=rules.json
...
The format of the rules follows the WHEN event IF conditions THEN actions form.
"rules" :
[
{
"comment" : "Some comment",
"event" : "trigger",
"conditions" : [
["event.payload.class", "==", "onevent"],
["event.payload.action", "==", "in"],
["event.payload.origin.class","==", "XEye"]
],
"actions" : [
{"command" : "devices",
"arguments" : ["send", "event.origin", "actuate", "target", "LightMark-113", "action", "ramp", "args", "[90,3,30]"]
}, ...
]
}, ...
]
You can edit the rules to change the target to LightMark-XXX (whatever ID you want), the action (ramp) or the parameters to ramp (args).