How to automate appliances using Raspberry pi GPIO pins directly in openhab

I am looking to automate appliances by connecting relay board to the raspberry pi GPIO pins so, how can I automate.Please refer any code for that in openhab

Hi Praveen, search the forum
Read the GPIO binding refered to above
We are not here to write code for you or search for info for you.
Have a go with the information in the docs and in the forum. It’s likely someone has asked the question before.
If it doesn’t work then come back and we’ll help

1 Like

Here you will find some examples to directly control the GPIO pins of the raspberry that you have openhab installed on. A simple search for “GPIO” on the forum that you could have done yourself, would have brought that up:

If you want to use the GPIO pins of a raspberry that your openhab is not installed on, have a look here:

Once you can control the pins, all you need to do is hang a relay on them and start making rules to switch the relays on and off.