Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Gpio Binding doesn't work correct with pin 17 and 4 #5905

Open
FirstWithThisName opened this issue Oct 16, 2019 · 0 comments
Open

Gpio Binding doesn't work correct with pin 17 and 4 #5905

FirstWithThisName opened this issue Oct 16, 2019 · 0 comments

Comments

@FirstWithThisName
Copy link

FirstWithThisName commented Oct 16, 2019

If openhab reloads the item file with the gpios this error messages appears:

2019-10-16 14:19:41.649 [ERROR] [ab.binding.gpio.internal.GPIOBinding] - Error occurred while creating backend object for item RELAY_1, exception: The pin with number '17' is already registered
2019-10-16 14:19:41.795 [ERROR] [ab.binding.gpio.internal.GPIOBinding] - Error occurred while creating backend object for item RELAY_2, exception: The pin with number '4' is already registered

This is a snippet my related items file:
`
/* relays connected to gpio */

Switch RELAY_1 "RELAY_1" { gpio="pin:17 force:yes" }
Switch RELAY_2 "RELAY_2" { gpio="pin:4" }
Switch RELAY_3 "stall" (outdoor, light) { gpio="pin:16" }
`
I have more gpios in use, and the work fine.
After a reboot, all pins are working as expected.
I found out that the pins are configured as input by looking at the file /sys/class/gpio/gpio(4|17/direction

After changing the direction I am able to control them via bash, but don't via openhab.
If openhab reloads the items file I get the same error message.

I am using a raspberry pi b+ with raspbian and openhab version 2.4.0.
The user openhab is member of openhab tty dialout pi bluetooth gpio.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant