Thanks for the input, craigh. It is very valuable.
My current approach is to have a configurable update interval. During this interval all readings are collected and averages are computed at the end of the interval. This average is then sent as update.
So whether outlier readings cause havoc currently depends very much on the interval that is configured. I am not so sure that the current approach is good, it is the just the first thing I came up with and it works fairly well with my configured update interval of 60 seconds.
But it would certainly be improved by discarding values that differ too much from the last value.
The thing is that you currently do not have to define any ports at all. The discovery iterates all serial ports and finds the jeelinks. I have no idea how this would work with tcp ports. But leaving discovery aside, I could have a look on how to make this work when the connection is specified manually via paper ui.