No SerialPort Provider error with Ubuntu 18.04 and Zwave 2.5.x snapshot

So here’s what I get if I follow the feature tree through (it’s VERY convoluted!!) -:

<feature name="openhab-binding-zwave" description="Z-Wave Binding" version="${project.version}">
    <feature>openhab-runtime-base</feature>
    <feature>openhab-transport-serial</feature>
    <feature name="openhab-transport-serial" description="Serial Transport" version="${project.version}">
        <bundle>mvn:org.openhab/nrjavaserial/${nrjavaserial.version}</bundle>
        <feature>openhab-core-io-transport-serial-rfc2217</feature>
        <feature name="openhab-core-io-transport-serial-rfc2217" version="${project.version}">
            <feature>openhab-core-base</feature>
            <requirement>openhab.tp;filter:="(&amp;(feature=serial)(impl=rxtx))"</requirement>
            <feature dependency="true">openhab-core-io-transport-serial-rxtx</feature>
            <feature name="openhab-core-io-transport-serial-rxtx" version="${project.version}">
                <feature>openhab-core-base</feature>
                <requirement>openhab.tp;filter:="(&amp;(feature=serial)(impl=rxtx))"</requirement>
                <feature dependency="true">openhab.tp-serial-rxtx</feature>
                <bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial/${project.version}</bundle>
                <bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial.rxtx/${project.version}</bundle>
            </feature>
            <requirement>openhab.tp;filter:="(feature=commons-net)"</requirement>
            <feature dependency="true">openhab.tp-commons-net</feature>
            <bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial/${project.version}</bundle>
            <bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial.rxtx.rfc2217/${project.version}</bundle>
        </feature>
        <feature>openhab-core-config-serial</feature>
        <feature name="openhab-core-config-serial" version="${project.version}">
            <feature>openhab-core-base</feature>
            <feature>openhab-core-io-transport-serial</feature>
            <feature name="openhab-core-io-transport-serial" version="${project.version}">
                <feature>openhab-core-base</feature>
                <requirement>osgi.service;filter:="(objectClass=org.eclipse.smarthome.io.transport.serial.SerialPortManager)"</requirement>
                <requirement>osgi.service;filter:="(objectClass=org.eclipse.smarthome.io.transport.serial.SerialPortProvider)"</requirement>
                <feature dependency="true">openhab-core-io-transport-serial-rxtx</feature>
                <feature name="openhab-core-io-transport-serial-rxtx" version="${project.version}">
                    <feature>openhab-core-base</feature>
                    <requirement>openhab.tp;filter:="(&amp;(feature=serial)(impl=rxtx))"</requirement>
                    <feature dependency="true">openhab.tp-serial-rxtx</feature>
                    <bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial/${project.version}</bundle>
                    <bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial.rxtx/${project.version}</bundle>
                </feature>
                <bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.transport.serial/${project.version}</bundle>
            </feature>
            <bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.serial/${project.version}</bundle>
        </feature>
        <feature>openhab-core-config-discovery-usbserial</feature>
        <feature name="openhab-core-config-discovery-usbserial" version="${project.version}">
            <feature>openhab-core-base</feature>
            <bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.discovery.usbserial/${project.version}</bundle>
            <bundle>mvn:org.openhab.core.bundles/org.openhab.core.config.discovery.usbserial.linuxsysfs/${project.version}</bundle>
        </feature>
    </feature>
    <bundle start-level="80">mvn:org.openhab.binding/org.openhab.binding.zwave/${project.version}</bundle>
</feature>

This is a reasonably complete feature tree although I obviously didn’t follow the core feature which call’t up loads of stuff!. It does include the feature openhab-core.io-transport-serial, so it should be loaded.

I don’t spot anything obvious in here that isn’t loaded, but I’m far from an expert in this, and as I said, it’s pretty convoluted as to how the different features are called up, so I might well be missing something.

How did you generate that?! Markus has provided some info in the issue I linked.

By hand! Cut and paste of the different features, then reformatting the XML.

Rats… I was hoping there was a tool that I didn’t know about!

Maybe there is - but I also don’t know :slight_smile:

When you find it, let me know as it’s something that would be super useful to try and understand this sort of thing. I really get the feeling that OH is not well configured, and looking at the way these features all link in a convoluted way, my feeling is now even stronger :wink:

Hope it’s ok to use this thread:

Same issue as listed above with 1577:

Every restart of openhab kills serial port of Zwave stick:

Serial Error: Port {0} does not exist
In thing correct serial /dev/ttyACM0 is selected.

(Maybe index 0 of port list not set anymore?)

I have to delete thing and add it after every restart of Ubuntu or openhab

1 Like

OSearched for it some further time and looked for that serial bug on github. I got three versions active :confused:

openhab> list -s |grep serial
212 │ Active │  80 │ 3.14.0                │ com.neuronrobotics.nrjavaserial
213 │ Active │  80 │ 3.15.0.OH2            │ com.neuronrobotics.nrjavaserial
246 │ Active │  80 │ 2.5.0.201904260323    │ org.openhab.core.config.serial

As said above, there is currently an issue with the nrjavaserial lib that is loaded in multiple versions (3.14.0 and 3.15.0) and may cause instability while accessing serial ports from various bindings, not just Zwave.
See here: https://github.com/openhab/openhab-core/issues/750.
The issue is already being handled by OH2 core maintainers, will probably be solved in the next snapshots versions.

1 Like

Thanks for answer and sorry if I overread this answer in the thread. :pensive:

There’s now a workaround for this issue available in build #1650 and newer! :slight_smile:

2 Likes