openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.85k stars 3.56k forks source link

[MCP23017] binding not working on Openhab 3 #11253

Open Fisherijus opened 2 years ago

Fisherijus commented 2 years ago

MCP23017 still does not work on Openhab3 even pi4j was updated.

Expected Behavior

MCp2017 binding initialize correctly with all its items

Current Behavior

in Paper UI it shows that binding is Online, but in logs you can see errors coming thats says: java.lang.NullPointerException: null at com.pi4j.io.gpio.impl.GpioControllerImpl.provisionPin though same configuration on OH 2 works correctly.

Context

i cannot update my openhab to a newer version.

Your Environment

Openhab 3.2 java 11 pi4j 1.4

wborn commented 2 years ago

in Paper UI it shows that binding is Online

Are you sure you use OH 3? That UI no longer exists.

Can you also post the full stacktrace?

TrigerxD commented 2 years ago

On OpenHab 3.2.0 Release Build

Hello, i am currently migrating from oh2 to oh3. I have read about this bindng that it is still not working, but for me is quite fine. One little problem, i cannot send any command to mcp pins (they are treated as input pins).

In binding configuration is some missunderstanding in output pin description

Can somebody tell me how that binding now work or if it works? MCP23017 thing is succesfully initialized and now online, however i cannot work with it from openhab MainUI.

Thats how look an switch item linked to output channel of mcp. Something is wrong and i dont know what :(

image

as i said thing is succesfully initialized

image

as i said earlier there is some missunderstanding in description but still linked item works like a contact. Even configuration in file dont work

image

adixyz commented 1 year ago

My observations: WiringPi v2.70 Pi4J v1.4 or v2.0 mcp23017 v 3.4.1 or 3.4.0

INPUT: After creating item, the status reads correctly. After restarting openhab stops working. Deleting and re-creating the INPUT item restores its operation. Restarting the mcp23017 add-on itself does not restore operation.

OUTPUT: Changing the status to ON works correctly. Changing it to OFF does not work. Random operation - sometimes it will work. I have not noticed dependencies.

No errors in the debug log.

OUTPUT PIN widget should be a switch and is a contact

pin32 commented 1 year ago

hi, i have the same problem with oh3.41, who am I news on the matter

pin32 commented 1 year ago

I don't know if the problem is fixable or not...

adixyz commented 1 year ago

Maybe the problem is this: https://github.com/openhab/openhab-addons/issues/11905#issue-1091307808

lsiepel commented 11 months ago

This issue is a bit confusing. @Fisherijus reports a NullPointerException but the following posts mention other problems.

To get any problem analyzed, it would be helpful to elaborate on the issue. What is happening, what do you expect, version used and maybe a debug log, item config, anything that is relevant.

Edit: Also this issue is raied over two yeras ago, so it would be usefull to continue any troubleshooting at current stable openHAB 4.1.x

openhab-bot commented 7 months ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/wiringpi-webiopi-bcm2835-for-relays-and-motor-drivers/151388/1

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.