Esp8266 light switch

This is blowing my mind for some reason. Let me preface that I have no formal education in programming so please bear with with me.

All I’m trying to do is make a light switch to turn on and off my hue bulbs. Basically just a very simple hue tap. At this point I would be more than happy to have two momentary push buttons. One for on one for off. I figured this would be a simple arduino program on a cheapo esp8266 communicating with my raspberry pi through MQTT, but I don’t even know where to get started.

I’ve made some very simple arduino projects before and have an esp8266 with a dht11 communicating with my pi, but I am having a complete mental block basically from step 1 of getting this to work. Any help would be greatly appreciated.

I personally prefer the RESTFull approach. So I would use this https://github.com/DaKaZ/esp8266-restclient to implement a REST Client and just call the API of HA whenever you push the button with the toggle action ( no need for 2 buttons).

Hope that helps.

Cheers

aREST or Sonoff could help.

1 Like

You’ve got options in addition to what has been suggested.

http://www.esp8266.nu/index.php/Main_Page

Awesome! Thank you for the replies. I’ll take a look at these and try them out.

I use the arduino IDE firmware to flash my Sonoffs from KmanOz ( https://github.com/KmanOz/Sonoff-HomeAssistant ) which is very easy to use with Home Assistant. Thanks to KmanOz.