Extend triggers behaviour

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
hplus
Starting Member
Starting Member
Posts: 43
Joined: Fri Jan 22, 2010 12:21 pm

Extend triggers behaviour

Post by hplus »

Hi,

It could be interesting to optionally extend the triggers not only to trigger on a value change but also on a value update (even if the value didn't change, it could be updated to the same value).
This option should be used carefully not to overload the event manager...

What do you this about that?

Hplus
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Extend triggers behaviour

Post by RDNZL »

What do you want to trigger/act on exactly?

Device triggers are based on field number, if none of the values have changed there is no trigger activated.
But we can create others like on lastseen field for example.
Regards, Ron.
hplus
Starting Member
Starting Member
Posts: 43
Joined: Fri Jan 22, 2010 12:21 pm

Re: Extend triggers behaviour

Post by hplus »

What i wanted to have, is a trigger that fires each time an update from a device is received, even if the values field did'nt change.
This is useful to redo the actions associated with the states of the different values of the devices.
Am I clear?
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Extend triggers behaviour

Post by RDNZL »

Not really.. a trigger is like a condition, it compares values to fields specified in the trigger to see which events needs to be run, where do you want to match on?

It seems you want to run a certain event every time regarding value changed or not.
But often you don't want to do that, so this conflicts... for example if device values x = on -> speak "device x is on" only runs when value has changed, not when previous value was on already.
Regards, Ron.
hplus
Starting Member
Starting Member
Posts: 43
Joined: Fri Jan 22, 2010 12:21 pm

Re: Extend triggers behaviour

Post by hplus »

I understand this is not always suitable.
Maybe a solution could be to have in the trigger combo box (value, value1, value2, value3) an extra item which is "updated" or even lastseen as you suggested (this field will change at each update). This event will then fire each time a device is updated....

I have really a lot of problem generating a coherent rule set.... in fact even for a simple scenario i need a huge amount of rules, based on device update, global vars and timed event just to manage one heating point in my house... I am also dealing with what i call watchdogs to periodically resend the heater state according to a globalvar... To simplify the rule creation and management, i would need a more "cleaver" event engine.

Hplus
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Extend triggers behaviour

Post by RDNZL »

Ok will implement something like that.

I know another user is coding a thermostat in DomotiGa, but don't know your setup well enough to see if you can benefit from this.
Regards, Ron.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Extend triggers behaviour

Post by RDNZL »

Added support for triggers on lastseen value to revision http://domotiga.nl/changeset/508

Create a trigger with IF device lastseen <> " " (space) to trigger on every device update.
Regards, Ron.
Post Reply

Return to “DomotiGa Forum”