Esp8266 and HA I/O help

Hey all.
Been stuck for a while.
Is it possible to control I/O on HA, with ESP8266. When I say esp8266, i mean to connect a physical button on the board…so when pressed, it activates i/o on HA. I want to control some relays on raspberry.
If yes, please send some examples. Thanks.

What you are describing is normally done by writing a sketch for the ESP8266 that sends an MQTT message to HA when the button is pressed. There are lots of examples in blogs on the web, and even in this forum.

You can set HA up to control the IO ports with the GPIO module when it receives the message.

1 Like

Thanks. Can you maybe point me to an example. Thanks

Take a look at the Tasmota code or espeasy code on github, or the literally hundreds of esp8266 examples scattered around the internet.

Use esphomeyaml :see_no_evil:

Should only be a matter of adding a GPIO binary sensor for the button and a GPIO switch for the relays.

1 Like