Gpio on openhab2

has to go into an items file (for example gpio.items):
http://docs.openhab.org/configuration/items.html

has to go into a rules file (for example gpio.rules):

http://docs.openhab.org/configuration/rules-dsl.html

Hi,

thanks for help.

I’ve done that but see no changes in the openhab2 screens. I cannot see anything related to the changes I’ve made.

Looking further I noticed something to do with Widgets? is this where I need to configure the GPIO pins?

if I can figure out how to control one of the pins I should be able to then replication for the other 8 I am using.

Thanks again for your help and any help anyone can offer.

Raj
configuration
Image file of openhabian
Raspberry Pi Model B

No, widgets have nothing to do with GPIO pins.
It looks like you are completely new to openHAB, so it is always a good idea to read the docs and set up the demo files.
After playing around with that and seeing some success, you should start adding bindings to connect your hardware to openHAB (for example the GPIO pins of your RPi).

The basics you have to read can be found here:

http://docs.openhab.org/tutorials/beginner/index.html

Hi there. Apparently, this is an outdated binding not compatible with OH2. Needs to be rewritten, but author has lost interest. Meantime looking into direction of controlling my boiler via Exec binding and simple scripts that work well.
My setup: OpenHABian, Orange Pi, 2 channel relay.

Hello
Im trying to fetch a value from 1w (GPIO) and use that to control my heating but I cannot get it to work. Later on I would like to be able to set the temperature from a “selection-widget”.

My rule:
import org.openhab.model.script.actions.*

rule "temperature"
when
        Item onewiretemp1 received update
then
    if(onewiretemp1Value.value <= 26) {
    channel4.sendCommand(ON)
    }
else if(onewiretemp1Value.value >= 26) {
    channel4.sendCommand(OFF)
    }

end

If I check the logs I can see changes:
2018-04-29 15:52:52.540 [vent.ItemStateChangedEvent] - onewiretemp1Value changed from 25.5 to 25.4

I have also tried onewiretemp1Value.state

Got it to work now.

rule "temperature"
when
        Item onewiretemp1Value received update
then
    if (onewiretemp1Value.state.toString < set_tempValue.state.toString) {
    channel4.sendCommand(ON)
    }
else {
    if(onewiretemp1Value.state.toString >= set_tempValue.state.toString) {
    channel4.sendCommand(OFF)
     }
    }

end

Now I just need to fine-tune it a bit :smiley: