Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serial ports getting blocked after some re-connecting #1842

Closed
fwolter opened this issue Nov 22, 2020 · 68 comments · Fixed by NeuronRobotics/nrjavaserial#216 or #2899
Closed

Serial ports getting blocked after some re-connecting #1842

fwolter opened this issue Nov 22, 2020 · 68 comments · Fixed by NeuronRobotics/nrjavaserial#216 or #2899
Labels
external bug A problem or unintended behavior of an external library

Comments

@fwolter
Copy link
Member

fwolter commented Nov 22, 2020

When using the Modbus binding with OH3, the serial port with the Modbus RS485 transciever cannot be opened anymore after some time.

When the error appears, the following is printed on stdout: initialise_event_info_struct: initialise failed!

This is a known bug NeuronRobotics/nrjavaserial#111.

After compiling the native libs with DISABLE_LOCKFILES as suggested in above issue, the error is gone.

This has been discussed in https://community.openhab.org/t/modbus-binding-loses-its-serial-connection-every-few-days-without-a-reason-after-updating-to-2-5-0-release-build/89550/14

Maybe locking should be disabled in OH nrjavaserial again?

@wborn
Copy link
Member

wborn commented Nov 24, 2020

For me this issue is not that critical wanting to start forking nrjavaserial again. 😉 Forking nrjavaserial implies all other native libraries need to be recompiled as well (linux/armhf/arm64) and you'd have to merge any upstream changes to the fork.

@wborn wborn added the external bug A problem or unintended behavior of an external library label Nov 24, 2020
@fwolter
Copy link
Member Author

fwolter commented Nov 25, 2020

I understood you == me :) I'd do that if the pain gets too big. Until now there is only one user beside me facing the problem. Maybe @MrDOS manages to re-work the locking mechanism in the next time.

@jumblejj
Copy link

Hi, Also seeing this issues with OH3, see https://community.openhab.org/t/modbus-binding-not-working-on-oh3/111619

@ssalonen
Copy link
Contributor

ssalonen commented Jan 7, 2021

Reconnect issue discussed in more detail in this post https://community.openhab.org/t/modbus-binding-not-working-on-oh3/111619/26?u=ssalonen

It gets stuck at

at gnu.io.RXTXPort.waitForTheNativeCodeSilly(RXTXPort.java:958)

at gnu.io.RXTXPort.(RXTXPort.java:180)

at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:983)

Looking at latest code from github, it looks like MonitorThreadLock is never "released", leading to the deadlock.

https://github.com/NeuronRobotics/nrjavaserial/blob/40587564401997d31c1f2a73b20a14cde2f04cf7/src/main/java/gnu/io/RXTXPort.java#L955

Is there workaround we could implement in the binding side?

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/modbus-binding-problem-with-serial-connection/117942/7

@ssalonen
Copy link
Contributor

ssalonen commented Mar 8, 2021

@fwolter could you enlighten whether the following workaround would help in the binding?

Current behaviour

  • when I/O error is encountered, serial port is closed and re-opened before next retry

New behaviour

  • when I/O error is encountered, serial port is kept open

@ssalonen
Copy link
Contributor

ssalonen commented Mar 8, 2021

Comment from user in community https://community.openhab.org/t/modbus-binding-problem-with-serial-connection/117942/8?u=ssalonen shows how frustrating the nrjavaserial issue is in practice:

I read all those threads.
I gave up with this binding. It’s not usable.

I have written my own rules to query the modbus unit using the modpoll command line utility.
Works perfectly and absolutely reliable 100%.

@fwolter
Copy link
Member Author

fwolter commented Mar 8, 2021

@fwolter could you enlighten whether the following workaround would help in the binding?

Current behaviour

* when I/O error is encountered, serial port is closed and re-opened before next retry

New behaviour

* when I/O error is encountered, serial port is kept open

Could be, but I often observed the error right after the start of the JVM.

I agree that this problem is very annoying. A "quick" solution would be to disable the locks in general.

@ssalonen
Copy link
Contributor

ssalonen commented Mar 9, 2021

Potentially related observation with other binding (DSMR) https://community.openhab.org/t/serial-communication-stops-working-oh3/117203

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/smartmeter-binding-throws-unable-to-open-port-after-a-while/94349/20

@MikeTheTux
Copy link

I'm also affected by this problem when using the SmartMeter binding.

I'm running a total of 4 USB2Serial devices, 3 FTDI, 1 cp210x. The 3 FTDI from OH3.0.1, the single cp210x via zigbee2mqtt.

  • 2 Amber USB Sticks via WMBus Binding:
    • FTDI driver
    • runs stable, no deadlocks noticed
  • 1 SmartMeter Reader via SmartMeter Binding
    • FTDI driver, but other device type then the ones above
    • blocked after some days of operation
mike@nas:~$ usb-devices
T:  Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#=  9 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev=06.00
S:  Manufacturer=FTDI
S:  Product=AMB8465 AMBER USB Stick
S:  SerialNumber=Www
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=90mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio

T:  Bus=01 Lev=02 Prnt=03 Port=01 Cnt=02 Dev#= 12 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6015 Rev=10.00
S:  Manufacturer=FTDI
S:  Product=FT230X Basic UART
S:  SerialNumber=Xxx
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=90mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio

T:  Bus=01 Lev=02 Prnt=03 Port=02 Cnt=03 Dev#= 13 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=10c4 ProdID=ea60 Rev=01.00
S:  Manufacturer=Silicon Labs
S:  Product=slae.sh cc2652rb stick - slaesh's iot stuff
S:  SerialNumber=Yyy
C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=cp210x

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=03 Dev#= 11 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=6001 Rev=06.00
S:  Manufacturer=FTDI
S:  Product=AMB8465-M AMBER USB Stick
S:  SerialNumber=Zzz
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=90mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio

Can I provide some debugging info in order to nail down the root cause?

If blocked, the only solution that I found to unblock the serial is via a restart of Openhab. Sometimes I even need to do some magic on the interface inbetween the restart. Is there a better way, without a restart of OH?

If the issue is not found, I need to go back to my previous, stable solution: read SmartMeter out via an external script and pump the data into OH3 via MQTT.

ssalonen added a commit to ssalonen/openhab-core that referenced this issue Apr 5, 2021
Workaround for openhab#1842.
Typically serial connections are disconnected and reconnected on IO
errors. This has turned out to be problematic with the recent
nrjavaserial updates brought by OH3 (locking behaviour of nrjavaserial
seems to be prone to deadlocks).

We workaround the issues by trying to keep the serial connection open
as long as possible.

Signed-off-by: Sami Salonen <[email protected]>
ssalonen added a commit to ssalonen/openhab-core that referenced this issue Apr 5, 2021
Workaround for openhab#1842.
Typically serial connections are disconnected and reconnected on IO
errors. This has turned out to be problematic with the recent
nrjavaserial updates brought by OH3 (locking behaviour of nrjavaserial
seems to be prone to deadlocks).

We workaround the issues by trying to keep the serial connection open
as long as possible.

Signed-off-by: Sami Salonen <[email protected]>
cweitkamp pushed a commit that referenced this issue Apr 7, 2021
…#2272)

Workaround for #1842.
Typically serial connections are disconnected and reconnected on IO
errors. This has turned out to be problematic with the recent
nrjavaserial updates brought by OH3 (locking behaviour of nrjavaserial
seems to be prone to deadlocks).

We workaround the issues by trying to keep the serial connection open
as long as possible.

Signed-off-by: Sami Salonen <[email protected]>
@digitaldan
Copy link
Contributor

So I am seeing this as well now in the Z-wave binding on our nightlies, its suddenly stops working, hanging on this line:

