Gpio pins in raspberry and openhab

could the GPIO pins in raspberry pi be used with openhab to control something ( eg. a led ) ?!

You can find all the add-ons here, there is one for GPIO.

If you want to control pins on a remote Pi or even just because, you could use MQTTany. This method would require you to have an MQTT broker setup and also install the MQTT add-on. I am working on a major upgrade for MQTTany that will also add Homie support, which means automatic discovery will be available to easy setup in openHAB.

2 Likes

isn’t there any guide for using the GPIO binding with openhab to control relays or leds ?

Do you need a binding for that ? You can control the GPIO pins by using shell or python commands.
See e.g. http://wiringpi.com/the-gpio-utility/
https://www.raspberrypi.org/documentation/usage/gpio/python/README.md

I imagine someone has written one, you could search the forum for it. I’m not running openhab on a Pi so I’ve never used the binding.

Install GPIO binding

Follow example like

Switch LED "LED" { gpio="pin:1" }