GPIO binding - Read Pin state (IN, PULLUP)

Hi,
Working on garage door triggered by relay with magnetic contact.

  1. Relay working
  2. Contact almost working - manually setting it to up mode by gpio -g # mode up at openhab startup.

The problem is that openhab does not change the state of contact item when i open the gate using remote or manuall (if i use the relay i can put a rule) The pin value is changed properly but without affect on the item state. Is there a better way than put a crone rule which will read the pin state every x seconds?

Bumping since I also need this. I’m running on a RPi 1 B+ with OpenHAB 1.8.1. All GPIO states are current on the system level, but OpenHAB can’t seem to pick these changes up. OpenHAB only picks up the pin changes on startup and when I manually change configuration files requiring the runtime to refresh. If I do need to append a rule, how do I grab the pin state myself? I thought the GPIO IO jar did this automatically?

Contact Front_Door "Front Door [%s]" (gGF) {gpio="pin:23 activelow:yes force:yes", autoupdate="true"} Contact Garage_Door "Garage Door [%s]" (gGF) {gpio="pin:24 activelow:yes force:yes", autoupdate="true"}

I can’t get my rules to fetch the states either, since I can’t fill postUpdate with anything useful

rule "GPIO Sensors Update" when Time cron "0/5 * * * * ?" then <refresh Front_Door> <refresh Garage_Door> end

Did anyone find an answer or alternative solution to this as I am also facing the same problem when reading the state of a magnetic reed switch. It reads the correct state once when Openhab is started then never again until I restart openhab.