Events, Triggers and Actions
Posted: Wed Jan 21, 2009 7:56 pm
Hi,
I have implemented Events in DomotiGa with some nice GUI to manage them, but have been re-thinking it's design.
I now have events, which can have a trigger like DeviceChange -> Value x = or <> "text", and I have actions like SetDevice (X10 lamp on for example)
I'm thinking about adding 2 conditions to the event so.
If Trigger AND/OR condition1 AND/OR condition2 (optional) then run action(s).
triggers can be for example:
devicechange 'Kitchen Motion' value = "Motion"
devicechange 'Bathroom sensor' value3 = "wet"
timenow = 15:00
globalvar change House_mode = "Home"
todo:
manual (click button)
got e-mail
condition can be:
globalvar Dark = True
globalvar House_mode = "away"
action(s) can be:
set device "Kitchen lamp" ON
set device "house ventilation" speed 3
todo:
run other trigger ()
send e-mail
take camera image
play sound
say 'some text'
set globalvar
up to three can be run after each other.
anyone has some thoughts about this?
regards,
Ron.
I have implemented Events in DomotiGa with some nice GUI to manage them, but have been re-thinking it's design.
I now have events, which can have a trigger like DeviceChange -> Value x = or <> "text", and I have actions like SetDevice (X10 lamp on for example)
I'm thinking about adding 2 conditions to the event so.
If Trigger AND/OR condition1 AND/OR condition2 (optional) then run action(s).
triggers can be for example:
devicechange 'Kitchen Motion' value = "Motion"
devicechange 'Bathroom sensor' value3 = "wet"
timenow = 15:00
globalvar change House_mode = "Home"
todo:
manual (click button)
got e-mail
condition can be:
globalvar Dark = True
globalvar House_mode = "away"
action(s) can be:
set device "Kitchen lamp" ON
set device "house ventilation" speed 3
todo:
run other trigger ()
send e-mail
take camera image
play sound
say 'some text'
set globalvar
up to three can be run after each other.
anyone has some thoughts about this?
regards,
Ron.