ESP8266 IoT Wifi Button

Tags: #<Tag:0x00007f51e057dee0> #<Tag:0x00007f51e057dbe8> #<Tag:0x00007f51e057d9b8>

(Andy Wolff) #1

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.

(B K) #2

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.

(Andy Wolff) #3

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).

(Moxified) #4

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.

(Andy Wolff) #5

On MQTT ~950ms…

(Kay Pohl) #6

HTTP Reguest ~ 2 seconds.

(M) #7

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

(Felix Hofner) #8

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

(Andy Wolff) #9

@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.

(M) #10

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

(Hakan Tandogan) #11

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

(M) #12

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

(Andy Wolff) #13

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 …

(Felix Hofner) #14

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