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

:sunglasses:

So the 3.15.0.OH2 is the proxy and the 3.14.0 is the actual serial driver???

When I rebooted with the 2.5 binding, it would look for the serial port on tty/devACM0 and not find it. When I went into the dongle configuration in PaperUI, I would see two options for the serial port: tty/devACM0 and tty/devAMA0 (I think). Selecting the ACM0 option and soft resetting the dongle would restart the ZWave bundle, and then the serial port would be found. After that, the AMA0 port would disappear until the next reboot.

Is one of those ports the proxy?

I’m not familiar with how the list of ports that you see in PaperUI gets created. It is not part of the binding - it’s populated in another bundle which is part of the UI.
The proxy is really only at API level - I’m basically saying that the binding communicates through a middle layer - the ESH serial port layer. This layer decides if the device is a normal serial port, in which case it uses nrjavaserial, or if it is an IP port, in which case it does something else (I don’t know where this magic is done).

No, I don’t think do. I’m not sure why there are two versions loaded. The OH2 version fixed some issues with the standard version, but the system will likely just use the OH2 version.

1 Like

Well with the current (2.5.0~S1575-1 ) openhab and zwave, I’m not getting the serial provider error.

I have the exact same issue as the OP. Restarts of OH2 service wont bring up the Zwave binding, I manually have to restart the binding for it to come online. I use ser2net/socat solution. /dev/tty* lists the device just fine, system can see it but the only way to get it to work after a restart is to either A) restart the entire machine, or restart the binding.

@chris, just a heads up. I’ve seen the same with S1572 and now S1575, where the binding does not start when OH starts. I will catch logs next time I restart. I am using a manual install of the latest snapshot version of the zwave binding (2.5.0.201904202118), and have openhab-transport-serial installed. When listing features, I do not see the openhab-core.io-transport-serial installed, even after it starts. I assume this is the new name for the ESH serial transport? I don’t recall seeing this before ESH was reintegrated, so assume it is the new name. I’ve now manually installed this, in case it helps.

It looks like I may need to be making some changes to the manual install skip soon :slightly_smiling_face:.

Side note… I’m seeing mains powered devices stuck at Ping for a very long time in recent bindings.

What exactly are you looking at - can you send me the list ? I’d need to trace through the feature tree to see what bundles should be installed. I did have a quick look at this a couple of weeks back and it looked like the serial transport feature included all the required bundles, but maybe something is missing.

I don’t think there have been any changes for quite a long time. The last change that wasn’t either to the database, or build system was over 3 weeks ago, and that was only to avoid requesting the manufacturer data if it was already known ( so this is later in the init sequence). The only other change in semi recent times is the serial port class change, but that would cause more fundamental issues that ping.

This was after I manually installed it though…

openhab> feature:list |grep serial
openhab-binding-lgtvserial                        β”‚ 2.5.0.SNAPSHOT   β”‚          β”‚ Uninstalled β”‚ openhab-addons-2.5.0-SNAPSHOT        β”‚ LG TV Serial Binding
openhab-binding-serialbutton                      β”‚ 2.5.0.SNAPSHOT   β”‚          β”‚ Uninstalled β”‚ openhab-addons-2.5.0-SNAPSHOT        β”‚ Serial Button Binding
openhab-binding-serial1                           β”‚ 1.14.0.SNAPSHOT  β”‚          β”‚ Uninstalled β”‚ openhab-addons-2.5.0-SNAPSHOT        β”‚ Serial Binding
openhab-core-config-serial                        β”‚ 2.5.0.SNAPSHOT   β”‚          β”‚ Started     β”‚ distro-2.5.0-SNAPSHOT                β”‚
openhab-core-config-discovery-usbserial           β”‚ 2.5.0.SNAPSHOT   β”‚          β”‚ Started     β”‚ distro-2.5.0-SNAPSHOT                β”‚
openhab-core-io-transport-serial                  β”‚ 2.5.0.SNAPSHOT   β”‚ x        β”‚ Started     β”‚ distro-2.5.0-SNAPSHOT                β”‚
openhab-core-io-transport-serial-javacomm         β”‚ 2.5.0.SNAPSHOT   β”‚          β”‚ Uninstalled β”‚ distro-2.5.0-SNAPSHOT                β”‚
openhab-core-io-transport-serial-rxtx             β”‚ 2.5.0.SNAPSHOT   β”‚          β”‚ Started     β”‚ distro-2.5.0-SNAPSHOT                β”‚
openhab-core-io-transport-serial-rfc2217          β”‚ 2.5.0.SNAPSHOT   β”‚          β”‚ Started     β”‚ distro-2.5.0-SNAPSHOT                β”‚
openhab-transport-serial                          β”‚ 2.5.0.SNAPSHOT   β”‚ x        β”‚ Started     β”‚ distro-2.5.0-SNAPSHOT                β”‚ Serial Transport
openhab.tp-serial-javacomm                        β”‚ 2.5.0.SNAPSHOT   β”‚          β”‚ Uninstalled β”‚ distro-2.5.0-SNAPSHOT                β”‚
openhab.tp-serial-rxtx                            β”‚ 2.5.0.SNAPSHOT   β”‚          β”‚ Started     β”‚ distro-2.5.0-SNAPSHOT                β”‚
openhab> list -s |grep serial
233 β”‚ Active β”‚  80 β”‚ 3.14.0                β”‚ com.neuronrobotics.nrjavaserial
234 β”‚ Active β”‚  80 β”‚ 3.15.0.OH2            β”‚ com.neuronrobotics.nrjavaserial
267 β”‚ Active β”‚  80 β”‚ 2.5.0.201904190323    β”‚ org.openhab.core.config.discovery.usbserial
268 β”‚ Active β”‚  80 β”‚ 2.5.0.201904190323    β”‚ org.openhab.core.config.discovery.usbserial.linuxsysfs
269 β”‚ Active β”‚  80 β”‚ 2.5.0.201904190324    β”‚ org.openhab.core.config.serial
271 β”‚ Active β”‚  80 β”‚ 2.5.0.201904190317    β”‚ org.openhab.core.io.transport.serial
272 β”‚ Active β”‚  80 β”‚ 2.5.0.201904190321    β”‚ org.openhab.core.io.transport.serial.rxtx
273 β”‚ Active β”‚  80 β”‚ 2.5.0.201904190322    β”‚ org.openhab.core.io.transport.serial.rxtx.rfc2217

Yeah… I said recent, but it’s been longer than that :blush:. I can’t pinpont when it started and I haven’t been watching zwave very closely for a while. It’s not a big bother, since everything gets going eventually. Totally unrelated to the serial issue.

Ok, to be honest I don’t know what all these features do (one of the joys of OH - there’s just too many parts these days!).

When I checked a while back, the zwave feature calls up another feature, which appears to call up a load more serial features. However, I don’t really know what all the bundles that are ultimately loaded do these days as the new ESH classes provide a layer of fog to the whole process :frowning:

So, there are two questions - what is loaded and when, and what is needed, and I’m not 100% sure of either. I will try and spend some time to work through the list…

1 Like

You might want to jump in here while Markus is looking into this…

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