ESP8266 IoT Wifi Button

Hello openhab community,

@Kay_Pohl and I made a simple Wifi IoT button with the ESP8266 (ESP-08S).

ESP8266 IoT Wifi Button (Thingiverse)



There is a variant with “http request” from Kay Pohl and another with “MQTT” from me.

After pressing the top button, the http request or the MQTT Publish is executed and then goes into the deepsleep mode.

However, first you have to upload the “Arduino http updater” via Arduino IDE and serial connection for the web update or one of the two variants of us, which already integrated the http updater.
After that you no longer need the serial connection and can always make the necessary adjustments via the browser.

All you have to do is the top button on the RST and the side button to GPIO12.
Both buttons must then still be connected to GND.
Otherwise, just VCC and GND must be connected to the battery, but that’s clear.

To activate the web update, the side button must be pressed and hold.
Then press the top button briefly and wait until the LED on the ESP starts to blink, then you can call up the web address of the ESP.


Excellent work! Any idea how long the battery will last? I’ve had problems running my Nodemcu sensors off a battery more than a few days (even with a deepsleep), but I’m thinking yours would last much longer (active only when button is pressed, no voltage regulators like the Nodemcu has), obviously dependent on usage of the button.

Hi @bartus,

I have the button now about 4 weeks active and the battery still shows the same voltage.
It’s used about 4 times a day (this switch turn on my son’s bed light).

How long does it take to send the button press? If it is in deep sleep, I would assume it has to wake, connect to wifi and then send signal. The connecting part could take a second or two I would think.

On MQTT ~950ms…

HTTP Reguest ~ 2 seconds.

Hello @Kay_Pohl can you explain or post an introduction how to flash???

1 Like

Oh yes. That’s good question.
How can I flash it?!! Is it so like esp-12?

@milo @Felix0123
It’s the same like ESP-12F, but the ESP-08S is smaller.
We have made a 3d printed adapter with pins to flash the ESP via USB to RS232.

1 Like

@AndyW can you please send me the 3D printer files?

There is actually a link to Thingiverse in the first posting where you can download the files :grin:

@hakan only of the Button itself Not for the flash Tool… which @AndyW mentioned or have i Overseen sth?

On thingiverse is only the STL files for the button…
The STL from the adapter brings you nothing, because we have taken any contact pins that we had there …

Is there any possibility to build in more buttons? So that you can switch with two buttons two things?

Sorry, I’m not often online.
It’s difficult to install another button as only the main button can wake up the ESP from the deepsleep.
After waking up, you could press/take other buttons, but always have to press the reset button before.

Mfg Andy