Page 1 of 1
Popup to confirm switch
Posted: Tuesday 06 February 2018 12:09
by Andrex
Hi all,
I have a "sensitive" buttons in my domoticz: some take off the whole power and some turn on a fog machine (anti theft).
Since there are a lot of people using it in my office, I want to make shure that nobody presses buttons by mistake.
So, is there a way to have a popup or something like that I can enable on some switches/buttons so that a confirm is request before take the action?
Thanks!
Andrea
Re: Popup to confirm switch
Posted: Tuesday 06 February 2018 12:11
by emme
you can protect it with a pin
edit the switch and click on PROTECT
the pin is setted under settings SWITCH PROTECTION
....you have a fog machine as anti-theft?!
looks awesome!!
Re: Popup to confirm switch
Posted: Tuesday 06 February 2018 12:18
by Andrex
emme wrote: Tuesday 06 February 2018 12:11
you can protect it with a pin
I forgot to say that I'm already doing that, but people are leazy and most of all, my boss wants to be as quick as possible to enable the fog machines
....you have a fog machine as anti-theft?!
looks awesome!!
As well as dangerous, if it fires when you are in the warehouse, you can get lost in a 2x2m space!
...and sensible, once it fired just touching the relay contacts with a multimeters!!!
Re: Popup to confirm switch
Posted: Tuesday 06 February 2018 12:24
by emme
...if you need to be quick you can setup a combination of 2 switches... example:
create 2 virtual PUSHON button with a delay of 3 secs to beturned off...
you have to engage both to act as a panic button:
push the first PushButton
push the second pushbutton before the first one turns back off
then you have your panic alarm...
a simple dzVents script could be:
Code: Select all
return {
on = {
devices = {
'Panic_*'
}
},
execute = function(dz, devPanic)
local panicOne = dz.devices('Panic_Button_1')
local panicTwo = dz.devices('Panic_Button_2')
local fogMachine = dz.devices('Fog Machine')
if Panic_Button_1.state == 'On' and Panic_Button_2.state == 'On' then
Panic_Button_1.switchOff().silent()
Panic_Button_2.switchOff().silent()
fogMachine.switchOn().forMins(20)
end
end
}
ciao
M
Re: Popup to confirm switch
Posted: Tuesday 06 February 2018 17:12
by Andrex
emme wrote: Tuesday 06 February 2018 12:24
...if you need to be quick you can setup a combination of 2 switches
Nice idea, thanks!
a simple dzVents script could be:
Code: Select all
return {
on = {
devices = {
'Panic_*'
}
},
execute = function(dz, devPanic)
local panicOne = dz.devices('Panic_Button_1')
local panicTwo = dz.devices('Panic_Button_2')
local fogMachine = dz.devices('Fog Machine')
if Panic_Button_1.state == 'On' and Panic_Button_2.state == 'On' then
Panic_Button_1.switchOff().silent()
Panic_Button_2.switchOff().silent()
fogMachine.switchOn().forMins(20)
end
end
}
Thanks for the code!