Installed GPIO Binding in OH2 and GPIO pins are not woring

conf/services/openhab.conf

Just a thought… are you using the right “pin 4”? the numbering of the GPIO pins can be a bit confusing sometimes

I have done all the ways and installed again but the pins i define in the items file is not working.Please help me out regarding this.I have installed GPIO binding in paper UI

@praveen_kumar

Have you got ALL the prerequisites as specified the GPIO binding doc?
https://docs.openhab.org/addons/bindings/gpio1/readme.html#prerequisites

Do ALL these first

And i have seen few examples that there is no more openhab.cfg file in updated version

@vzorglub Yeah just now tried all prerequisites as specified but its not sending any signal to GPIO pin

Yes there is
conf/services/openhab.cfg

I can find these files in that folder

  1. addons.cfg
  2. basicui.cfg
    3.classicui.cfg
    4.logging.cfg
    5.readme.txt
    6.rrd4j.cfg
    7.runtime.cfg

look in runtime.cfg

runtime.cfg has this lines

##################### LOCALE ####################

# The default language that should be used. If not specified, the system default locale is used.
# The ISO 639 alpha-2 or alpha-3 language code (if there is no alpha-2 one).
# Example: "en" (English), "de" (German), "ja" (Japanese), "kok" (Konkani)
#
#org.eclipse.smarthome.core.localeprovider:language=

# The region that should be used.
# ISO 3166 alpha-2 country code or UN M.49 numeric-3 area code.
# Example: "US" (United States), "DE" (Germany), "FR" (France), "029" (Caribbean)
#
#org.eclipse.smarthome.core.localeprovider:region=

################ PERSISTENCE ####################

#  The persistence service to use if no other is specified.
#
#org.eclipse.smarthome.persistence:default=

################### AUDIO #######################

# This parameter defines the default audio source to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.audio:defaultSource=

# This parameter defines the default audio sink to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.audio:defaultSink=

##################### VOICE ####################

# This parameter defines the default text-to-speech service to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.voice:defaultTTS=

# This parameter defines the default speech-to-text service to use (if not set, the first available one will be used.
#
#org.eclipse.smarthome.voice:defaultSTT=

# The default voice to use if no specific TTS service or voice is specified.
#
#org.eclipse.smarthome.voice:defaultVoice=

# The default human language interpreter to use if no other is specified.
#
#org.eclipse.smarthome.voice:defaultHLI=

################ MISCELLANOUS ####################

# The karaf sshHost parameter configures the bind address for the ssh login to karaf.
# Default is 127.0.0.1 (localhost), so it is only possible to login from the local machine.
#
# Setting this to the address of another network interfaces will allow login from this network.
# Setting this to 0.0.0.0 will allow login from all network interfaces.
#
# !!! Security warning !!!
#   Remember to change default login/password, if you allow external login.
#   See http://docs.openhab.org/administration/console.html for details.
#
#org.apache.karaf.shell:sshHost = 0.0.0.0

# Setting this to true will automatically approve all inbox entries and create Things for them,
# so that they are immediately available in the system (default is false)
#
#org.eclipse.smarthome.inbox:autoApprove=true

# This setting allows to switch between a "simple" and an "advanced" mode for item management.
# In simple mode (autoLinks=true), links and their according items are automatically created for new Things.
# In advanced mode (autoLinks=false), the user has the full control about which items channels are linked to.
# Existing links will remain untouched. (default is true)
#
#org.eclipse.smarthome.links:autoLinks=false

In the services folder create a file called gpio.cfg
In the file put:

sysfs=/sys
debounce=10

Restart OH

On the raspberry pi adding openhab user to the gpio group doesn’t work you need to:

If you chose above to add the openhab user to the gpio group, then you shouldn’t make the changes below to run as root. If you did not add the openhab user to the gpio group, make a further edit to /etc/default/openhab:

USER_AND_GROUP=root:root

And then edit /usr/lib/systemd/system/openhab.service and set the following:

User=root
Group=root

Hi, I have the same issue, but I installed GPIO binding via Paper UI, and as I can see sysfs=/sys option is already defined. :confused: