From eecfb9beee078bb390edc4dfb50ccfef65bbe4f2 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Thu, 23 Apr 2015 15:37:43 -0400 Subject: [PATCH] make test for dodgey data less restrictive. treat raw[3] & 0xf0 as battery status not sensor type. --- bin/weewx/drivers/acurite.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/weewx/drivers/acurite.py b/bin/weewx/drivers/acurite.py index 8b613994..5be0e025 100644 --- a/bin/weewx/drivers/acurite.py +++ b/bin/weewx/drivers/acurite.py @@ -600,15 +600,13 @@ class Station(object): data['sensor_id'] = None data['rssi'] = None data['sensor_battery'] = None - elif raw[9] != 0xff: + elif raw[9] != 0xff and raw[9] != 0x00: loginf("R1: ignoring dodgey data: %s" % _fmt_bytes(raw)) data['channel'] = Station.decode_channel(raw) data['sensor_id'] = Station.decode_sensor_id(raw) data['rssi'] = Station.decode_rssi(raw) data['sensor_battery'] = None elif raw[3] & 0x0f == 1 or raw[3] & 0x0f == 8: - if raw[3] & 0xf0 != 0x70: - loginf("R1: unexpected sensor type: %s" % _fmt_bytes(raw)) data['channel'] = Station.decode_channel(raw) data['sensor_id'] = Station.decode_sensor_id(raw) data['rssi'] = Station.decode_rssi(raw)