Page 1 of 1

how to achieve: trigger by trigger

Posted: Monday 15 October 2018 8:49
by emme
Ciao,

looking for a solution (and posibily a dzVent implementation :P) about how to achieve a device trigger ONLY if another device has been trigger before.

Example:
I do have my presence system based on BLE.... but before starting some action I would need the magnet on the front door to be opened.
Actually I can do this valuating the .lastUpdate() within a period, but this would take me 2 or mode complex scripts.

I was looking for an implementatoin like:

Code: Select all

   on = {
      devices = { 'Door switch'},
      dependDevices = {'Presence' = 'last 1 minutes'}
   },
so the script will be triggered if Presence changes in the last minute and if Door Switch changes state

would it be difficult? :(
ciao
M

Re: how to achieve: trigger by trigger

Posted: Monday 15 October 2018 9:15
by niwreg
Perhaps you can have a look at this:
viewtopic.php?p=193236#p193236

There the script is only active when a device is on. Maybe you can tweak it to use the precence?

Re: how to achieve: trigger by trigger

Posted: Monday 15 October 2018 9:20
by emme
uh... did not notice that!!!
THANK YOU!!!! I'll give it a try!

the wired usage of the active option looks simply great!!!