Update: I've uploaded the Fusion360 File. So everybody can edit the Button to his needs.
Super Simple IoT Wifi Button with ESP-08S Module. This Wifi Button consists of only a few components:
BOM:
ESP-08S - https://eckstein-shop.de/AI-Thinker-ESP8266-ESP-08S-New-Version-Serial-WIFI-Wireless-Remote-Control-Modul
CR2 Lithium Battery - https://www.ebay.de/itm/10-x-Batterie-CR2-Duracell-Ultra-3V-Lithium-Duralock-DLCR2-ELCR2-ohne-Blister/401123887924?hash=item5d64d8cb34:g:coYAAOSwQwdakAhz
Battery contacts - https://www.luedeke-elektronic.de/advanced_search_result.php?keywords=5205&inc_subcat=1&pfrom=&pto=&fl_unavailable=1
Buttons - https://www.ebay.de/itm/THT-Taster-6x6x7-mm-4-Pin-Kurzhubtaster-Drucktaster-Print-Schlieser-Draht-6-6-7/112627335689?hash=item1a391cc209:m:mfhBEF-tXFnpI_CgiJSu48g
Software:
The ESP8266 is programmed with the Arduino IDE. After Reset of the ESP8266 it sends either a webhook ( http get request ) or a mqtt package to your smarthome. After that the esp8266 go into deep sleep. Both versions can be updated over OTA Webserver (second Button).
Code for Webhook: https://pastebin.com/LfELAq1J
Code for MQTT: https://create.arduino.cc/editor/Andyino/7f48e822-bcf4-4549-a754-1939eb0ad2f8/preview
Credits:
This is a common project between AndyW83 and me. Thanks to AndyW83 for the initial Design of the Button. Andy also programmed the MQTT version for the Button.
IoT_Button.f3d | 498.7KB | |
IoT_Button_case.stl | 56.3KB | |
IoT_Button_top.stl | 214.9KB |