The marvellous ESP smart button … now with feedback!

Who don’t need a connected button???

Immagine a button who automatically send a message via WiFi to your server and start your heating, or trigger the start of your favorite film on your TV. It’s time to build one!

Materials needed:

  • the button enclosure plus a switch and battery holder – I found out a low cost push light in a elegant white enclosure perfect for realize this button (and big enough to not loose in a messy environment)


  • the WiFi board – I chosen a very simple  and low cost ESP8266


  • the light – I used a 8 element NeoPixel bar


  • connection wires


  • an MQTT broker for
  • optionally an IoT platform like Node-Red
  • Arduino IDE for compile and program the ESP8266

When the button is pressed the ESP turn on and try to connect to the WiFi, if the board can not connect automatically switch on access point mode and ask to choose the WiFi and insert the password.

  • Once the WiFi is connected the board immediately connect to an MQTT server and the light become blue.
  • After the subscription to the confirmation message queue the board send a message on the queue:
  • When the message is sent the board wait for an answer on the queue
  • If this message contain the string “OK” the light become green, otherwise red.

When you can see the feedback light (green or red) you can turn off the board clicking the  button once again.



  1. Where did you get the button enclosure? It looks quite good!



    1. It’s an indoor battery powered light found in a little shop, originally was operating with 5 white leds … but with 8 Neopixel and an ESP look perfect!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.