Skip to content

Commit

Permalink
acurite 606tx update
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwall committed Oct 27, 2021
1 parent f1346c0 commit 79e407c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/user/sdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,10 @@ def get_rain_total(obj):
class Acurite606TXPacket(Packet):
# 2017-03-20: Acurite 606TX Temperature Sensor
# {"time" : "2017-03-04 16:18:12", "model" : "Acurite 606TX Sensor", "id" : 48, "battery" : "OK", "temperature_C" : -1.100}
# {"time" : "2021-10-26 23:39:49", "model" : "Acurite-606TX", "id" : 194, "battery_ok" : 1, "temperature_C" : 19.200, "mic" : "CHECKSUM"}

IDENTIFIER = "Acurite 606TX Sensor"
# IDENTIFIER = "Acurite 606TX Sensor"
IDENTIFIER = "Acurite-606TX"

@staticmethod
def parse_json(obj):
Expand All @@ -715,7 +717,10 @@ def parse_json(obj):
pkt['usUnits'] = weewx.METRIC
sensor_id = obj.get('id')
pkt['temperature'] = Packet.get_float(obj, 'temperature_C')
pkt['battery'] = 0 if obj.get('battery') == 'OK' else 1
if 'battery' in obj:
pkt['battery'] = 0 if obj.get('battery') == 'OK' else 1
if 'battery_ok' in obj:
pkt['battery'] = 0 if Packet.get_int(obj, 'battery_ok') == 1 else 1
pkt = Packet.add_identifiers(pkt, sensor_id, Acurite606TXPacket.__name__)
return pkt

Expand Down
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* fix bresser 6in1 indentation
* use introspection for packet listing - packet must have IDENTIFIER
* provide more feedback when listing recognized packet types
* update identifier and fields for Acurite 606TX

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

0 comments on commit 79e407c

Please sign in to comment.