GPIO input pin

Platform information:

  • Hardware: Raspberry Pi 3
  • OS: Linux/5.15.76-v7+ (arm)
  • Java Runtime Environment: Raspbian 11.0.18 (undefined)
  • openHAB version: 3.4.3

I had OH 2.5 running with some pins configured as “contact”. With applying 3V to the pin OH was taking the pin as ON. I used this for rules.
Now with OH 3.4 I defined the pin as switch for input. But with this configuration the Pi crashes when 3V are supplied to the pin.
I then tried to pull the pin to ground by a button. But this in not detected by OH as closed switch.

I use the binding GPIO - Bindings | openHAB. I can control an output pin e.g. switching on/off a LED. That works fine.

How do I use the pin for input? How to wire the raspberry that OH 3.4 detects the switch as closed?

Are you using the GPIO binding?

I added the information in the first post. Sorry for missing that one.



That‘s how I configure an input from an analog signal of around 3V.
Is it possible , that you don’t use the internal pull-down resistance?

Thank you for your input. I did not have the pull down at first place. I did not know about it.
I now installed as you documented above. My button is connected to 3V (as it was in the past with OH 2.5). When pushing the button the Raspberry stopped working, all lights went off. I rebooted twice now. I can only access openhab platform with nothing working any more (Jeelink- Zwave-stick…).
It probably killed the Raspberry :cry: .

Maybe you burned your raspi. All inputs should be protected with a 1 kOhm resistor, to restrict the max. current. If you don‘t use the internal pull down resistance, your input is floating between On and Off state when the contact is open