Switch with counting option and long press detection

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
yarysek
New user
Posts: 5
Joined: 24 Nov 2016, 09:07
Location: Poland

Switch with counting option and long press detection

#1 Post by yarysek » 24 Nov 2016, 09:30

Hello everybody.
First I would like to say hello everybody, I'm new here :)

I will start making my intelligent house based on Domoticz, I have plans to use esp module to control lights, devices and other things.
To control light I planning to use simple pushbutton.
As we know switch imput in espeasy return only two values 0 and 1
whether it is possible to make it to count, so that they can take the values 0,1,2,3... e.t.c.?

I want to use only one button to control set lighting
This is an example:
First press -> first lamp on, second off, third off
second press -> first lamp off, second on, third on
third press -> all on
fourth press -> all off

I will control that using simple rule.

Second question.
Is there is possibility to detect long press lasting longer than 1 sec, that to return a different value?

All best,
Kamil

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 61 guests