2021-04-16 11:52:46.858 [DEBUG] [g.openhab.binding.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyACM0'

but i can't figure out why, other then the serial thread looks to be waiting here:

    at [email protected]/java.lang.Thread.sleep(Native Method)
    at gnu.io.RXTXPort.waitForTheNativeCodeSilly(RXTXPort.java:958)
    at gnu.io.RXTXPort.<init>(RXTXPort.java:180)
    at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:983)
    at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467)
    at org.openhab.core.io.transport.serial.internal.SerialPortIdentifierImpl.open(SerialPortIdentifierImpl.java:53)
    at org.openhab.binding.zwave.handler.ZWaveSerialHandler.watchSerialPort(ZWaveSerialHandler.java:108)
    at org.openhab.binding.zwave.handler.ZWaveSerialHandler$$Lambda$1283/0x00000001011f7440.run(Unknown Source)
    at [email protected]/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at [email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at [email protected]/java.lang.Thread.run(Thread.java:834)

Whats odd, is that if i install a fresh system, so no configuration, and add the zwave controller it seems ok, but at some point after the system runs for a while, the binding stops being able to connect after a restart. The problem i'm having is that it will no longer connect again after any amount of restarts.

I don't see other bindings competing for the port in the thread stack, so i don't have any explanation why it suddenly stop being able to reconnect, even among restarts. It's as if there is a lock file somewhere, but i don't really think thats the case.

@fwolter
Copy link
Member Author

fwolter commented Apr 16, 2021

The probability this error occurs rises with the number of times the serial port is re-opened. I don't know whether the Z-Wave binding re-opens the port on communication errors, but a re-open can also be forced by EMI or bad connection between USB port and stick. You could take a look in the kernel log if there are any re-connect messages.

@digitaldan
Copy link
Contributor

You could take a look in the kernel log if there are any re-connect messages.

No, there's no messages in my system logs (trust me, i have been scouring my system for clues as this has been very frustrating ), and at some point after adding enough bindings back into the mix on a clean install, this happens when OH starts so there no chance for it to reconnect, it never completes a connect in the first place.

I'm also seeing the same message initialise_event_info_struct: initialise failed! in the startup log at the same time the zwave log is printing Connecting to serial port '/dev/ttyACM0' .

I'm still messing around with adding and removing bindings to figure out the tipping point, but i'm guessing this is a race condition that gets triggered by load or binding start order as i don't have any other bindings that use the serial libraries, and it only happens as i add the 15-20 bindings i use back into my configuration.

I have also occasionally seen this message RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyACM0 right before the message initialise_event_info_struct: initialise failed! which leades me to believe nrjavaserial may not be cleaning up properly or possibly crashing at some point ?

Whats very strange is there is nothing else new here on my system, other then using the latest nightly builds.

@ssalonen
Copy link
Contributor

@digitaldan the thinking is actually that the issue is with nrjavaserial alone. All you need is one binding using serial.

The way nrjavaserial is compiled for OH3 is different compared to OH2, something that might trigger this.

#1842 (comment)

I suspect that all bindings that use serial suffer from this. Since the root cause is quite intractable, I personally introduced a workaround for modbus binding that seems to help, ssalonen@1dc4094. Basically the workaround is that we avoid close/reconnect cycle with the serial port. Instead, we just keep the port open no matter what.

@fwolter
Copy link
Member Author

fwolter commented Apr 17, 2021

it only happens as i add the 15-20 bindings i use back into my configuration.

My observation is, that it doesn't seem to depend on the number of bindings. I suffered from the issue with only two bindings installed (modbus and a custom) after every reboot on some days. So, the system was unsable. On other days, it worked after a reboot reproducibly for hours, days or sometimes even weeks, without changing anything.

My setup works flawlessly for months now, after disabling the locks in nrjavaserial.

@digitaldan
Copy link
Contributor

@digitaldan the thinking is actually that the issue is with nrjavaserial alone. All you need is one binding using serial.
The way nrjavaserial is compiled for OH3 is different compared to OH2, something that might trigger this.
#1842 (comment)

Yeah, thats what i was trying to say, that i don't have any other serial bindings, and yes, of course I read the first comment in this issue, thanks.

My observation is, that it doesn't seem to depend on the number of bindings.

The only way this repeats for me is when my load profile changes, then its nearly 100% constant. This is at least my observation after trying this many, many times. I'm sure its probably different for others. I have no idea why that is, but I can reproduce it reliability.

My setup works flawlessly for months now, after disabling the locks in nrjavaserial.

I'm going to give that a shot as well. I'm a little concerned that this ends up becoming a bigger issue for us now that it looks to affect z-wave and other serial binding users. Was there a bump in the nrjavaserial version we think caused this? It seems to me to be a recent development.

@ssalonen
Copy link
Contributor

Yeah, thats what i was trying to say, that i don't have any other serial bindings, and yes, of course I read the first comment in this issue, thanks.

@digitaldan yeah, did not mean to be snarky -- I was on mobile and missed the fact that it was indeed the first post, hah

Was there a bump in the nrjavaserial version we think caused this? It seems to me to be a recent development.

What do you mean by recent development? The "working hypothesis" is that the issue was introduced in OH3. In OH2, openHAB used a "forked" version of nrjavaserial which had the library locking feature disabled (it's a compilation flag of nrjavaserial). openHAB 3 uses upstream nrjavaserial which has the library locking feature enabled. I presume also the version has been bumped with potential changes, most likely including fixes but potentially also regressions.

I think this is the PR introducing the OH3 "locking behaviour" #1426

With the upgraded version the library will no longer crash the Java 11 VM on Windows.

The native libraries now use the built in RXTX lockfiles instead of the previously used (OS dependent) liblockdev whereas the OH build didn't use any lockfiles at all.

It seems that serial port disconnect/re-connect has been troublesome also before, see e.g.
#1503 motivated by openhab/org.openhab.binding.zwave#1338

With this version it will no longer completely exit exclamation the JVM in certain scenarios when ports are closed/reopened.

@berlic
Copy link

berlic commented Apr 22, 2021

Hi, I'm in the same boat after upgrading to OH3. Modbus polls hangs after half a day or so. Had no problems with OH2 and the very same hardware.

Not sure if this of any help, but here are some observations.

I noticed a lot of deleted lock files for an openhab process (example):

java    9716 openhab  255u      REG       0,22         0   7911 /run/lock/tmpQtqAl9 (deleted)
java    9716 openhab  256u      REG       0,22         0   7913 /run/lock/tmp8nA4TH (deleted)
java    9716 openhab  257u      REG       0,22         0   7915 /run/lock/tmpBPaDnw (deleted)

When modbus binding hangs the total number of files shown by lsof is slightly more than 1024, so I initially thought that there might be some ulimit issue or smth; but it seems that systemd increases nofile limits for openhab process.

I tried the jar-file from #2272, and it seems that the number of lock-files is not growing. Thanks @ssalonen, I'll try it for a longer run.

After reverting org.openhab.core.io.transport.modbus back to original 3.0.1 version and watching for lsof I see additional set of lock files after every modbus transmission error like this:

2021-04-22 11:01:07.390 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint@f2a815[slaveId=109,functionCode=READ_MULTIPLE_REGISTERS,start=121,length=1,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID e3a53c0e-b2fb-44b0-87a0-0d31a10bd068]

Doing inotifywait on /run/lock gives this after each error:

10:54:34 LCK..ttyUSB0 OPEN
10:54:34 LCK..ttyUSB0 ACCESS
10:54:34 LCK..ttyUSB0 CLOSE_NOWRITE,CLOSE
10:54:34 LCK..ttyUSB0 DELETE
10:54:34 tmpvviHME CREATE
10:54:34 tmpvviHME OPEN
10:54:34 tmpvviHME MODIFY
10:54:34 tmpvviHME OPEN
10:54:34 tmpvviHME CLOSE_WRITE,CLOSE
10:54:34 tmpvviHME DELETE
10:54:34 LCK..ttyUSB0 CREATE
10:54:34 LCK..ttyUSB0 OPEN
10:54:34 LCK..ttyUSB0 MODIFY
10:54:34 LCK..ttyUSB0 CLOSE_WRITE,CLOSE
10:54:34 LCK..ttyUSB0 OPEN
10:54:34 LCK..ttyUSB0 ACCESS
10:54:34 LCK..ttyUSB0 CLOSE_NOWRITE,CLOSE
10:54:34 LCK..ttyUSB0 DELETE
10:54:34 tmpmrxXDm CREATE
10:54:34 tmpmrxXDm OPEN
10:54:34 tmpmrxXDm MODIFY
10:54:34 tmpmrxXDm OPEN
10:54:34 tmpmrxXDm CLOSE_WRITE,CLOSE
10:54:34 tmpmrxXDm DELETE
10:54:34 LCK..ttyAMA0 CREATE
10:54:34 LCK..ttyAMA0 OPEN
10:54:34 LCK..ttyAMA0 MODIFY
10:54:34 LCK..ttyAMA0 CLOSE_WRITE,CLOSE
10:54:34 LCK..ttyAMA0 OPEN
10:54:34 LCK..ttyAMA0 ACCESS
10:54:34 LCK..ttyAMA0 CLOSE_NOWRITE,CLOSE
10:54:34 LCK..ttyAMA0 DELETE
10:54:34 tmpXU7dB3 CREATE
10:54:34 tmpXU7dB3 OPEN
10:54:34 tmpXU7dB3 MODIFY
10:54:34 tmpXU7dB3 OPEN
10:54:34 tmpXU7dB3 CLOSE_WRITE,CLOSE
10:54:34 tmpXU7dB3 DELETE
10:54:34 LCK..ttyUSB0 CREATE
10:54:34 LCK..ttyUSB0 OPEN
10:54:34 LCK..ttyUSB0 MODIFY
10:54:34 LCK..ttyUSB0 CLOSE_WRITE,CLOSE
10:54:34 LCK..ttyUSB0 OPEN
10:54:34 LCK..ttyUSB0 ACCESS
10:54:34 LCK..ttyUSB0 CLOSE_NOWRITE,CLOSE
10:54:34 LCK..ttyUSB0 DELETE
10:54:34 tmpaYqBMK CREATE
10:54:34 tmpaYqBMK OPEN
10:54:34 tmpaYqBMK MODIFY
10:54:34 tmpaYqBMK OPEN
10:54:34 tmpaYqBMK CLOSE_WRITE,CLOSE
10:54:34 tmpaYqBMK DELETE
10:54:34 LCK..ttyAMA0 CREATE
10:54:34 LCK..ttyAMA0 OPEN
10:54:34 LCK..ttyAMA0 MODIFY
10:54:34 LCK..ttyAMA0 CLOSE_WRITE,CLOSE
10:54:34 LCK..ttyAMA0 OPEN
10:54:34 LCK..ttyAMA0 ACCESS
10:54:34 LCK..ttyAMA0 CLOSE_NOWRITE,CLOSE
10:54:34 LCK..ttyAMA0 DELETE
10:54:34 tmpdg0Vcr CREATE
10:54:34 tmpdg0Vcr OPEN
10:54:34 tmpdg0Vcr MODIFY
10:54:34 tmpdg0Vcr OPEN
10:54:34 tmpdg0Vcr CLOSE_WRITE,CLOSE
10:54:34 tmpdg0Vcr DELETE
10:54:34 LCK..ttyUSB0 CREATE
10:54:34 LCK..ttyUSB0 OPEN
10:54:34 LCK..ttyUSB0 MODIFY
10:54:34 LCK..ttyUSB0 CLOSE_WRITE,CLOSE
10:54:34 LCK..ttyUSB0 OPEN
10:54:34 LCK..ttyUSB0 ACCESS
10:54:34 LCK..ttyUSB0 CLOSE_NOWRITE,CLOSE
10:54:34 LCK..ttyUSB0 DELETE
10:54:34 tmpKBd8W7 CREATE
10:54:34 tmpKBd8W7 OPEN
10:54:34 tmpKBd8W7 MODIFY
10:54:34 tmpKBd8W7 OPEN
10:54:34 tmpKBd8W7 CLOSE_WRITE,CLOSE
10:54:34 tmpKBd8W7 DELETE
10:54:34 LCK..ttyAMA0 CREATE
10:54:34 LCK..ttyAMA0 OPEN
10:54:34 LCK..ttyAMA0 MODIFY
10:54:34 LCK..ttyAMA0 CLOSE_WRITE,CLOSE
10:54:34 LCK..ttyAMA0 OPEN
10:54:34 LCK..ttyAMA0 ACCESS
10:54:34 LCK..ttyAMA0 CLOSE_NOWRITE,CLOSE
10:54:34 LCK..ttyAMA0 DELETE
10:54:34 tmpZ5hVCS CREATE
10:54:34 tmpZ5hVCS OPEN
10:54:34 tmpZ5hVCS MODIFY
10:54:34 tmpZ5hVCS OPEN
10:54:34 tmpZ5hVCS CLOSE_WRITE,CLOSE
10:54:34 tmpZ5hVCS DELETE
10:54:34 LCK..ttyUSB0 CREATE
10:54:34 LCK..ttyUSB0 OPEN
10:54:34 LCK..ttyUSB0 MODIFY
10:54:34 LCK..ttyUSB0 CLOSE_WRITE,CLOSE

Not sure why it does something with ttyAMA0, as I only use ttyUSB0 for RS485 communication.

@MrDOS
Copy link

MrDOS commented Apr 22, 2021

Hey, as an NRJavaSerial contributor, I feel like I owe you folks my $0.02 on the underlying library issue at play here, and what I intend to do about it. My 👀 response to @fwolter's comment back in November was supposed to indicate that I was aware of the issue, but as time wears on, I think that response comes off as a bit too glib.

I noticed a lot of deleted lock files for an openhab process (example):

NRJavaSerial leaks the file descriptors for its lockfiles. I haven't hunted down where, exactly, but it seems to unlink(2) (or equivalent) the lockfile paths without close(2)'ing the open descriptors. (In your inotifywait output above, you can see that some of the files are opened twice, but only closed once.) As you're finding, this eventually gums up the works for itself and other file access done within the same process. It's been a while since I was last able to look at this, but IIRC, this manifests as an initialization error (initialise_event_info_struct: initialise failed!) and not a file open error due to limitations surrounding select(2) and FD_SETSIZE. The file can open: with an increased ulimit, you can open more than 1,024 (FD_SETSIZE) files. But the files are opened with large file descriptor numbers (>1,024), and so when the library tries to use the serial port, it calls FD_SET() with that larger-than-FD_SETSIZE descriptor, and encounters an error. The library solution is for us to use the newer poll(2) instead of select(2) – and to not leak file descriptors like a sieve in the first place.

This is why building NRJavaSerial with locking disabled circumvents the problem: no leaked lockfiles means no high file descriptor numbers, means select(2) is happy, and means no random initialization crashes.

New behaviour

  • when I/O error is encountered, serial port is kept open

Retaining/reusing old file descriptors (by reusing port objects) will avoid this problem, yes. Unfortunately, it can be really hard to distinguish when this is safe to do so: was the I/O error directly relating to the port hardware, e.g., a USB-to-serial dongle being disconnected, or was it a protocol error/unresponsive device on the far end? If you can rearchitect openHAB to continue to use old ports, you'll still eventually be unable to open new ports, but you can keep using the ones you already have open. It would be a pretty clumsy workaround for a problem you shouldn't have to deal with, but it should help.

Not sure why it does something with ttyAMA0, as I only use ttyUSB0 for RS485 communication.

As part of enumerating available ports (CommPortIdentifier.getPortIdentifiers()), NRJavaSerial tries to open each device in turn to confirm that the port is accessible to the current user. As far as I can tell, there's no valid reason for it to open the port to do the access check instead of just... performing an access check (i.e., via access(2)). But on top of that, it doesn't just open(2) the port – no, it goes through the entire usual rigmarole of locking/unlocking the port, too. So because port locking/unlocking leaks file descriptors, every port enumeration operation leaks file descriptors proportional to the number of serial ports attached to the system.

This is pretty high on the list of things I'd like to fix in NRJavaSerial. Unfortunately, the road to hell being paved with good intentions and all that, I haven't gotten to it yet. Hopefully I can soon.

What does the release cycle for look like, by the way? Do you issue updates on an as-available basis, or is there a release window you try to hit? Obviously you'd like this fixed in NRJavaSerial ASAP, but is there a time (other than “yesterday!”) when it would be optimal to receive a fix by?

@fwolter
Copy link
Member Author

fwolter commented Apr 22, 2021

Thanks for your explanations!

port locking/unlocking leaks file descriptors, every port enumeration operation leaks file descriptors proportional to the number of serial ports attached to the system.

IIRC, openHAB also enumerates the serial ports each time you open a configuration UI containing a serial port.

The openHAB minor release cycle is twice a year, I think. In any case, the next release will already be in May.

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/serial-port-dev-ttyusb0-not-found-or-port-is-busy-but-only-periodically/121464/5

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/z-wave-controller-offline-after-power-failure/125964/2

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/oh3-1-out-of-memory-error/126929/45

cdjackson pushed a commit to opensmarthouse/opensmarthouse-core that referenced this issue Nov 4, 2021
 disconnect serial (#2272)

Workaround for openhab/openhab-core#1842.
Typically serial connections are disconnected and reconnected on IO
errors. This has turned out to be problematic with the recent
nrjavaserial updates brought by OH3 (locking behaviour of nrjavaserial
seems to be prone to deadlocks).

We workaround the issues by trying to keep the serial connection open
as long as possible.

Signed-off-by: Sami Salonen <[email protected]>
---
X-Backport-Id: b1b58436f2fb3aec8f54185c1437e84780f4264d
Signed-off-by: Chris Jackson <[email protected]>
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/oh3-x-alternative-java-serial-provicer/128462/1

cdjackson added a commit to opensmarthouse/opensmarthouse-core that referenced this issue Nov 9, 2021
* Subject: [PATCH] Fixed NPE in ScriptError if INode is empty (#1985)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 7ce96ac06adcb8fdaacd3fb2526c034781aa41bc
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Fixed NPE in ScriptError if INode is empty (#1985)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 7ce96ac06adcb8fdaacd3fb2526c034781aa41bc
Subject: [PATCH] Fix for invalid day of week max check (#1986)

Closes #1813

Signed-off-by: Hilbrand Bouwkamp <[email protected]>
---
X-Backport-Id: df2013805b3b453db2351639930f778d021a50ab
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added nullness annotations to ThingHandlerHelper (#1993)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 0af74400d264c8d81c93957b78f858f0506eab01
Signed-off-by: Chris Jackson <[email protected]>

* Harden ChartServlet against NPEs when no 'period' parameter is given (#1992)	19daef5d0	Christoph Weitkamp <[email protected]>	24 Dec 2020 at 00:57

* Hide StateDescription constructor (#1995)	ce95ed191	Wouter Born <[email protected]>	24 Dec 2020 at 09:43

* Subject: [PATCH] [automation] Updated rule dsl filename to rule uid mapping
 (#2003)

use full filename without extension as uid for rules provided by DSL files
fix bug where rule filenames with common prefix and "." resulted in same uid

Signed-off-by: Leon Kiefer <[email protected]>
---
X-Backport-Id: 49a17a5f5efecba5f8b496acc9c3b1a9203229b5
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [transport.modbus] Added support for RTU encoding over TCP
 (#1965)

* [modbus] add support for rtu encoding over tcp

Signed-off-by: Andrew Fiddian-Green <[email protected]>
---
X-Backport-Id: acb0cd5e9bcbbf5306965da7a669f185da9a7770
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Expire group item states (#2009)

Fixes #1989

Signed-off-by: Stefan Triller <[email protected]>
---
X-Backport-Id: caaf1c7281af74762aca028a2bf644a3396b57be
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Align all threads to naming convention (#2018)

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: a91f8c657b87b2a6339d37836a35cee653826ff1
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Correctly handle file extension when looking up script
 (#2020)

Fixes #1990

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: 1c3e4318dfefde815592fb39c41b3f46745c15f2
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [persistence] Fix varianceSince and deviationSince (#2036)

Signed-off-by: Mark Hilbush <[email protected]>
---
X-Backport-Id: 890e767d0a27aba63dae3077d2e8d75e66f49939
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [transport.modbus] Support dimensionless QuantityType
 commands. (#1984)

In additions, command->registers tests have been once made more
readable, covering all the corner cases with integers.

Signed-off-by: Sami Salonen <[email protected]>
---
X-Backport-Id: afd03df07f5ad4e99084b5aee8a980e48b47366c
Signed-off-by: Chris Jackson <[email protected]>

* Bump license

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Prevent errors in log when client closes the HTTP connection
 (#2049)

Fixes openhab/openhab-distro#1188

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: 4b8546b5997434a03fbba81f49350242a9d27265
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added method to read all files with specific extensions in
 'transform/' folder (#2052)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 2cf9babfab1d2f84d1f547b2bae0fad3dfa103a4
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Include group label in warn log message (#2059)

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: d11ec3ef6423713bc7f43a95f93a49ae75d63884
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Cache parsed script in order to improve performance (#2057)

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: 531a478a4567fc6c195cdc57bda7d8b7ce15ddd7
Signed-off-by: Chris Jackson <[email protected]>

* add getPoolNames method to ThreadPoolManager (#2065)	75f52ac3e	pravussum <[email protected]>	6 Jan 2021 at 11:27

* Subject: [PATCH] Extended serial port implementation (#2050)

Signed-off-by: docbender <[email protected]>
---
X-Backport-Id: 0026d89caff95852578e06a612582a586669d841
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [automation] Avoid disappearing rules by correctly checking
 the model and its type (#2077)

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: 97e27828751df0a79299cff5af8897f7c6301726
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Improved error logging when adding rules (#2053)

Improved error logging for adding rules

Signed-off-by: Paul van den Berg <[email protected]>
---
X-Backport-Id: eee30b0c5736ddcb1bd84a3400e9c5e449232c84
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added unit tests for check if persistence extension returns
 QuantityType if persistence service returns QuantityType (#2029)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 90a460dd0325bbe00759b076595b7f5c8ff9b0e0
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Also return command line execution result in case of error
 return code (#2104)

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: a0d58006e8967562f9b930cef615267b0807308f
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [executeCommandLine] should return STDERR if STDOUT is empty
 (#2114)

Signed-off-by: Andrew Fiddian-Green <[email protected]>
---
X-Backport-Id: 127724c0e31ad8abf0855d87fbf96204267a39be
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Add message and preserve cause when throwing
 PortInUseException (#2126)

Signed-off-by: Fabian Wolter <[email protected]>
---
X-Backport-Id: 0a2450c91908d212477a264e7f3742c2e2d3df7f
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Changed modbus polling logging level to warning when retrying
 (#2135)

https://community.openhab.org/t/modbus-errors/114602

Signed-off-by: Michael Parment <[email protected]>
---
X-Backport-Id: 3df98da080732af188eae3739bf8c0bbcb3fecdd
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [jsondb] Restore zero byte files from backup (#2155)

* Restore zero byte files from backup
* Also handle zero byte backup files

Signed-off-by: Mike Major <[email protected]>
---
X-Backport-Id: 86a447c23a59a2446da4f1de5980e3841d2ec580
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [timer] Add Timer.getExecutionTime() (#2147)

Signed-off-by: Jimmy Tanagra <[email protected]>
---
X-Backport-Id: 6de92ec6ef4c49bf3f63ade222747f285d00e997
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [timer] fix to allow timer reschedule after termination
 (#2153)

Signed-off-by: Jimmy Tanagra <[email protected]>
---
X-Backport-Id: b55933d7699e64093a781d89371bff19200d3a55
Signed-off-by: Chris Jackson <[email protected]>

* Added ability for ScriptEngines to allow script dependencies
f0c9a8434dd552e891678959bea1e75ce34b7b8a

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Add ability for scripts to create unmanaged rules (#1897)

Signed-off-by: Jonathan Gilbert <[email protected]>
---
X-Backport-Id: f1a3d824ac100413947a53c7bf7dc675c86b96e9
Signed-off-by: Chris Jackson <[email protected]>

* Fix deprecations and get build working again

Signed-off-by: Chris Jackson <[email protected]>

* Sort out license headers and bump for 2021

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [modbus] equals and hashcode implementation for
 ModbusRegisterArray (#2164)

Signed-off-by: Sami Salonen <[email protected]>
---
X-Backport-Id: de61ce1eadd65f1061e62cefa1c9dd929a24a70a
Signed-off-by: Chris Jackson <[email protected]>

* Fix changing temperature via BasicUI (#2091) (#2165)
d48646d8c6fbd4f18d20e8ad4b55beefb37aa7a0

Signed-off-by: Chris Jackson <[email protected]>

* [discovery.upnp] Devices may apply a grace period for removal from the Inbox (#2144)

Signed-off-by: Chris Jackson <[email protected]>

* [REST] Prevent internal server error on invalid link requests on REST API (#2179)

Closes https://github.com/openhab/openhab-webui/issues/878

Signed-off-by: Kai Kreuzer <[email protected]>
Signed-off-by: Chris Jackson <[email protected]>

* Support sitemaps created through UI in proxy (#2178)

Signed-off-by: Chris Jackson <[email protected]>

* Added rule condition for not a holiday (#2043)

Signed-off-by: Sönke Küper <[email protected]>
Signed-off-by: Chris Jackson <[email protected]>

* Added nullness annotations to TypeParser (#2181)

Signed-off-by: Christoph Weitkamp <[email protected]>
Signed-off-by: Chris Jackson <[email protected]>

* [voice] Changed annotation of `getPreferredVoice` method to allow null results (#2186)

Signed-off-by: Christoph Weitkamp <[email protected]>
Signed-off-by: Chris Jackson <[email protected]>

* Add profile to generate semantics classes with groovy-maven-plugin (#2188)

Signed-off-by: Chris Jackson <[email protected]>

* Integrated micrometer metering #774 (#2133)

Signed-off-by: Robert Bach <[email protected]>
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [modbus] Modbus poolconfig handling (#2199)

* [modbus] More strict nullness annotations
Taking into consideration that we always have default
EndpointPoolConfiguration
* [modbus] Utilize default pool configuration consistently
* [modbus] Make (internal) ModbusCommunicationInterfaceImpl constr private
* [modbus] Handle null config of modbus comm when detecting open conns
* [modbus] default connection timeout of 10s with default pool config

Signed-off-by: Sami Salonen <[email protected]>
---
X-Backport-Id: ebda155b47891e441d287a449ff0408df26303f2
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [metering] tag rule metric with human readable rule name in
 addition to the rule id (#2194)

Signed-off-by: Robert Bach <[email protected]>
---
X-Backport-Id: 029280683087d07d3d52bc1b125e73c17a33917a
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Fix sitemap proxy URL provided by Rest API (#2203)

Signed-off-by: Brian Homeyer <[email protected]>
---
X-Backport-Id: c7b7390c917eabc0ae8de3465949bbdf4b0ac934
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [automation] Fixed memory leak caused by invalid UI DSL rule
 (#2212)

Signed-off-by: Mark Hilbush <[email protected]>
---
X-Backport-Id: 7de57f9ffe4eb5057d8c0bf6e78c538f54f69e73
Signed-off-by: Chris Jackson <[email protected]>

* [profiles] Added 'Range' profile (#2046)
This requires more work to make the profile usable

* Subject: [PATCH] Added Sematics actions for Rules (#2088)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 191a629e68fb446b6e93dc9f60a29911bf6d31d1
Signed-off-by: Chris Jackson <[email protected]>

* Added Sematics actions for Rules (#2088)

Signed-off-by: Chris Jackson <[email protected]>

* [scheduler] Mitigation fix for earlier triggers #1976 (#2190)

Some users reported the scheduler to be run to earlier.
It actual is known the Java scheduler can drift.
To handle this problem 2 changes have been made:
1. If the scheduler triggers > 2 sec before expected end time it will
reschedule.
2. The scheduler keeps track of the timestamp the job should run. For
recurring schedulers, like cron, when the next job is run it offsets of
the calculated time, and not the actual time. This guaranties that the
next scheduled time is actual the next scheduled time and not the same
end time in case the scheduler would trigger to early.

Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [scheduler] Mitigation fix for earlier triggers #1976 (#2190)

Some users reported the scheduler to be run to earlier.
It actual is known the Java scheduler can drift.
To handle this problem 2 changes have been made:
1. If the scheduler triggers > 2 sec before expected end time it will
reschedule.
2. The scheduler keeps track of the timestamp the job should run. For
recurring schedulers, like cron, when the next job is run it offsets of
the calculated time, and not the actual time. This guaranties that the
next scheduled time is actual the next scheduled time and not the same
end time in case the scheduler would trigger to early.

Signed-off-by: Hilbrand Bouwkamp <[email protected]>
---
X-Backport-Id: 7fef42c6c8c817cc419efe93a1f19a15cbee634a
Subject: [PATCH] io transport mqtt sets wrong QoS levels to hiveMQ #2145
 (#2208)

Signed-off-by: Stefan Donath <[email protected]>
---
X-Backport-Id: 361e985c1c333d4fedd37b1359f936f8dcbf012d
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Provide Script Names to Script Engines (#1885)

Signed-off-by: Brian O'Connell <[email protected]>
---
X-Backport-Id: 89796e79c015dc12ef5fbcabefd9ce96051b46d6
Signed-off-by: Chris Jackson <[email protected]>

* Upgrade Jackson to 2.12.2 (#2226)

Upgrades Jackson from 2.10.3 to 2.12.2.

For release notes see:

* https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.10
* https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.11
* https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.12

Also adds jackson-dataformat-cbor to the feature and runtime BOM so it can be more easily managed as it is a small bundle that is used by a few add-ons.

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Audiosink might be null (#2224)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 11c59ccc87141396a44765a9b3a27bb9d5192639
Signed-off-by: Chris Jackson <[email protected]>

* Upgrade Swagger to 2.1.7 (#2227)

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [channel] Fix createChannelBuilders not using overriden
 label/description (#2229)

* Use channelDefinition in createChannelBuilder

Closes #2225

Signed-off-by: Arjan Mels <[email protected]>
---
X-Backport-Id: e20348e8d66845db841f17e6e048d789d004fdf2
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added nullness annotations to fix NPE in HttpServiceUtil
 (#2234)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 26e9a8ed9cf6f5ef30a3176d93206aac242d8eb4
Signed-off-by: Chris Jackson <[email protected]>

* [automation] Added optional per-script StartLevels (#2222)

Allows scripts to specify per-script start levels which differ from the start level for the ScriptFileWatcher itself. Also extracted some functionality from ScriptFileWatcher into distinct components & added unit tests to cover all script loading functionality.

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Removed Jetbrains @NonNull annotations (#2241)

Signed-off-by: Jonathan Gilbert <[email protected]>
---
X-Backport-Id: 115d39ff35e4619af3412dde7e4cd19bfd5fe0ef
Signed-off-by: Chris Jackson <[email protected]>

* Remove commons-lang dependency (#2235)

There was already a transitive commons-lang3:3.9 compile dependency used by several add-ons.
This is a transitive dependency of pax-web-jetty and swagger-core.

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Sort members of groups by labe in sitemaps (#2123)

* Sort group members by label

Signed-off-by: bjoernbrings <[email protected]>
---
X-Backport-Id: c2498f5c7461f2b64af59c0bc4651d33c136cbfa
Signed-off-by: Chris Jackson <[email protected]>

* Update gson to 2.8.6

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Add null annotations to org.openhab.core.voice (#2255)

Allows for using null annotations with the voice TTS add-ons.

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: db11cfda5183cf6c6b381aece95078a1c9da44d8
Signed-off-by: Chris Jackson <[email protected]>

* Add missing netty-codec-http2 to openhab.tp-netty (#2257)

Signed-off-by: Chris Jackson <[email protected]>

* [automation] Correctly unload script before reload. (#2254)

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Fix wrong/missing OpenAPI ApiResponse content (#2258)

This fixes some issues where the response content is missing or wrong in the generated OpenAPI spec.

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: b64c84e8b961587d8d2f84510c426c973e70257f
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Merged semantics packages in order to make API consistent
 (#2263)

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: 6568dc1478dda91c925c7c8c9c34e152981f5453
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Add cache for Basic Authentication (#2101)

Also-by: Sebastian Gerber <[email protected]>
Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: 4964b5116003b8518d228c3ac53037f236c78ef2
Signed-off-by: Chris Jackson <[email protected]>

* Update jetty

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [skeleton] Change locale placeholder from xx_XX to xx (#2268)

Closes #2261

Signed-off-by: Fabian Wolter <[email protected]>
---
X-Backport-Id: 949313744d24b888a90a4e904fca67ae32978b94
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [modbus] Workaround for nrjavaserial issues: do not
 disconnect serial (#2272)

Workaround for https://github.com/openhab/openhab-core/issues/1842.
Typically serial connections are disconnected and reconnected on IO
errors. This has turned out to be problematic with the recent
nrjavaserial updates brought by OH3 (locking behaviour of nrjavaserial
seems to be prone to deadlocks).

We workaround the issues by trying to keep the serial connection open
as long as possible.

Signed-off-by: Sami Salonen <[email protected]>
---
X-Backport-Id: b1b58436f2fb3aec8f54185c1437e84780f4264d
Signed-off-by: Chris Jackson <[email protected]>

* Upgrade Xtext/Xtend to 2.25.0, LSP4J to 0.10.0 (#2278)

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [skeleton] Use real world examples; fix imports (#2270)

* [skeleton] Use real world examples in thing-types.xml

* Added some examples as many new bindings don't make use of context tags or supported bridges.
* Adapt config DTO, i18n. Add refresh param. Cleanup imports.

Signed-off-by: Fabian Wolter <[email protected]>
---
X-Backport-Id: 23c367f51e44d623477a9ec894af370cdb6f7a9d
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [automation] Added rule rest endpoint and backend operation
 for rule execution simulation (#2125)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Added marker interface for TriggerHandler to indicate if they are time based and thus can be used to simulate execution times.
* Added marker interface for ConditionHandler to indicate, if they are time based and thus can be checked during rule execution for a certain time.
* Moved CronAdjuster to common, so it can be used for the rule simulation
* Created RuleExecutionSimulator that allows simulation of rules
* Added method in RuleManger to create simulation
* Added rest endpoint for rule simulation.
* Changed marker interface to return TemporalAdjuster instead of cron expression. This better hides the internals of the TriggerHandler (i.e. the cron expression) and is more clear and flexible for other handlers to implement

Fixes #2044
Fixes #2266

Signed-off-by: Sönke Küper <[email protected]>
---
X-Backport-Id: db488d861ebc9a854aed2349595c9ca4dbd5b54d
Signed-off-by: Chris Jackson <[email protected]>

* Upgrade jamod (to get rid of case with fragmented packets) (#2284)

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] French translation added for signal strength options (#2294)

- French translation added for signal strength options

Signed-off-by: Laurent Garnier <[email protected]>
---
X-Backport-Id: 469613e15af7070af69ac1c69afa0fe1115e1784
Subject: [PATCH] Added i18n propertie files for DefaultSystemChannels and
 Profiles (#2297)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: c9cdf5d0e876746f0e2f7b7e032d2fd31487221e
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added unit test for UTF-8 encoded properties (#2295)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 4311b167f3c3e218500aabe6b54c72f8799d0c04
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2293)

* New translations DefaultSystemChannels.properties (Finnish)
* New translations DefaultSystemChannels.properties (French)
* New translations DefaultSystemChannels.properties (German)
* New translations DefaultSystemChannels.properties (Hebrew)
* New translations DefaultSystemChannels.properties (Portuguese, Brazilian)
* New translations firmware.properties (Czech)
* New translations firmware.properties (French)
* New translations firmware.properties (German)
* New translations firmware.properties (Hungarian)
* New translations LanguageSupport.properties (Czech)
* New translations LanguageSupport.properties (German)
* New translations LanguageSupport.properties (Hungarian)
* New translations LanguageSupport.properties (Japanese)
* New translations LanguageSupport.properties (Portuguese, Brazilian)
* New translations messages.properties (Czech)
* New translations messages.properties (French)
* New translations messages.properties (German)
* New translations messages.properties (Hungarian)
* New translations messages.properties (Portuguese, Brazilian)
* New translations SystemProfiles.properties (Finnish)
* New translations SystemProfiles.properties (Italian)
* New translations SystemProfiles.properties (Portuguese, Brazilian)
* New translations tags.properties (Hungarian)
* New translations tags.properties (Portuguese, Brazilian)
* New translations units.properties (Czech)
* New translations units.properties (French)
* New translations units.properties (German)
* New translations units.properties (Hungarian)
* New translations validation.properties (Czech)
* New translations validation.properties (German)
* New translations validation.properties (Hungarian)
* New translations validation.properties (Japanese)
---
X-Backport-Id: 4afbf9327037a0a85fba4515084997f7b426b976

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Switch properties files encoding from ISO-8859-1 to UTF-8
 (#2298)

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: 94b69e2ccb264f590798f406c01b8d9b9b7ed551
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Remove trailing space from update-canceled in
 firmware.properties (#2300)

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: c5db042c20e5974fa1d0d45a7f913dd565005c27
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2301)

* New translations firmware.properties (Dutch)
* New translations firmware.properties (Hebrew)
* New translations firmware.properties (Japanese)
* New translations firmware.properties (Spanish)
* New translations LanguageSupport.properties (Hebrew)
* New translations LanguageSupport.properties (Norwegian)
* New translations LanguageSupport.properties (Spanish)
* New translations messages.properties (Hebrew)
* New translations messages.properties (Italian)
* New translations messages.properties (Japanese)
* New translations messages.properties (Spanish)
* New translations messages.properties (Ukrainian)
* New translations tags.properties (Dutch)
* New translations tags.properties (Norwegian)
* New translations tags.properties (Spanish)
* New translations units.properties (Dutch)
* New translations units.properties (Hebrew)
* New translations units.properties (Hungarian)
* New translations units.properties (Italian)
* New translations units.properties (Japanese)
* New translations units.properties (Luxembourgish)
* New translations units.properties (Norwegian)
* New translations units.properties (Portuguese, Brazilian)
* New translations units.properties (Spanish)
* New translations validation.properties (Dutch)
* New translations validation.properties (Hebrew)
* New translations validation.properties (Luxembourgish)
* New translations validation.properties (Norwegian)
* New translations validation.properties (Spanish)
* Fix file names
---
X-Backport-Id: 6d9fd2283cd5cb2aa5aa3144724c3698ecb1854c

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2305)

* New translations firmware.properties (Czech)
* New translations firmware.properties (Dutch)
* New translations firmware.properties (French)
* New translations firmware.properties (Hebrew)
* New translations firmware.properties (Hungarian)
* New translations firmware.properties (Japanese)
* New translations firmware.properties (Norwegian)
* New translations firmware.properties (Portuguese, Brazilian)
* New translations firmware.properties (Spanish)
* New translations messages.properties (Dutch)
* New translations messages.properties (French)
* New translations tags.properties (Portuguese, Brazilian)
* New translations tags.properties (Spanish)
* New translations validation.properties (Bulgarian)
* New translations validation.properties (Romanian)
---
X-Backport-Id: 62c85a3214ac74e5c9ac4266cd6b9c805ebf329b

Signed-off-by: Chris Jackson <[email protected]>

* [modbus] jamod modbus library update 1.3.3.OH (#2315)

Signed-off-by: Chris Jackson <[email protected]>

* Upgrade Aries JAX-RS Whiteboard to 2.0.0 (#2316)

Upgrades the Aries JAX-RS Whiteboard from 1.0.9 to 2.0.0

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Ignore illegal thing status updates from REMOVING (#2313)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Ignore illegal thing status updates from REMOVING

Ignore illegal thing status transitions from REMOVING instead of throwing IllegalArgumentException

Signed-off-by: Björn Lange <[email protected]>
---
X-Backport-Id: 6258268031ecc4dedc832f59de01152686fc3cf8
Signed-off-by: Chris Jackson <[email protected]>

* Filter duplicate broadcast addresses for service configuration if multiple network interfaces are available (#2307)

Signed-off-by: Christoph Weitkamp <[email protected]>
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2308)

* New translations DefaultSystemChannels.properties (Dutch)
* New translations DefaultSystemChannels.properties (Spanish)
* New translations DefaultSystemChannels.properties (Ukrainian)
* New translations firmware.properties (Ukrainian)
* New translations LanguageSupport.properties (Dutch)
* New translations LanguageSupport.properties (French)
* New translations LanguageSupport.properties (Ukrainian)
* New translations messages.properties (Bulgarian)
* New translations messages.properties (German)
* New translations SystemProfiles.properties (Spanish)
* New translations SystemProfiles.properties (Ukrainian)
* New translations tags.properties (German)
* New translations tags.properties (Japanese)
* New translations tags.properties (Ukrainian)
* New translations units.properties (Bulgarian)
* New translations units.properties (Czech)
* New translations units.properties (French)
* New translations units.properties (Ukrainian)
* New translations validation.properties (French)
* New translations validation.properties (Ukrainian)
---
X-Backport-Id: 38d2e6538bb715324748cd50026725c48fd6b451

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2323)

* New translations DefaultSystemChannels.properties (Hungarian)
* New translations SystemProfiles.properties (Dutch)
* New translations SystemProfiles.properties (Hungarian)
* New translations tags.properties (French)
* New translations tags.properties (French)
---
X-Backport-Id: 90ffaffa1537ee5601c79545df66cbd7c110a59b

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Fix build (#2324)

The test now fails because of the updated translations.

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: 3b878114c99f43c2adda31476e60b00f2c20ab78
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Fixed JsonParser deprecations (#2320)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: c28c956d66e0781f13e5d3c9d63bc7b7af200b40
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [REST] Added editable flag for ItemChannelLinks by
 introducing an EnrichedItemChannelLinkDTO (#2318)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: e4f77f79928d170bf63d994a86664aca86823fa6
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Fix typo in DefaultSystemChannels (#2325)

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: f164be385db30251bc6c8011e179ec6e4b3b7343
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [rest] Added default values for rule simulation start and end
 dates and restricted the max. duration to < 180 days to prevent an
 denial-of-service. (#2296)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes #2285

Signed-off-by: Sönke Küper <[email protected]>
---
X-Backport-Id: cb36eb57e7cede9c0674770eabd9db953f6ef099
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [metering] Fix dependency issue in io.monitor bundle (#2288)
 (#2289)

Signed-off-by: Robert Bach <[email protected]>
---
X-Backport-Id: da05f8e9fa97a8ecc95c035e2c698ef6c93c8b5c
Signed-off-by: Chris Jackson <[email protected]>

* Upgrade hivemq-mqtt-client to 1.2.2, Netty to 4.1.63.Final (#2327)

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [i18n] Translation of configurable services (#2306)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 93d7973b5644377347c54f4e8874b8cc70ccc5af
Signed-off-by: Chris Jackson <[email protected]>

* New Crowdin updates (#2326)

Signed-off-by: Chris Jackson <[email protected]>

* Remove commons-io and commons-codec dependencies (#2329)

Signed-off-by: Chris Jackson <[email protected]>

* New Crowdin updates (#2336)

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2336)

* New translations addons.properties (French)
* New translations audio.properties (Hebrew)
* New translations audio.properties (Hungarian)
* New translations chart.properties (Finnish)
* New translations chart.properties (French)
* New translations ephemeris.properties (Hebrew)
* New translations firmware.properties (Finnish)
* New translations i18n.properties (Hebrew)
* New translations inbox.properties (Hebrew)
* New translations jsonStorage.properties (French)
* New translations LanguageSupport.properties (Finnish)
* New translations network.properties (Hebrew)
* New translations persistence.properties (French)
* New translations persistence.properties (Hebrew)
* New translations SystemProfiles.properties (Hebrew)
* New translations tags.properties (Hebrew)
* New translations voice.properties (Hebrew)
---
X-Backport-Id: 0972ad5ede205db5ebbcde5e2c5bbe205bb94621
Subject: [PATCH] [automation] match on complete channel UID (#2337)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Matching only on "topic.contains(channelUID)" will lead to false
positivies.

This was reported for the linuxinput binding, where pressing the "left"
key would also trigger rules for the "l" key.

The channels for these are
`linuxinput:input-device:test:keypresses#KEY_L` and
`linuxinput:input-device:test:keypresses#KEY_LEFT`

Signed-off-by: Thomas Weißschuh <[email protected]>
---
X-Backport-Id: 96630609435a4f0b3a4b01398a6da25ec38cdf2c
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added nullness annotations to Thing events (#2341)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 141e73c85fc37737a990c969d79747f5e32d0872
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [inbox] Approval with newThingId: only one segment allowed
 (#2338)

* [inbox] Approval with newThingId: only one segment allowed

Build of the new thing UID corrected in case newThingId is provided

Fix #2331

Signed-off-by: Laurent Garnier <[email protected]>
---
X-Backport-Id: 6eee84661fd1874d930a5c00b9a10cbbffea694c
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added i18n feature for ConfigurableServices (#2333)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 31494c0d8ac6b0ff0fef65cc0b35e3a336f805f0
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added missing properties for HLI, LSP and MQTT (#2334)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: a82d3effb7bf268249ec066bb5c67613dc08a312
Signed-off-by: Chris Jackson <[email protected]>

* Update runtime BOM for hivemq-mqtt-client upgrade (#2345)

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2339)

* New translations restauth.properties (Hebrew)

* New translations addons.properties (Hebrew)

* New translations jsonStorage.properties (Hebrew)

* New translations chart.properties (Hebrew)

* New translations DefaultSystemChannels.properties (Polish)

* New translations LanguageSupport.properties (Polish)

* New translations audio.properties (Polish)

* New translations voice.properties (Polish)

* New translations SystemProfiles.properties (Polish)

* New translations units.properties (Polish)

* New translations validation.properties (Polish)

* New translations validation.properties (Finnish)

* New translations messages.properties (Polish)

* New translations tags.properties (Polish)

* New translations firmware.properties (Polish)

* New translations chart.properties (Polish)

* New translations inbox.properties (Polish)

* New translations ephemeris.properties (Polish)

* New translations restauth.properties (Polish)

* New translations addons.properties (Polish)

* New translations persistence.properties (Polish)

* New translations jsonStorage.properties (Polish)

* New translations network.properties (Polish)

* New translations i18n.properties (Polish)

* New translations jsonStorage.properties (Finnish)

* New translations i18n.properties (Finnish)

* New translations network.properties (Finnish)

* New translations voice.properties (Dutch)

* New translations persistence.properties (Dutch)

* New translations addons.properties (Dutch)

* New translations restauth.properties (Dutch)

* New translations ephemeris.properties (Dutch)

* New translations inbox.properties (Dutch)

* New translations audio.properties (Dutch)

* New translations hli.properties (Dutch)

* New translations brokerConnectionInstance.properties (Dutch)

* New translations lsp.properties (Dutch)

* New translations jsonStorage.properties (Dutch)

* New translations chart.properties (Dutch)

* New translations i18n.properties (Dutch)

* New translations network.properties (Dutch)

* New translations DefaultSystemChannels.properties (Italian)

* New translations audio.properties (Ukrainian)

* New translations inbox.properties (Ukrainian)

* New translations restauth.properties (Ukrainian)

* New translations addons.properties (Ukrainian)

* New translations i18n.properties (Ukrainian)

* New translations network.properties (Ukrainian)

* New translations lsp.properties (Italian)

* New translations lsp.properties (German)

* New translations lsp.properties (Finnish)

* New translations lsp.properties (Hebrew)

* New translations hli.properties (German)

* New translations hli.properties (Finnish)

* New translations hli.properties (Hebrew)

* New translations hli.properties (Italian)

* New translations brokerConnectionInstance.properties (Italian)

* New translations brokerConnectionInstance.properties (Hebrew)

* New translations brokerConnectionInstance.properties (Finnish)

* New translations jsonStorage.properties (German)

* New translations jsonStorage.properties (Spanish)

* New translations network.properties (Spanish)

* New translations tags.properties (Italian)

* New translations voice.properties (Hebrew)

* New translations i18n.properties (Hebrew)

* New translations network.properties (Hebrew)

* New translations jsonStorage.properties (Hebrew)

* New translations chart.properties (Hebrew)

* New translations persistence.properties (Hebrew)

* New translations inbox.properties (Italian)

* New translations jsonStorage.properties (Finnish)

* New translations audio.properties (Finnish)

* New translations inbox.properties (Finnish)

* New translations ephemeris.properties (Finnish)

* New translations restauth.properties (Finnish)

* New translations addons.properties (Finnish)

* New translations persistence.properties (Finnish)

* New translations chart.properties (Finnish)

* New translations addons.properties (Hebrew)

* New translations voice.properties (Finnish)

* New translations i18n.properties (Finnish)

* New translations network.properties (Finnish)

* New translations audio.properties (Hebrew)

* New translations inbox.properties (Hebrew)

* New translations ephemeris.properties (Hebrew)

* New translations restauth.properties (Hebrew)

* New translations audio.properties (Italian)

* New translations ephemeris.properties (Italian)

* New translations restauth.properties (Italian)

* New translations network.properties (Italian)

* New translations addons.properties (Italian)

* New translations persistence.properties (Italian)

* New translations jsonStorage.properties (Italian)

* New translations chart.properties (Italian)

* New translations voice.properties (Italian)

* New translations i18n.properties (Italian)

* New translations i18n.properties (German)

* New translations restauth.properties (German)

* New translations addons.properties (German)

* New translations persistence.properties (German)

* New translations chart.properties (German)

* New translations voice.properties (German)

* New translations network.properties (German)

* New translations inbox.properties (German)

* New translations ephemeris.properties (German)

* New translations audio.properties (German)

* New translations voice.properties (Ukrainian)

* New translations ephemeris.properties (Ukrainian)

* New translations chart.properties (Ukrainian)

* New translations jsonStorage.properties (Ukrainian)

* New translations persistence.properties (Ukrainian)

* New translations voice.properties (German)
---
X-Backport-Id: 305683ac6a9d2bc2c7d3e96c6e6f6d74017183f4

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added Channel of DateTimeType (#2347)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: aa48f5990ea70a501c6d45beb7712b18e76a029f
Signed-off-by: Chris Jackson <[email protected]>

* Implement hostnameValidated flag for secure MQTT connections (#2348)

Fixes #2346

Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Upgrade Units of Measurement dependencies (#2319)

Upgrades UoM dependencies to:

* javax.measure 2.1.2
* si-units 2.0.1
* indriya 2.1.2

An openHAB OSGi-ified si-units bundle is used as runtime dependency, because the latest si-units release is still missing proper OSGi manifest headers.

Notable changes:

* Quantity not longer implements an `equals` method, so the unit tests had to be adjusted. This should have any impact outside of the unit tests though since the rest of openHAB should be using QuantityType instead.
* RationalConverter is not package private, so instances of it much be created through the MultiplyConverter static functions.
* Quantities.getQuantity can no longer parse values without units like `100`. A workaround has been implemented.
* The unicode greek `mu` letter is now returned for unit prefixes instead of the unicode `micro` character. These characters are visually identical but the unit tests had to be adjusted. The new library seems to parse both types just fine.

Also-by: Connor Petty <[email protected]>
Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: 91307993ad2fbe1b357f1dab8d694d679e67ca8c
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Fix unstable MqttBrokerConnectionTests (#2358)

The timeoutWhenNotReachable test often fails on systems with a lot of load.

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: e124ad4fecb2f243d39cd93312403f70fcd26e2e
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Fix unstable CronSchedulerImplTest (#2354)

This test would often fail when the system is under load.

Fixes #1242

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: 0e9cecc29bfef0b71a103155581c925edb7521ed
Signed-off-by: Chris Jackson <[email protected]>

* Update jose4j to 0.7.7 (#2355)

Signed-off-by: Chris Jackson <[email protected]>

* Update Swagger to 2.1.9 (#2356)

Signed-off-by: Chris Jackson <[email protected]>

* Update Jackson to 2.12.3 (#2357)

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2352)

* New translations audio.properties (Hungarian)
* New translations audio.properties (Portuguese, Brazilian)
* New translations brokerConnectionInstance.properties (Dutch)
* New translations brokerConnectionInstance.properties (Finnish)
* New translations brokerConnectionInstance.properties (Hebrew)
* New translations brokerConnectionInstance.properties (Italian)
* New translations brokerConnectionInstance.properties (Ukrainian)
* New translations chart.properties (Hungarian)
* New translations ephemeris.properties (Portuguese, Brazilian)
* New translations hli.properties (Ukrainian)
* New translations i18n.properties (Portuguese, Brazilian)
* New translations inbox.properties (Portuguese, Brazilian)
* New translations lsp.properties (Ukrainian)
* New translations network.properties (Hungarian)
* New translations network.properties (Portuguese, Brazilian)
* New translations persistence.properties (Hungarian)
* New translations restauth.properties (Portuguese, Brazilian)
---
X-Backport-Id: ff1d702f5dc940dee1b7383c099cbfe491ce1542

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Display raw item state when formatting fails (#2349)

* Display raw item state when formatting fails

With the addition of Profiles, there are situations where a Channel sends format information that
does not match the type. For example, "Timestamp on update" always sends a DateTime, but the channel
may specify a different format (e.g., if it is a battery level, "%.0f %%"). In such a case, we
attempt to format the DateTime according to the pattern, it (predictably and correctly) fails, and
this results in an error in the UI and a warning in the log.

While this is an expected error if a user uses an incorrect format code in an Item's metadata (user
error), it is somewhat unexpected if a user is choosing an option as presented in the UI. Because
this is purely a formatting issue, one solution is to direct users to add a formatting code if they
see an error. However, the disadvantage of this approach is that it doesn't work "out of the box."

This patch attempts to address the issue by displaying the raw Item state when formatting fails
instead of displaying "Err". This should provide a more balanced approach with a predictable
outcome. In addition, when a user is intentionally changing the pattern via metadata and gets it
wrong, they should still see info in the log that helps them get to the root of the problem, but
I've changed it from warn to info so it will be a little less noisy for those who choose to ignore
it.

This solution was discussed in https://github.com/openhab/openhab-core/issues/2037 and
https://community.openhab.org/t/timestamps-not-rendering-consistently-in-ui-3-0-2/121891/2

Thank you to @Rossko57 and @cweitkamp for their help in figuring it out, and in suggesting the
solution.

Signed-off-by: Brian Warner <[email protected]>
---
X-Backport-Id: a8f469e5e78ba86c5d648b85a0054b5a978c6ee9
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Fix decimal separator issues when creating QuantityType from
 String (#2362)

* Fix decimal separator issues when creating QuantityType from String

Fixes #2360

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: 568881a678c9154f79b8e249848ea91ca07caadd
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [profiles] Added "timestamp-offset" Profile (#2351)

* Added timestamp-offset Profile
* Fix RAWBUTTON_TOGGLE_ROLLERSHUTTER Profile

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: ba53e8a08d2f2a6e6b5dd228baa85a88c220a37a
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Catch MeasurementParseException in
 UnitUtils.parseUnit(String) method (#2367)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 22cbc9a08aff574d285e3e109f42da81b52b60c5
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [REST] inbox/approve: new response code 400 (#2343)

Related to openhab/openhab-webui#1035

Signed-off-by: Laurent Garnier <[email protected]>
---
X-Backport-Id: a3d5f3e8dc41d3f0e4732e78bcdeed09cf1d53dd
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Remove update of timestamp on Change/Update for Item update
 (#2353)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 4309fb2d5360bbd3411959b012a256afb3195717
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [profiles] Log warning if profile cannot be created (#2368)

* Log warning if profile cannot be created e.g. if there is a spelling mistake

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 0c3f8c6105297dd7f55bd28a6204a773d7d88c8e
Signed-off-by: Chris Jackson <[email protected]>

* Upgrade XStream to 1.4.17 (#2369)

* Subject: [PATCH] Support parsing localized strings with DecimalType,
 PercentType and QuantityType (#2365)

Adds constructors with a Locale parameter for parsing localized string to DecimalType, PercentType and QuantityType.
This allows for parsing locale specific group and decimal seperators in strings.

Also fixes:
* IllegalArgumentException not being thrown if numbers in strings are only partially parsed as QuantityType
* MeasurementParseException not caught and rethrown as IllegalArgumentException

Several new unit tests cover the new functionality and fixed regressions.

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: 3c301772695b80f5c27a23af987bb2cc440b1387
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Rework thrown exceptions for DecimalType, PercentType and
 QuantityType (#2374)

Throw NumberFormatException when numbers are invalid and cannot be parsed to BigDecimals.
Add JavaDocs to document when which exception is thrown.
Add more unit tests to cover the thrown exceptions.

Signed-off-by: Wouter Born <[email protected]>
---
X-Backport-Id: 696ebacdc73ed40688137c5f865c9a7c9c3619ca
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [automation] Remove readOnly flag on script type parameter
 (#2373)

Not sure if there's a good rationale behind it being read-only (maybe because it's not supposed to change after having been set) but removing it will fix https://github.com/openhab/openhab-webui/issues/1061.

Signed-off-by: Yannick Schaus <[email protected]>
---
X-Backport-Id: 66149659ca527dd9478d99eecc4df30248575bb4
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2366)

* New translations SystemProfiles.properties (German)

* New translations SystemProfiles.properties (Hebrew)

* New translations SystemProfiles.properties (Dutch)

* New translations SystemProfiles.properties (Italian)

* New translations SystemProfiles.properties (Finnish)

* New translations SystemProfiles.properties (Hebrew)

* New translations SystemProfiles.properties (Italian)

* New translations SystemProfiles.properties (Dutch)
---
X-Backport-Id: 37d88a41fd39332d7c1ec7b896fea716bb594b1c

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added "timestamp-trigger" Profile (#2364)

* Added Timestamp on Trigger Profile

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: d43106c0160837b06dcf9a88aa9b5b4384ed9f12
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [automation] add tags to item modules (#2378)

* add tags to item modules
* made state/command configuration optional

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: 0343f4460121aecdf38a7ac064a0f78fbb15513d
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2375)

* New translations persistence.properties (French)

* New translations lsp.properties (French)

* New translations jsonStorage.properties (French)

* New translations chart.properties (French)

* New translations SystemProfiles.properties (Hebrew)

* New translations SystemProfiles.properties (Italian)

* New translations SystemProfiles.properties (German)

* Update source file SystemProfiles.properties

* New translations SystemProfiles.properties (German)

* New translations SystemProfiles.properties (Dutch)

* New translations SystemProfiles.properties (Finnish)

* New translations audio.properties (Polish)

* New translations lsp.properties (Polish)

* New translations hli.properties (Polish)

* New translations persistence.properties (Polish)

* New translations network.properties (Polish)

* New translations i18n.properties (Polish)

* New translations chart.properties (Polish)

* New translations jsonStorage.properties (Polish)

* New translations addons.properties (Polish)

* New translations restauth.properties (Polish)

* New translations ephemeris.properties (Polish)

* New translations voice.properties (Polish)

* New translations inbox.properties (Polish)

* New translations inbox.properties (Hungarian)

* New translations ephemeris.properties (Hungarian)

* New translations restauth.properties (Hungarian)

* New translations addons.properties (Hungarian)

* New translations jsonStorage.properties (Hungarian)

* New translations voice.properties (Hungarian)

* New translations i18n.properties (Hungarian)

* New translations lsp.properties (Hungarian)

* New translations brokerConnectionInstance.properties (Hungarian)

* New translations hli.properties (Hungarian)

* New translations inbox.properties (French)

* New translations addons.properties (French)

* New translations audio.properties (French)

* New translations SystemProfiles.properties (Hungarian)

* New translations SystemProfiles.properties (Polish)

* New translations ephemeris.properties (French)
---
X-Backport-Id: e2511cd89400ce6e2437970a3c84246d3e085da4

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2387)

* New translations restauth.properties (French)

* New translations i18n.properties (French)

* New translations network.properties (French)
---
X-Backport-Id: 0ffb5aad72e70828bf5fb1a2442f6b9a3f479189

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2390)

* New translations network.properties (French)

* New translations restauth.properties (French)
---
X-Backport-Id: a52bb4248118bab42e0c8dce16e3e5e14c9570b5

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added nullness annotations to Item events (#2384)

* Added nullness annotations to Item events
* Added nullness annotations to tests

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 8acaa8994f968f7e8906245e5c4cfed22e9a3c0c
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [config] Changed 'ConfigDescriptionParameterDTO' field
 serialization 'defaultValue' -> 'default' (#2383)

* Changed ConfigParameterDTO field serialization 'defaultValue' -> 'default'

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 585e8701834e77ca748590e8dc8610189a1aced3
Signed-off-by: Chris Jackson <[email protected]>

* Update to new JmDNS release 3.5.7 (#2391)

* Subject: [PATCH] [automation] Expose TriggerHandlerCallback scheduler (#2388)

* [automation] Expose TriggerHandlerCallback scheduler

Signed-off-by: Fabian Wolter <[email protected]>
---
X-Backport-Id: e007307796c545484d71ffa12a57f6a37f8e78e7
Signed-off-by: Chris Jackson <[email protected]>

* upgrade to JUPnP 2.6.0 (#2396)

* Subject: [PATCH] [automation] Fix offset for ephemeris condition (#2398)

Signed-off-by: Stewart Cossey <[email protected]>
---
X-Backport-Id: 08632596b38b559c72af52fed8b6845f76f2ba74
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [rest] Fix links to group members in REST response (#2399)

* Fix links for to group members in REST response

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: 3cac330c5fadc7a8208b7069e239f3cccf786503
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [UoM] Added SQUARE_INCH, CUBIC_INCH, GALLON_LIQUID_US and
 GALLON_PER_MINUTE (#2401)

Added SQUARE_INCH, CUBIC_INCH, GALLON_LIQUID_US and GALLON_PER_MINUTE
Corrected type for of SQUARE_FOOT and CUBIC_FOOT to be Unit<Area> and Unit<Volume>, respectively

Signed-off-by: Jeff James <[email protected]>
---
X-Backport-Id: c033741b29e293d6308f8db068cd258293a6ca94
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2395)

* New translations validation.properties (Arabic)

* New translations units.properties (Turkish)

* New translations network.properties (Chinese Simplified)

* New translations i18n.properties (Chinese Simplified)

* New translations audio.properties (Chinese Simplified)

* New translations validation.properties (Turkish)

* New translations persistence.properties (Chinese Simplified)

* New translations voice.properties (Chinese Simplified)

* New translations chart.properties (Chinese Simplified)

* New translations jsonStorage.properties (Chinese Simplified)

* New translations addons.properties (Chinese Simplified)

* New translations restauth.properties (Chinese Simplified)

* New translations ephemeris.properties (Chinese Simplified)

* New translations inbox.properties (Chinese Simplified)

* New translations brokerConnectionInstance.properties (Chinese Simplified)

* New translations lsp.properties (Chinese Simplified)

* New translations hli.properties (Chinese Simplified)

* New translations DefaultSystemChannels.properties (Chinese Simplified)

* New translations LanguageSupport.properties (Chinese Simplified)

* New translations messages.properties (Chinese Simplified)

* New translations validation.properties (Chinese Simplified)

* New translations units.properties (Chinese Simplified)

* New translations units.properties (Arabic)

* New translations firmware.properties (Chinese Simplified)

* New translations SystemProfiles.properties (Chinese Simplified)

* New translations ephemeris.properties (Spanish)

* New translations i18n.properties (Spanish)

* New translations voice.properties (Spanish)

* New translations addons.properties (Spanish)

* New translations tags.properties (Chinese Simplified)

* New translations units.properties (Swedish)

* New translations audio.properties (Swedish)

* New translations brokerConnectionInstance.properties (Ukrainian)

* New translations SystemProfiles.properties (Ukrainian)
---
X-Backport-Id: 8dbed1c5536ec1004ede1f8b2422af70bd9eca7b

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [rest] Make UUID available to users (#2402)

Signed-off-by: Kai Kreuzer <[email protected]>
---
X-Backport-Id: f58fce35008936ce14cd0a4ed11fc3ccf81dfcd5
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Add @SecurityRequirement annotation to
 PersistenceResource::httpPutPersistenceItemData function (#2406)

Signed-off-by: Paul Vogel <[email protected]>
---
X-Backport-Id: 5cc76378a085468918b51ab64acdf3c20f710d7b
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [REST][Docs] Corrects the docs for security requirement for
 the ThingResource (in the openapi specification) (#2404)

* Add @SecurityRequirement annotation to ThingResource::getAll function

Signed-off-by: Paul Vogel <[email protected]>
---
X-Backport-Id: 1f2beea19e7e4db05b8414fc8ea6f5d8abd26114
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added 'ChannelDescriptionChangedEvent' (#1505)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 556d3498c1f89d3995b8e6a42d5d37be2b9020fe
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Added method to publish whole StateDescriptionFragment
 (#2410)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: dbffd382347154e0cec8b6736712aeedaf423dcb
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2403)

* New translations network.properties (Swedish)

* New translations i18n.properties (Swedish)

* New translations inbox.properties (Swedish)

* New translations i18n.properties (Russian)

* New translations chart.properties (Swedish)

* New translations ephemeris.properties (Swedish)

* New translations DefaultSystemChannels.properties (Swedish)

* New translations firmware.properties (Swedish)

* New translations restauth.properties (Swedish)

* New translations jsonStorage.properties (Swedish)

* New translations voice.properties (Swedish)

* New translations LanguageSupport.properties (Swedish)

* New translations validation.properties (Swedish)

* New translations SystemProfiles.properties (Swedish)

* New translations hli.properties (Portuguese, Brazilian)

* New translations lsp.properties (Portuguese, Brazilian)

* New translations SystemProfiles.properties (Portuguese, Brazilian)

* New translations addons.properties (Portuguese, Brazilian)

* New translations persistence.properties (Portuguese, Brazilian)

* New translations jsonStorage.properties (Portuguese, Brazilian)

* New translations chart.properties (Portuguese, Brazilian)

* New translations voice.properties (Portuguese, Brazilian)

* New translations brokerConnectionInstance.properties (German)
---
X-Backport-Id: 8e3f87a21285323b786b2fdc05ce171f4493eb55

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Create a deep copy of the first found fragment before merging
 other fragments into it (#2412)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: 57c716bf80a3f55f113aad1a727a48321866a22c
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] [sitemap] Enhanced sitemap SSE event with a new boolean field
 informing if the (#2413)

item state or command description has been updated

Listen to the new ChannelDescriptionChangedEvent

Signed-off-by: Laurent Garnier <[email protected]>
---
X-Backport-Id: 2d71afe5bdd57c72c0e4603d17817ae7199730c2
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Ignore relative library directories for scripts (#2408)

Signed-off-by: Jonathan Gilbert <[email protected]>
---
X-Backport-Id: 241a4f6ebf6bc12382ddb477b8627a2a64cd1bb7
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Add a system setting to define how to sort group members
 (#2417)

* Add a system setting to define how to sort group members

Related to #2123

Signed-off-by: Laurent Garnier <[email protected]>
---
X-Backport-Id: 3f102c5e13b1331b2f387bcfa4557020be2ff411
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2418)

* New translations sitemap.properties (German)

* New translations sitemap.properties (Italian)

* New translations sitemap.properties (Polish)

* New translations sitemap.properties (Hebrew)
---
X-Backport-Id: fc4b5628967c99cfaffa5ef66fcfae8f8c34638e

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] Resolve itest runbundles for snapshot 3.2.0 (#2419)

Signed-off-by: Christoph Weitkamp <[email protected]>
---
X-Backport-Id: b2336a53fdff9c5c3cba87c0ea741ef52a68eadb
Subject: [PATCH] RuleResource: Add schema specification for "Location" header
 (#2421)

Signed-off-by: Paul Vogel <[email protected]>
---
X-Backport-Id: 7e5bf34d9e0090d8a794bfd197bf545a5e12ca70
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] OpenApiResource: Remove name from OAuth SecurityScheme
 (#2422)

Signed-off-by: Paul Vogel <[email protected]>
---
X-Backport-Id: 621d6eac1a36eb45f7242f7dbaf9071379631ee7
Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New Crowdin updates (#2420)

* New translations sitemap.properties (Finnish)

* New translations hli.properties (Swedish)

* New translations lsp.properties (Swedish)

* New translations sitemap.properties (Dutch)
---
X-Backport-Id: aad04cf94be9c6768f64582c15accff4bbc682bf

Signed-off-by: Chris Jackson <[email protected]>

* Subject: [PATCH] New translations sitemap.properties (Ukrainian)

---
Subject: [PATCH] New translations network.properties (Italian)

---
Subject: [PATCH] New translations hli.properties (Greek)

---
Subject: [PATCH] New translations lsp.properties (Greek)

---
Subject: [PATCH] New translations validation.properties (Greek)

---
Subject: [PATCH] New translations units.properties (Greek)

---
Subject: [PATCH] New translations messages.properties (Greek)

---
Subject: [PATCH] New translations firmware.properties (Greek)

---
Subject: [PATCH] New translations i18n.properties (Greek)

---
Subject: [PATCH] New translations jsonStorage.properties (Greek)

---
Subject: [PATCH] New translations persistence.properties (Greek)

---
Subject: [PATCH] New translations addons.properties (Greek)

---
Subject: [PATCH] New translations restauth.properties (Greek)

---
Subject: [PATCH] New translations ephemeris.properties (Greek)

---
Subject: [PATCH] New translations inbox.properties (Greek)

---
Subject: [PATCH] New translations audio.properties (Greek)

---
Subject: [PATCH] New translations sitemap.properties (Greek)

---
Subject: [PATCH] New translations tags.properties (Greek)

---
Subject: [PATCH] New translations DefaultSystemChannels.properties (Greek)

---
Subject: [PAT…
@JensHoRi
Copy link

JensHoRi commented Mar 27, 2022

A question from my site:

Would there be a work-around, restarting some bundles or features directly within karaf console?

Does anybody know?

@wborn
Copy link
Member

wborn commented Apr 2, 2022

As workaround you can for instance update the nrjavaserial bundle to a snapshot build.

To update the bundle on the Karaf Console to a snapshot build with the fix (in my fork) use:

bundle:update nrjavaserial https://github.com/wborn/nrjavaserial/releases/download/5.2.1-20220113/nrjavaserial-5.2.1.202201130000.jar

@JensHoRi
Copy link

JensHoRi commented Apr 2, 2022

Thanks for all your work. Just did and will report how it goes ;)

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/problem-with-setting-up-zooz-usb-z-wave-plus-s2-stick-zst10/134603/73

@JensHoRi
Copy link

JensHoRi commented Apr 3, 2022

Snapshot seems to work. No problems until yet, USB-devices all still on and running :-) Great work

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/oh3-x-alternative-java-serial-provider/128462/5

wborn added a commit to wborn/openhab-core that referenced this issue Apr 7, 2022
Uses an openHAB 5.2.1.OH1 build based on the latest changes in the nrjavaserial master branch (https://github.com/NeuronRobotics/nrjavaserial/tree/7aa21d1dc8cecdc8daad3ebc40273cfb8179e9d2).
When there is an official release containing those changes we can upgrade to that.

Most importantly this fixes a file descriptor leak when checking lock dir permissions.
It also adds FreeBSD aarch64 (ARM64) support.

Fixes openhab#1842

Signed-off-by: Wouter Born <[email protected]>
kaikreuzer pushed a commit that referenced this issue Apr 8, 2022
Uses an openHAB 5.2.1.OH1 build based on the latest changes in the nrjavaserial master branch (https://github.com/NeuronRobotics/nrjavaserial/tree/7aa21d1dc8cecdc8daad3ebc40273cfb8179e9d2).
When there is an official release containing those changes we can upgrade to that.

Most importantly this fixes a file descriptor leak when checking lock dir permissions.
It also adds FreeBSD aarch64 (ARM64) support.

Fixes #1842

Signed-off-by: Wouter Born <[email protected]>
wborn added a commit that referenced this issue Apr 8, 2022
Uses an openHAB 5.2.1.OH1 build based on the latest changes in the nrjavaserial master branch (https://github.com/NeuronRobotics/nrjavaserial/tree/7aa21d1dc8cecdc8daad3ebc40273cfb8179e9d2).
When there is an official release containing those changes we can upgrade to that.

Most importantly this fixes a file descriptor leak when checking lock dir permissions.
It also adds FreeBSD aarch64 (ARM64) support.

Fixes #1842

Signed-off-by: Wouter Born <[email protected]>
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/aeotec-z-wave-gen5-stick-stays-offline-after-container-restart-raspi-reboot/136990/5

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/aeotec-z-wave-gen5-stick-stays-offline-after-container-restart-raspi-reboot/136990/23

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/aeotec-z-wave-gen5-stick-stays-offline-after-container-restart-raspi-reboot/136990/25

@Mr-jreeves
Copy link

Mr-jreeves commented Aug 3, 2022

I am experiencing this same issue on OpenHab 3.4.0 Build #3029. The Zwave process stops at:

2022-08-03 07:02:21.029 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyUSB0'

and the syslog at the same time shows:

Aug 3 07:02:21 openhabian karaf[955]: initialise_event_info_struct: eis->fd >= FD_SETSIZE!

I have found that this problem is intermittent. I have only seen this when rebooting. Sometimes it happens, sometimes it does not. I doubt this is related, but the times, so far, that I have made it work is when I disconnect the Pi4 from power, and remove the Ethernet cable and let the system sit for 5 minutes ... (sounds like black magic so likely just coincidental)

This never happened when running OpenHab 3.2.0.M4.

I have confirmed I am running:

308 │ Active │ 80 │ 5.2.1.OH1 │ nrjavaserial

This is very repeatable (and annoying since it can take some tries to get the system up) ... I can help with some logs if more information is needed.

This problem has been discussed in this case:

https://community.openhab.org/t/zwave-bridge-wont-go-online/137521

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/zwave-bridge-wont-go-online/137521/24

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/oh3-x-alternative-java-serial-provider/128462/13

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/aeotec-z-wave-gen5-stick-stays-offline-after-container-restart-raspi-reboot/136990/29

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/aeotec-z-wave-gen5-stick-stays-offline-after-container-restart-raspi-reboot/136990/30

@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/openhabian-rpi4-zwave-gen5-falls-offline-on-restart/146694/46

splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 11, 2023
…openhab#2272)

Workaround for openhab#1842.
Typically serial connections are disconnected and reconnected on IO
errors. This has turned out to be problematic with the recent
nrjavaserial updates brought by OH3 (locking behaviour of nrjavaserial
seems to be prone to deadlocks).

We workaround the issues by trying to keep the serial connection open
as long as possible.

Signed-off-by: Sami Salonen <[email protected]>
GitOrigin-RevId: b1b5843
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this issue Jul 12, 2023
Uses an openHAB 5.2.1.OH1 build based on the latest changes in the nrjavaserial master branch (https://github.com/NeuronRobotics/nrjavaserial/tree/7aa21d1dc8cecdc8daad3ebc40273cfb8179e9d2).
When there is an official release containing those changes we can upgrade to that.

Most importantly this fixes a file descriptor leak when checking lock dir permissions.
It also adds FreeBSD aarch64 (ARM64) support.

Fixes openhab#1842

Signed-off-by: Wouter Born <[email protected]>
GitOrigin-RevId: 5df95cd
@openhab-bot
Copy link
Collaborator

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/is-smartmeter-reading-over-serial-interface-recommended/150912/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external bug A problem or unintended behavior of an external library
Projects
None yet