Serial bridge stops processing messages

I have a RPi4, 4GB, with OH 3.02. Several bindings are installed with no serious issues so far (one minor with the OpenTherm, but still need to test the new release).

On the roof of my house I have a Hydreon RG-9 optical rain sensor installed and wired it to the serial port of a nodeMCU. On the RPi running Raspberry OS, socat communicates with the NodeMCU. Openhab connects to the “virtual” serial port ttySER1. So far so good.

But every few weeks communication just stops (not receiving messages). Openhab is showing the serial bridge as online, but no data is showing as being received. When I disable the bridge and enable it again (after 10 seconds or more) data is being received again, but the first data received is all the data of the period during which no data was shown in Openhab. So when the data stopped for 2 hours, the first data received at once is the data of about two hours… Which is a bummer when that data contains information if it is raining or not and the sun shades should be commanded to retract due to rain.

When all missed data comes in at once suggests that it is still buffering/caching in Openhab but the bridge does not receive it. Anyone that can direct me to prevent the serial bridge posing this behavior (or that I am blaming the binding for no reason)?

It was noted in other bindings that share the serial library that some errors would not be recovered, the serial port reconnect messes up.
There was some work on this for 3.1 I believe.

I did not yet upgrade to 3.1 yet due to one of the most important bindings for me (not official eBus binding) not being compatible yet with it. However that changed last week, so it is time to install 3.1 in a test environment to do some testing :slight_smile:

In the mean time I am trying to take a new approach towards the serial device by requesting the rain value every minute and performing a reset of the optical rain sensor every midnight. Maybe that sending a command regularly will keep the receipt of messages going.