OH3.X & OH4.X Alternative Java serial provider

I did that, unfortunately it did not help

I also tried but did not have success.

When I look at the bundle:list it shows me V5.2.1 of nrjavaserial:
255 x Active x 80 x 5.2.1 x nrjavaserial

Is this correct? Or has the Version look like this “5.2.1-20220113”?

After installation
Xxx│ Active │ 80 │ │ nrjavaserial

Try update <bundle-id> file:<file location>. Updated bundle should be retained across restarts unless you do clean of data dirs.

A nrjavaserial 5.2.1.OH1 release with a fix for this annoying issue is now integrated in 3.3.0-SNAPSHOT build #2849 or newer.


Quick question on this: If I’m on a plain 3.3.0 Release Build, still experiencing this problem just yesterday after reboot, being able to fix it with this workaround, does it mean my installation misses something? Doesn’t your comment above mean that the nrjavaserial-bug should be gone in OH 3.3.0 Release Build? Or am I misunderstanding something?

I would say there is nothing missing.
You have to install a milestone release of 3.3 or go directly to 3.4.

You can check your nrjavaserial version when you check your bundles in the console:

 bundle:list | grep nrjavaserial

This one contains the fix:

5.2.1.OH1 nrjavaserial

Hmm, very odd: I just had one manifestation of the problem yesterday (Z-Wave stick not getting online after reboot), even though I have the version of nrjavaserial installed (as part of my 3.3.0 release build), which you state should already contain the fix (254 │ Active │ 80 │ 5.2.1.OH1 │ nrjavaserial)

I think I’ll then wait for 3.4, since I fear a bit installing “something manually” which cause problems later on in the process with the automatic update to 3.4.

Of course, I was wrong.
Snapshots are before the main release.
So the fix is in 3.3.0… also the update to 3.4. might not change anything then. :neutral_face:

Hmm. Anything an average user can do to incentivize a fix? Contribute to a bounty? Though I got the impression that this is a rather large bug, affecting not only openHAB users?

Yes, question your hardware setup. You might have reached the limits of your raspberry. I think the power consumption of your USB devices is high? Do you know how much they need?
When booting, your load on the raspberry is also very high…

What power supply are you using? I like the raspberry, but I think for your needs and for “production” use you need to invest a little more in your hardware.
I personally like the odroid C4 this has a 12V power supply. Bit i am also very careful when adding external devices.
The best think might be a thin PC…

When did your issue start?
Did you also try the alternative provider described in this topic?

this issue is much larger then openHAB and has been on going for some time.

I remember @splatch created an alternative serial provider… see here

I’m a bit reluctant, because I fear this will impact potential future upgrades. If this is not the case (does anyone know for sure?) I might give it a try.

Though, just wondering, why not putting the alternative java into e.g. OH 3.4? Won’t this solve the problem root-cause based?

I haven’t measured the power consumption, but the Amber Wireless AMB8465 and the Aeotec Z-Wave Gen5+ don’t even get warm, so they can’t draw that much power. I mean, I can’t rule it out, but (even though I’m not a pro) I believe we’re looking at the nrjavaserial bug described above, don’t you think? The description fits 100%.

The original Raspberry 2,4 A power supply, so that looks ok to me.

It existed from day 1 onwards when I got the Aeotec Z-Wave Gen5+.

Thanks for the original post here - very helpful. This helped me get my serial ports up and running on my Mac with an M1 processor. I’ve been putting off upgrading from 2.5 for ages now because I couldn’t get the ports to work properly, hopefully this will work going forwards.

1 Like

Since Openhab 3.4.2 I don’t see the input overruns issuing problems with my serial connections. dmesg still show them, but Openhab runs smoothly. :smile:
Recently I switched to the testing branch of Openhab 4.0.0. With that, I see the serial connections issues again. Was there any change in the nrjavaserial library?
For now I switcht back to 3.4.2 but I’am afraid of the offical release.

I’m using openhab 4.0.3 (still) facing the serial connection issues. Every 1-2 weeks, suddenly no provider for usbtty isn’t found anymore.
Just installed the purejavacomm jar (as described above).
After starting the bundle, I got the message “Unresolved requirement: Import-Package: org.openhab.core.io.transport.serial; version=”[3.0.0,4.0.0)“”.
I checked my installed serial-javacomm package and saw that my installation uses the version 4.0.3.
If I’m understanding the message correctly, the version installed of the package is to new for the bundle.
Has anyone a solution to get the bundle running with OH4?

Did you try the feature:install openhab-transport-serial noted in the second post in this chain?

No, because it is imho already installed.

openhab> feature:list | grep serial
openhab-core-io-transport-serial-javacomm         │ 4.0.3            │ x        │ Started     │ distro-4.0.3             

Am I wrong?

I’m out of my league with the alternative java, but whenever I get that message, I run the command. I think there are several bundles that are installed with that command, not just one.

Yeah, the provider is bound to 3.x APIs. Because serial APIs in OH are still the same the import range is to restrictive. I’ll bring a new build for both OH versions.