Hi There,
I added a feature to the mcp23017-binding and want to test it now on my local raspi/openhabian.
I build the jar from the modified source with maven
mvn clean install
and ive got a org.openhab.binding.mcp23017-2.3.0-SNAPSHOT.jar in the target-folder.
Than I replaced the existing (and working) jar in
/srv/openhab2-userdata/tmp/mvn/org/openhab/binding/org.openhab.binding.mcp23017/2.3.0-SNAPSHOT
and restart the openhab2-service.
After that, I find this message in the log:
2018-07-10 17:02:16.794 [DEBUG] [org.openhab.binding.mcp23017 ] - BundleEvent INSTALLED - org.openhab.binding.mcp23017
2018-07-10 17:02:16.876 [DEBUG] [org.openhab.binding.mcp23017 ] - BundleEvent RESOLVED - org.openhab.binding.mcp23017
2018-07-10 17:02:16.933 [ERROR] [org.openhab.binding.mcp23017 ] - Component descriptor entry 'OSGI-INF/*.xml' not found
2018-07-10 17:02:16.936 [DEBUG] [org.openhab.binding.mcp23017 ] - BundleEvent [unknown:512] - org.openhab.binding.mcp23017
The linked things and items are not working now.
What is wrong with my jar? What do I wrong?
Please help
Igor
opus
(Jürgen Baginski)
July 10, 2018, 3:17pm
2
You should have placed the changed .jar into the add-ons folder.
Did you have done any changes regarding channels and configuration, you should delete the old things and create new ones with with your new binding.
Which jar should I replace?
find / -name "org.openhab.binding.mcp23017-2.3.0-SNAPSHOT.jar"
/var/lib/openhab2/tmp/mvn/org/openhab/binding/org.openhab.binding.mcp23017/2.3.0-SNAPSHOT/org.openhab.binding.mcp23017-2.3.0-SNAPSHOT.jar
/srv/openhab2-userdata/tmp/mvn/org/openhab/binding/org.openhab.binding.mcp23017/2.3.0-SNAPSHOT/org.openhab.binding.mcp23017-2.3.0-SNAPSHOT.jar
?
Additional Info: The binding was initially installed via the paper-ui. Is there a better way to install it?
removed all the Things, same error
:-/
opus
(Jürgen Baginski)
July 10, 2018, 5:04pm
6
You should have deinstalled via PaperUI what you have installed via PaperUI.
You could/should check using the Karaf console (command bundle:list) if the binding is reinstalled. If not you can remove it via the console.
A customized .jar should be installed by simply dropping it into the add-ons folder.
Thank you for your answer. I removed all existing mcp23017-binding-Infos by deinstalling via paper-ui and removing the tmp-folders. Checked: Its really gone!
Than installing the customized jar via
cp ... /srv/openhab2-sys/addons
The Log says:
2018-07-10 19:44:12.295 [INFO ] [org.apache.felix.fileinstall ] - Installing bundle org.openhab.binding.mcp23017;singleton:=true / 2.3.0.201807090935
2018-07-10 19:44:12.339 [DEBUG] [org.openhab.binding.mcp23017 ] - BundleEvent INSTALLED - org.openhab.binding.mcp23017
2018-07-10 19:44:12.647 [DEBUG] [org.openhab.binding.mcp23017 ] - BundleEvent RESOLVED - org.openhab.binding.mcp23017
2018-07-10 19:44:12.660 [ERROR] [org.openhab.binding.mcp23017 ] - Component descriptor entry 'OSGI-INF/*.xml' not found
2018-07-10 19:44:12.662 [DEBUG] [org.openhab.binding.mcp23017 ] - BundleEvent [unknown:512] - org.openhab.binding.mcp23017
2018-07-10 19:44:12.666 [INFO ] [org.apache.felix.fileinstall ] - Started bundle: file:/usr/share/openhab2/addons/org.openhab.binding.mcp23017-2.3.0-SNAPSHOT.jar
So, it doesnt help.
As my next step, I’ll comapre my jar against the working, unchanged jar. Or do you have any better idea?
Thank you,
Igor
I’ve compared the jars. In my jar, the file
\OSGI-INF\org.openhab.binding.mcp23017.internal.Mcp23017HandlerFactory.xml
was missing. Ive taked it over, now it works.
Thank you!
opus
(Jürgen Baginski)
July 11, 2018, 4:09am
9
Why didn’t you test the changed binding in the IDE in the first place?
MCP23017
(Igor)
July 11, 2018, 5:35pm
10
The IDE runns on my Laptop. My laptop dont have a I2C-Interface, so I cant use MCP23017-Chips with it.