Try to Modify zwave binding and install new JAR in the addons directory (that fails gnu.io can not be resolved)

Tags: #<Tag:0x00007fc8f5826fc0>

hi all
i have mini key pad an tried to add the dongle (rfid chips) usercode.
They will send to their id to the USER_CODE_REPORT. This code may be a 10 Byte Hex Number.

The current implementation accepts only 10 digits (check parse as Integer). I Tried to change this in ZWaveUserCodeCommandClass#setUserCode

what have i done

I am running OH 2.0.

ninstall the orginal OH Zwave Binding ,
Cloned the GIT repo from Branch 2.0
changed the Java Class
made mvn clean install
and put the new zwave jar into adons directory in the openhab installation
====================== SNIP ===========================
2017-02-12 19:09:00.594 [ERROR] [org.openhab.binding.zwave ] - FrameworkEvent ERROR - org.openhab.binding.zwave
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.zwave [201]
Unresolved requirement: Import-Package: gnu.io

    at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:

]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:
]

====================== SNIP END =======================
OH tries to install the bundle.
This fails, because gnu.io can not be resolved.

Do i have to install a second bundle ?

Thank in advance
Alexander

fixed

i found the answer

ssh openhab@localhost -p8101
feature:install openhab-transport-serial

9 Likes

Is manually installed features supposed to stay installed after an oh upgrade? Just asking because every time I upgrade I have to install openhab-transport-serial manually again for the ZWave binding to work.

I had the same problem, when I switched to snapshot 2.4. After installing the feature in the karafshell the addon started automatically. Great hint!

Thanks a lot!

Best regards
Andi

Same issue here; running Synology OH2.3 and every time I clear the cache/tmp directories and reboot unit - the serial binding goes away.

I solved it by adding it to this addons.cfg BUT you still will get an error on the initial clean reboot:

A comma-separated list of bindings to install (e.g. “binding = sonos,knx,zwave”)

binding = serial1,sonos,mail,airquality,caldav-command1,caldav-personal1,nest,network,ntp,onkyo,plex1,samsungtv,weather1,wemo

Error you’ll get:

2018-08-24 19:09:55.512 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/volume1/homes/openhab/addons/org.openhab.binding.zwave-2.4.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.zwave [193]
Unresolved requirement: Import-Package: gnu.io

at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [9:org.apache.felix.fileinstall:3.6.4]

2018-08-24 19:09:55.555 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/volume1/homes/openhab/addons/org.openhab.binding.zwave-2.4.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.zwave [193]
Unresolved requirement: Import-Package: gnu.io

at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [9:org.apache.felix.fileinstall:3.6.4]

Best, Jay

1 Like

I just did a clear cache as recommended here
and now get the “Unresolved requirement: Import-Package: gnu.io” issue.