How to use the free GPIO of the SOnoff Basic

How can I use the free GPIO of my Sonoff basic? I want to use the gpio to get a light feedback on when I press the button to turn a relay on. What should I enter in the configuration.yaml file? Does the Topic have to be different from the one I use to turn the light on and off?

Are you running the stock firmware or an alternate firmware?

First the sonoff has to know to send a signal before you can setup ha to interpret it.

I use tasmota firmware.

From memory, GPIO 12 controls the relay, just use that as your feedback.

With a little soldering it’s relatively easy to expose another 2 GPIO.

If i use gpio14? What i to write in the file configuratio.yaml?

Nothing. I would make that happen at the sonoff end and not involve HA at all.

Ok. How cand i do it? Example please. Hardware and software

Goto the tasmota wiki page it’s has ideas on how to use the gio pins