Newb. Programming ESPEasy to recreate a press and double press of a button

Moderators: Voyager, BertB, rtenklooster, Stuntteam, grovkillen, TD-er

Post Reply
Message
Author
Klagio
Normal user
Posts: 2
Joined: 13 Mar 2019, 11:29

Newb. Programming ESPEasy to recreate a press and double press of a button

#1 Post by Klagio » 13 Mar 2019, 11:37

Hi,

I need to recreate a press of a button and a double press of the same button (delay around 500millisec) via software.
Hardware wise I opened the button, and soldered a 10kOhm resistors where the button get pressed, on the other end of the resistors I connected a GPIO of a nodemcu. I also use 3,3V and GND of the nodemcu to power the button (which usually uses a cell battery). Currently I flashed the nodemcu with a code (made by someone else, since I am a newb) and that works but not well (I use a MQTT server and Home Assistant to control the press and double press via software)

My goal is to flash ESPEasy on the Nodemcu and do the same, and hopefully works better.

Any help on how to use ESPEasy (rules?), to achieve my goal (if achievable with ESPEasy)?

Thanks.

Patou
Normal user
Posts: 19
Joined: 21 May 2018, 10:33

Re: Newb. Programming ESPEasy to recreate a press and double press of a button

#2 Post by Patou » 13 Mar 2019, 17:33

Hello,

Please have a look at https://espeasy.readthedocs.io/en/lates ... witch.html
Long press and double click is clearly explained
Good reading
Patou

Klagio
Normal user
Posts: 2
Joined: 13 Mar 2019, 11:29

Re: Newb. Programming ESPEasy to recreate a press and double press of a button

#3 Post by Klagio » 14 Mar 2019, 13:15

Thanks, trying it now.

I see that double click event allows an interval of 1000ms, but that's too much, 1 second for a double press its a lot of time, my button will see it as two times single press.

Any way to change it to a lower value, like 500 msec?

I also do not see where to insert my MQTT server details (just the MQTT device id)

Latest firmware:
ESP_Easy_mega-20190311_normal_ESP8266_4M.bin

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests