Skip to content

Commit

Permalink
fixes to match latest rtl_433 changes to acurite lightning sensor. ad…
Browse files Browse the repository at this point in the history
…ded support for nexus temperature sensor.
  • Loading branch information
matthewwall committed Jul 6, 2018
1 parent 3f186ab commit b1d2eb5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
16 changes: 9 additions & 7 deletions bin/user/sdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@
So this driver is designed to look for json first, then fall back to single-
or multi-line plain text format.
WARNING: Handling of units and unit systems in rtl_433 is a mess. Although
there is an option to request SI units, there is no indicate in the decoder
output whether that option is respected, nor does rtl_433 specify exactly
which SI units are used for various types of measure.
WARNING: Handling of units and unit systems in rtl_433 is a mess, but it is
getting better. Although there is an option to request SI units, there is no
indicate in the decoder output whether that option is respected, nor does
rtl_433 specify exactly which SI units are used for various types of measure.
There seems to be a pattern of appending a unit label to the observation name
in the JSON data, for example 'wind_speed_mph' instead of just 'wind_speed'.
"""

from __future__ import with_statement
Expand Down Expand Up @@ -87,7 +89,7 @@


DRIVER_NAME = 'SDR'
DRIVER_VERSION = '0.39'
DRIVER_VERSION = '0.40'

# The default command requests json output from every decoder
# -q - suppress non-data messages
Expand Down Expand Up @@ -446,8 +448,8 @@ def parse_text(ts, payload, lines):
lines.pop(0)
return Acurite.insert_ids(pkt, Acurite5n1Packet.__name__)

# {"time" : "2017-01-16 02:34:12", "model" : "Acurite 5n1 sensor", "sensor_id" : 3066, "channel" : "C", "sequence_num" : 1, "battery" : "OK", "message_type" : 49, "wind_speed" : 0.000, "wind_dir_deg" : 67.500, "wind_dir" : "ENE", "rainfall_accumulation" : 0.000, "raincounter_raw" : 8978}
# {"time" : "2017-01-16 02:37:33", "model" : "Acurite 5n1 sensor", "sensor_id" : 3066, "channel" : "C", "sequence_num" : 1, "battery" : "OK", "message_type" : 56, "wind_speed" : 0.000, "temperature_F" : 27.500, "humidity" : 56}
# {"time" : "2017-12-24 02:07:00", "model" : "Acurite 5n1 sensor", "sensor_id" : 2662, "channel" : "A", "sequence_num" : 2, "battery" : "OK", "message_type" : 56, "wind_speed_mph" : 0.000, "temperature_F" : 47.500, "humidity" : 74}
# {"time" : "2017-12-24 02:07:18", "model" : "Acurite 5n1 sensor", "sensor_id" : 2662, "channel" : "A", "sequence_num" : 2, "battery" : "OK", "message_type" : 49, "wind_speed_mph" : 0.000, "wind_dir_deg" : 157.500, "wind_dir" : "SSE", "rainfall_accumulation_inch" : 0.000, "raincounter_raw" : 421}

@staticmethod
def parse_json(obj):
Expand Down
5 changes: 5 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.40 06jul18
* deal with acurite 5in1 changes in rtl_433. thanks to user andylittle!
* deal with acurite lightning sensor changes in rtl_433. thanks to mlfreeman2!
* added support for Nexus temperature sensor. thanks to user vg8020!

0.39 01jan17
* deal with change from wind_speed to wind_speed_mph for rtl433 parsing of 5in1

Expand Down
2 changes: 1 addition & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def loader():
class SDRInstaller(ExtensionInstaller):
def __init__(self):
super(SDRInstaller, self).__init__(
version="0.39",
version="0.40",
name='sdr',
description='Capture data from rtl_433',
author="Matthew Wall",
Expand Down

0 comments on commit b1d2eb5

Please sign in to comment.