I wanted to talk about one of my main problem regarding event management in domotiga:
Here is an example to explain the situation:
Event_1: Trigger_A, Condition_B => Action_1
this event
case 1: will fire when Trigger_A BECOMES true and Condition_B IS true
case 2: will not fire if Trigger_A IS true and Condition_B BECOMES true
This is because of the definition of triggers and conditions. But most of the time I want the action to be performed also in the case 2. To do this i add :
Event_2: Trigger_B, Condition_A => Action_1
and this solves the problem.
Now imagine you have two conditions, this time you need:
Event_1: Trigger_A, Condition_B and Condition_C => Action_1
Event_1: Trigger_B, Condition_A and Condition_C => Action_1
Event_1: Trigger_C, Condition_A and Condition_B => Action_1
This makes a lot of events for the same action.
This complexity could be overcome if there was a possibility for multiple triggers and an advanced trigger editor (same as the condition editor). I think this was planned....
A deeper evolution of the event management could also be a really powerful solution to this issue and it solves also other problem. This is how i see things:
A trigger is a list of variables (globalvars, time, device value, ...), it triggers when one of the variable is updated
And conditions are integrated with actions.
Just an example to illustrate this concept:
Event :
Trigger(Device_45.Value1, TimeNow(0 * * * *), GlobalVar_HouseMode, GlobalVar_SetPoint)
Actionlist :
- Action1 : If( GlobalVar_HouseMode=="normal" And Device_45.Value1 < GlobalVar_SetPoint , setDevice(Device_33.Value1,"On"), setDevice(Device_33.Value1,"Off"))
- Action2 : SendEmail( "foo@domotiga.nl", "subject", "the temperature is %Device_45.Value1%")
Please tell me what do you think of this solution and if you see a limitation.
Hplus