matthewwall / weewx-sdr

weewx driver for software-defined radio
GNU General Public License v3.0
114 stars 74 forks source link

Duplicates on WH1080 #123

Closed mosiser closed 2 years ago

mosiser commented 3 years ago

The WH1080 sensors send alternatively, every 48 seconds, a single and a double signal. The double signal is counted double even on weewx LOOPs. I don't know if this is bad for averages and calculations... I read that the sdr driver has a duplicate-ignoring feature, but it seems that doesn't work in this case, probably because the timestamp is a slight different.

Here is an example of the double packet on weewx syslog:

Apr 3 11:17:43 orangepizero weewx[1907] DEBUG user.sdr: packet={'windGust': 8.568, 'outBatteryStatus': 0, 'rain_total': 112.71, 'windSpeed': 7.344, 'windDir': 180.0, 'outHumidity': 15.0, 'outTemp': 13.6, 'dateTime': 1617441459, 'usUnits': 16} Apr 3 11:17:43 orangepizero weewx[1907] DEBUG user.sdr: packet={'windGust': 8.568, 'outBatteryStatus': 0, 'rain_total': 112.71, 'windSpeed': 7.344, 'windDir': 180.0, 'outHumidity': 15.0, 'outTemp': 13.6, 'dateTime': 1617441460, 'usUnits': 16}

They are identical, except for the dateTime that change of one unit.

Is there any way of remove these duplicates, or is unnecessary?

matthewwall commented 2 years ago

implemented a timestamp threshold at commit 0ccf340. default is 1 second. so two packets with identical data but timestamps that differ by 1 second will be considered different. you can change the threshold in the sdr configuration in your weewx config file.