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)

img_20161104_153113

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

esp

  • the light – I used a 8 element NeoPixel bar

12661-01a

  • connection wires

Software:

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

Simple!

Email this to someoneShare on FacebookShare on Google+Share on LinkedInTweet about this on TwitterPin on PinterestPrint this page

5 Comments


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

     

    Reply

    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!

      Reply

Leave a Reply

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