Page 1 of 1

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

Posted: 13 Mar 2019, 11:37
by Klagio
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.

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

Posted: 13 Mar 2019, 17:33
by Patou
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

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

Posted: 14 Mar 2019, 13:15
by Klagio
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