I2c + mcp23017

Hello,

I have the same issue. I enable I2C and I’m able to use the mcp23017 via python but when it comes to openhab and the mcp23017-binding I get the following error:

2020-03-11 21:00:09.213 [hingStatusInfoChangedEvent] - 'mcp23017:mcp23017:chipA' changed from UNINITIALIZED to INITIALIZING

2020-03-11 21:00:09.268 [hingStatusInfoChangedEvent] - 'mcp23017:mcp23017:chipA' changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Tried to access not available I2C bus: null

2020-03-11 21:00:09.269 [hingStatusInfoChangedEvent] - 'mcp23017:mcp23017:chipA' changed from OFFLINE (CONFIGURATION_ERROR): Tried to access not available I2C bus: null to ONLINE

==> /var/log/openhab2/openhab.log <==

2020-03-11 21:00:09.339 [ERROR] [ome.core.thing.link.ThingLinkManager] - Exception occurred while informing handler: null

java.lang.NullPointerException: null

	at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionPin(GpioControllerImpl.java:546) ~[?:?]

	at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionPin(GpioControllerImpl.java:539) ~[?:?]

	at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionDigitalInputPin(GpioControllerImpl.java:640) ~[?:?]

	at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionDigitalInputPin(GpioControllerImpl.java:668) ~[?:?]

	at org.openhab.binding.mcp23017.internal.handler.Mcp23017Handler.initializeInputPin(Mcp23017Handler.java:179) ~[?:?]

	at org.openhab.binding.mcp23017.internal.handler.Mcp23017Handler.channelLinked(Mcp23017Handler.java:223) ~[?:?]

	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.lambda$0(ThingLinkManager.java:267) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_222]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

I used the thing and item as it is described in the official description.

I already tried the following two “solutions”:
https://community.openhab.org/t/mcp23017-error/74202/10?u=brainpain

https://community.openhab.org/t/solved-mcp23017-binding-does-not-work/87867?u=brainpain

I downloaded the mentioned jar-files and put them into the folder “usr\share\openhab2\addons” but I do not know how to install it.

At the moment I am just despaired :frowning: Is there anybody who could help?

Thank a lot and regards
BrainPain