Esp easy and ha..mqtt

Hi all.
Just flashed espeasy on nodemcu 1.0.
I can see that mqtt is connected, but I cant send states. Nothing happens.
I’ve connected a physical button to GPIO10 on esp board. Now I want to control GPIO on Home Assistant. What to do
Cant find anything on forums ;-(
Anybody with some examples?

Hope for some help.
This is killing me :frowning:

Have you checked Youtube? There were several good tutorials.

I have played with Node-red to send from a Pi to HA, the diagnostic node helps a lot to show what you are sending and what HA is receiving.

Check my post here:

So this one is made for external button to control home assistant GPIO?
thnks. Can you just post the pictures as a message, and Yaml conf for buttons. thanks

All the pics and yaml are in the post I linked.

thanks. Last question. What to add in yaml to control GPIO from esp8266 button. That is what is confusing me :frowning:
You’re controling relays from ESP board. Right?

No need to enable button to relay via HA.
ESPEasy allows you to link the button to relay, and still control the relay from MQTT.
Its in my instructions:

#5 Rules Tab
I have a single rule currently defined, which switches the relay based on the pcb switch being pushed - i.e. to mimic Sonoff OOB behaviour:

Ok, thanks. Will try that. What about mqtt line in HA? Do you have that one?

Thanks a lot

Hi,

In HA, you should add like this:

- platform: mqtt
  state_topic: "/terraza/cmd/#"
  command_topic: "/terraza/cmd"
  name: "Persiana Terraza"
  payload_open: "event,subirpers"
  payload_close: "event,bajarpers"
  payload_stop: "gpio,2,0"

In that case, when i press button in HA, sends a mqtt package, with payload that you can see.

Thanks.
Also the yaml for my mqtt config for espeasy is all in the post I linked:#