how to achieve: trigger by trigger

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

how to achieve: trigger by trigger

Post 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
The most dangerous phrase in any language is:
"We always done this way"
niwreg
Posts: 25
Joined: Thursday 19 February 2015 11:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to achieve: trigger by trigger

Post 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?
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: how to achieve: trigger by trigger

Post 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!!!
The most dangerous phrase in any language is:
"We always done this way"
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest