[SOLVED] Error while executing background thread Davis Refresh Service

Second post around here :slight_smile:

But i’ve got this error for at while now and i’m having trouble finding a solution.
I use the Davis binding (1.10.0) with Davis Vantage VUE weather station on OpenHAB (2.1.0)
It works for a while between 20 minutes and a couple of hours and then out of nowhere this error appears:

2017-10-29 12:26:47.500 [DEBUG] [.binding.davis.internal.DavisBinding] - TX: \n
2017-10-29 12:26:47.604 [DEBUG] [.binding.davis.internal.DavisBinding] - waiting for wakeup response
2017-10-29 12:26:47.885 [DEBUG] [.binding.davis.internal.DavisBinding] - RX: \n\r
2017-10-29 12:26:47.885 [DEBUG] [.binding.davis.internal.DavisBinding] - sendCommand() method is called!
2017-10-29 12:26:47.885 [DEBUG] [.binding.davis.internal.DavisBinding] - TX: LOOP 1\n
2017-10-29 12:26:49.297 [DEBUG] [.binding.davis.internal.DavisBinding] - RX: <ACK>LOO<<0x00>8....
2017-10-29 12:26:49.297 [DEBUG] [.binding.davis.internal.DavisBinding] - parsing: LOO<<0x00>8....
2017-10-29 12:26:49.302 [DEBUG] [.binding.davis.internal.DavisBinding] - sending wakeup sequence
2017-10-29 12:26:49.302 [DEBUG] [.binding.davis.internal.DavisBinding] - TX: \n
2017-10-29 12:26:49.410 [DEBUG] [.binding.davis.internal.DavisBinding] - waiting for wakeup response
2017-10-29 12:26:49.572 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread Davis Refresh Service
java.lang.NegativeArraySizeException
	at org.openhab.binding.davis.internal.DavisBinding.readResponse(DavisBinding.java:234)[281:org.openhab.binding.davis:1.11.0.201707300110]
	at org.openhab.binding.davis.internal.DavisBinding.wakeup(DavisBinding.java:367)[281:org.openhab.binding.davis:1.11.0.201707300110]
	at org.openhab.binding.davis.internal.DavisBinding.execute(DavisBinding.java:107)[281:org.openhab.binding.davis:1.11.0.201707300110]
	at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:157)[217:org.openhab.core.compat1x:2.1.0]
	at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:169)[217:org.openhab.core.compat1x:2.1.0]
2017-10-29 12:26:59.573 [TRACE] [.binding.davis.internal.DavisBinding] - execute() method is called!
2017-10-29 12:27:02.573 [ERROR] [.binding.davis.internal.DavisBinding] - gnu.io.PortInUseException: openhab
2017-10-29 12:27:02.573 [TRACE] [.binding.davis.internal.DavisBinding] - execute() method is finished!
2017-10-29 12:27:12.578 [TRACE] [.binding.davis.internal.DavisBinding] - execute() method is called!
2017-10-29 12:27:15.579 [ERROR] [.binding.davis.internal.DavisBinding] - gnu.io.PortInUseException: openhab
2017-10-29 12:27:15.579 [TRACE] [.binding.davis.internal.DavisBinding] - execute() method is finished!
2017-10-29 12:27:25.580 [TRACE] [.binding.davis.internal.DavisBinding] - execute() method is called!
2017-10-29 12:27:28.585 [ERROR] [.binding.davis.internal.DavisBinding] - gnu.io.PortInUseException: openhab
2017-10-29 12:27:28.585 [TRACE] [.binding.davis.internal.DavisBinding] - execute() method is finished!

Afterwards the serial port is hanging in an open state.

Does anyone have a clue about what is happening and how to solve the issue?

Thanks!
Tobias

I’m not sure if it is related at all, but i just looked at the console window when the “crash” happened. Could it be a collision between Z-wave binding and the Davis binding?

21:18:26.092 [DEBUG] [.binding.davis.internal.DavisBinding] - sending wakeup sequence
21:18:26.092 [DEBUG] [.binding.davis.internal.DavisBinding] - TX: \n
21:18:26.096 [INFO ] [marthome.event.ItemStateChangedEvent] - O_DAVIS_WindSpeed changed from 0 to 8.04672000000000053887561080045998096466064453125
21:18:26.199 [DEBUG] [.binding.davis.internal.DavisBinding] - waiting for wakeup response
21:18:26.634 [INFO ] [marthome.event.ItemStateChangedEvent] - O_DAVIS_UPDATE changed from NULL to 2017-10-29T21:18:26.489+0100
21:18:26.636 [INFO ] [marthome.event.ItemStateChangedEvent] - O_DAVIS_WindDirection changed from 42 to 21
21:18:26.637 [INFO ] [marthome.event.ItemStateChangedEvent] - O_DAVIS_WindSpeed_MS changed from 0.00000000 to 2.23520000
21:18:26.747 [INFO ] [marthome.event.ItemStateChangedEvent] - O_DAVIS_WindDirection_HEADING changed from NNE to N
Error 0x79 at src/windows/termios.c(1323): The semaphore timeout period has exp
21:18:26.757 [INFO ] [marthome.event.ItemStateChangedEvent] - O_DAVIS_UPDATE changed from 2017-10-29T21:18:26.489+0100 to 2017-1W0-29T21:18:26.551+0100
rite action failed! Input/output error
21:18:26.807 [ERROR] [WaveSerialHandler$ZWaveReceiveThread] - Input/output error in writeByte
21:18:26.841 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread Davis Refresh Service
java.lang.NegativeArraySizeException
        at org.openhab.binding.davis.internal.DavisBinding.readResponse(DavisBinding.java:234)[281:org.openhab.binding.davis:1.11.0.201707300110]
        at org.openhab.binding.davis.internal.DavisBinding.wakeup(DavisBinding.java:367)[281:org.openhab.binding.davis:1.11.0.201707300110]
        at org.openhab.binding.davis.internal.DavisBinding.execute(DavisBinding.java:107)[281:org.openhab.binding.davis:1.11.0.201707300110]
        at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:157)[217:org.openhab.core.compat1x:2.1.0]
        at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:169)[217:org.openhab.core.compat1x:2.1.0]
21:18:36.842 [TRACE] [.binding.davis.internal.DavisBinding] - execute() method is called!
21:18:39.843 [ERROR] [.binding.davis.internal.DavisBinding] - gnu.io.PortInUseException: openhab
21:18:39.843 [TRACE] [.binding.davis.internal.DavisBinding] - execute() method is finished!
21:18:49.843 [TRACE] [.binding.davis.internal.DavisBinding] - execute() method is called!
21:18:52.843 [ERROR] [.binding.davis.internal.DavisBinding] - gnu.io.PortInUseException: openhab

Additional detail i should have mentioned in my first post. I’m using VirtualHere USB over network (RPi server with both Vantage VUE and Aeon Z-stick attached)