evok icon indicating copy to clipboard operation
evok copied to clipboard

[GENERAL] Detect and output double tap, triple tap, long press and sustained hold input events

Open raintonr opened this issue 10 years ago • 3 comments

As discussed: http://forum.unipi.technology/viewtopic.php?f=14&t=189

For home automation lighting I'm guessing you'd connect digital inputs to momentary contact light switches.

In such an application it would be very useful to have double tap, triple tap, long press events detected. I'm guessing the best way to do that is in the evok layer and have it spit out different events.

What about sustained holding of an input? Would that be best handled with an 'input on' / 'input off' event pair? Here I'm thinking for controlling dimmable lights or blinds manually rather than setting to predefined levels.

raintonr avatar Feb 01 '16 14:02 raintonr

I'm planning on having momentary switches for light switches in my house, doing something similar. The useful purpose for me is to be able to turn off ALL the lights in the whole house from the entry/exit door, and from beside the bed.

I'll be interested in watching this space, and contributing if I can. Just got my unipi this weekend, but forgot to get a power supply :-(

Merv.

MervColton avatar Feb 21 '16 10:02 MervColton

An update to this: I implemented momentary switches for lights, and it works great. If you do a long-press, over 2 seconds i use that as a signal to turn off all the lights. I implemented this through Python as I could record the start and end time of each press.

MervColton avatar Mar 29 '17 19:03 MervColton

This would be an awesome feature! I'm currently using Node-RED to implement this because I'm already using it to send everything over MQTT. It would simplify my flow so much.

PlazzmiK avatar Feb 13 '18 19:02 PlazzmiK