Skip to content

Commit 79e407c

Browse files
committed
acurite 606tx update
1 parent f1346c0 commit 79e407c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bin/user/sdr.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,10 @@ def get_rain_total(obj):
705705
class Acurite606TXPacket(Packet):
706706
# 2017-03-20: Acurite 606TX Temperature Sensor
707707
# {"time" : "2017-03-04 16:18:12", "model" : "Acurite 606TX Sensor", "id" : 48, "battery" : "OK", "temperature_C" : -1.100}
708+
# {"time" : "2021-10-26 23:39:49", "model" : "Acurite-606TX", "id" : 194, "battery_ok" : 1, "temperature_C" : 19.200, "mic" : "CHECKSUM"}
708709

709-
IDENTIFIER = "Acurite 606TX Sensor"
710+
# IDENTIFIER = "Acurite 606TX Sensor"
711+
IDENTIFIER = "Acurite-606TX"
710712

711713
@staticmethod
712714
def parse_json(obj):
@@ -715,7 +717,10 @@ def parse_json(obj):
715717
pkt['usUnits'] = weewx.METRIC
716718
sensor_id = obj.get('id')
717719
pkt['temperature'] = Packet.get_float(obj, 'temperature_C')
718-
pkt['battery'] = 0 if obj.get('battery') == 'OK' else 1
720+
if 'battery' in obj:
721+
pkt['battery'] = 0 if obj.get('battery') == 'OK' else 1
722+
if 'battery_ok' in obj:
723+
pkt['battery'] = 0 if Packet.get_int(obj, 'battery_ok') == 1 else 1
719724
pkt = Packet.add_identifiers(pkt, sensor_id, Acurite606TXPacket.__name__)
720725
return pkt
721726

changelog

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* fix bresser 6in1 indentation
44
* use introspection for packet listing - packet must have IDENTIFIER
55
* provide more feedback when listing recognized packet types
6+
* update identifier and fields for Acurite 606TX
67

78
0.82 26oct2021
89
* huge thanks to andylittle for rolling up many changes while i was unavailable

0 commit comments

Comments
 (0)