Development of OH3 GPIO binding

Hi,

I am using OH since a longer time and plan to upgrade my OH2.5 to OH3. I am using raspberry GPIO 1.x binding for my motion-sensors. Before I am starting to develop a OH3 GPIO binging I wanted to ask you first, whether there is a specific reason, why GPIO has not been developed yet? Are there architectural decisions/reasons for it? Or should I just jump into it and start with the development? I would call it “GPIO digital input binding” - would that be ok or should it be more specific like “GPIO motion sensor binding”?

Thank you and BR
Tobi

For reference

it looks like someone was/is already working on an implementation.

Edit:
Just recognized that this is your first post here.
So welcome here and thanks for your encouragement to contribute to openHAB. :slight_smile:
Maybe you can help out finalize the existing Pull Request. It is open for quite a while as it seems.

1 Like

Nils and me are already working on that. I think it’s close to be finalized.

5 Likes

This is cool - thank you for developing it. May I help testing? I didn’t compiled the latest source yet but started with the last jar-file of the binding that I could find (org.openhab.binding.gpio-3.1.0-SNAPSHOT.jar). I defined things / items (Contact and Switch to test) via file and via gui - they went online - unfortunately the item state stays “NULL”. A direct call “pigs r 18” shows the current state of the gpio intput (0/1). Logging with debug didn’t showed me additional hints. Sorry for being so silly … What should I do next, how can I help you best with testing?

Edit: In between I compiled the binding locally / while loading “things” the following error occurred:

020-12-29 13:28:47.110 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while calling thing handler factory 'org.openhab.binding.gpio.internal.GPIOHandlerFactory@11ed1e9': class org.openhab.core.thing.internal.ThingImpl cannot be cast to class org.openhab.core.thing.Bridge (org.openhab.core.thing.internal.ThingImpl and org.openhab.core.thing.Bridge are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @f3b790) java.lang.ClassCastException: class org.openhab.core.thing.internal.ThingImpl cannot be cast to class org.openhab.core.thing.Bridge (org.openhab.core.thing.internal.ThingImpl and org.openhab.core.thing.Bridge are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @f3b790)
1 Like

Has this been solved, any solution for GPIO binding for OH3 ?

Thanks

Yes, in the post you replied to the author of the new binding replied that they were developing an OH3 replacement.

Thanks, i will give it a try and update back sometimes this week. :beers: