Binding-GPIO in OH2 does not working

Hello
i’m new to openhab so
i have problems in GPIO binding i’m trying a simple exemple to turn ON and OFF LED with my raspberry pi3
1- i have installed OH2 in raspbian
2- i have used openhab cloud connector and it worke
3- after configuration i have recived information from sensor (DHT22)conecting with ESP8266
4-i have installed GPIO binding (paper UI)
5-my item

        Switch Outlet1 "Outlet 1"    {mqtt=">[broker:/home/test/1:command:on:ON],>[broker:/home/test/1:command:off:OFF],<[broker:/home/test/1:state:default"}

6-my simap

sitemap default label=“Outlets”
{
Frame label=“Outlet Control”{
Switch item=Outlet1
}
}

7- when i run the proramme with MQTT.fx i get :

8- help me pleaz :rofl:

when i presse on the switch no change happen on the led but i get information on MQTT.fx

GPIO, ESP8266 and MQTT a different things.
For GPIO you only neeed the GPIO-Binding https://docs.openhab.org/addons/bindings/gpio1/readme.html

hi hr_2 thankhs for you reply
i did simple exemple for this methode and it doesn’t work
i have 2 weeks with this problem , i have try a lot of solutions ,but they didn’t works , i’m newbie in openhab and Linux ,can you explain to me step by step about GPIO binding , thank you :slight_smile:

First all all you need to add autoupdate=“false” and the end of your binding configuration, or you may end up going into an mqtt infinite loop.

Switch Outlet1 "Outlet 1"    {mqtt="&gt;[broker:/home/test/1:command:on:ON],&gt;[broker:/home/test/1:command:off:OFF],&lt;[broker:/home/test/1:state:default", autoupdate="false"}

If you want to turn on a led on pin 1, you need to add the gpio binding to the switch:

Switch Outlet1 "Outlet 1"    {mqtt="&gt;[broker:/home/test/1:command:on:ON],&gt;[broker:/home/test/1:command:off:OFF],&lt;[broker:/home/test/1:state:default", gpio="pin:1", autoupdate="false"}

And that should work.
But the set up for the gpio binding is not straightforward
Have you followed all the steps from:

https://docs.openhab.org/addons/bindings/gpio1/readme.html

https://www.mksmarthouse.com/gpio-binding


https://kurlan.github.io/scrappy-home-automation/binding-a-sensor/
https://klenzel.de/3108
etc.