Hello, i want an action to be performed when i push a button for 3 times within 5 sec.
How can i manage this?
Regards
logic function
Moderator: leecollings
- Arkie
- Posts: 38
- Joined: Tuesday 03 December 2013 15:24
- Target OS: NAS (Synology & others)
- Domoticz version: beta
- Location: The Netherlands
- Contact:
logic function
Synology DS412+
Philips Hue
Fibaro
Logitech Hamony elite
Foscam 9804 ip cam
RFXtrx433E USB 433.92MHz
ZXT 120 eu AC controller
Heatmiser NEO stat thermostats and Hub
Philips Hue
Fibaro
Logitech Hamony elite
Foscam 9804 ip cam
RFXtrx433E USB 433.92MHz
ZXT 120 eu AC controller
Heatmiser NEO stat thermostats and Hub
-
- Posts: 71
- Joined: Saturday 13 July 2013 2:45
- Target OS: Linux
- Domoticz version: 3.5877
- Location: Scotland
- Contact:
Re: logic function
You need to use LUA - you can't do this in Blockly, but you can use the lastupdate value and time difference functions in LUA to achieve this.
AEOTEC ZStick, 11 ZWave Nodes, RFXCOMM, 50ish Byron Sockets.. HE851 (PIR), 2x HE852 (DoorContact)
WS2300, CM180, CC128, 2xTHGR122NX, 2xPiZeroW w/DS18B20, 8Ch 1W Relay Board.
8 Panasonic IP Cams, 1 16ch CCTV DVR + 15 CCTV Cams
WS2300, CM180, CC128, 2xTHGR122NX, 2xPiZeroW w/DS18B20, 8Ch 1W Relay Board.
8 Panasonic IP Cams, 1 16ch CCTV DVR + 15 CCTV Cams
- Domosapiens
- Posts: 232
- Joined: Wednesday 20 August 2014 12:08
- Target OS: Windows
- Domoticz version: V3.5981
- Location: NL
- Contact:
Re: logic function
You could try something like this:
Define 2 dummy buttons
Push1 with Off_delay of 5 sec.
Push2 with Off_delay of 4 sec.
Assume you push button named Push
Blockly:
Define 2 dummy buttons
Push1 with Off_delay of 5 sec.
Push2 with Off_delay of 4 sec.
Assume you push button named Push
Blockly:
Code: Select all
If Push=on And Push1=off
Set Push1=on
ElseIf Push=on And Push1=on
Set Push2=on
ElseIf Push=on And Push1=on And Push2=on
<perform action>
Win Vista&7; 1#Aeon Z-Stick S2; 1#Aeotec Z-Sick Gen5, 6#Fib.FGBS001; 24#DS18B20; 8#Everspr.AN158-2; 3#Philio PAN04; 1#Philio PAN06, 1#YouLess El; 1#Fib.FGWPE; 1#ZME_RC2; 2#FAK_ZWS230, 2#Quib.ZMNHCDx, 1#Quib.ZMNHDD1, 7#EM6555
Who is online
Users browsing this forum: No registered users and 1 guest