OK..here is what I get from the command you suggested below:
pi@raspberrypi:/etc/weewx $ sudo PYTHONPATH=/usr/share/weewx python
/usr/share/weewx/user/sdr.py --cmd="rtl_433 -M -UTC -F json -G"
out: ['{"time" : "2019-01-03 00:01:47", "model" : "Acurite Lightning
6045M", "id" : 40, "channel" : "A", "temperature_F" : 71.200, "humidity" :
34, "strike_count" : 121, "storm_dist" : 22, "active" : 0, "rfi" : 0,
"ussb1" : 0, "battery" : "OK", "exception" : 0, "raw_msg" :
"c0286f221124f9963d"}\n', '{"time" : "2019-01-03 00:01:47", "model" :
"Acurite Lightning 6045M", "id" : 40, "channel" : "A", "temperature_F" :
71.200, "humidity" : 34, "strike_count" : 121, "storm_dist" : 22, "active"
: 0, "rfi" : 0, "ussb1" : 0, "battery" : "OK", "exception" : 0, "raw_msg" :
"c0286f221124f9963d"}\n', '{"time" : "2019-01-03 00:01:47", "model" :
"Acurite Lightning 6045M", "id" : 40, "channel" : "A", "temperature_F" :
71.200, "humidity" : 34, "strike_count" : 121, "storm_dist" : 22, "active"
: 0, "rfi" : 0, "ussb1" : 0, "battery" : "OK", "exception" : 0, "raw_msg" :
"c0286f221124f9963d"}\n']
parsed: {'battery.0028.AcuriteLightningPacket': 0,
'strikes_total.0028.AcuriteLightningPacket': 121,
'channel.0028.AcuriteLightningPacket': u'A',
'humidity.0028.AcuriteLightningPacket': 34,
'temperature.0028.AcuriteLightningPacket': 71.2, 'dateTime': 1546473707,
'distance.0028.AcuriteLightningPacket': 22,
'active.0028.AcuriteLightningPacket': 0, 'rfi.0028.AcuriteLightningPacket':
0, 'ussb1.0028.AcuriteLightningPacket': 0, 'usUnits': 1,
'exception.0028.AcuriteLightningPacket': 0}
parsed: {'battery.0028.AcuriteLightningPacket': 0,
'strikes_total.0028.AcuriteLightningPacket': 121,
'channel.0028.AcuriteLightningPacket': u'A',
'humidity.0028.AcuriteLightningPacket': 34,
'temperature.0028.AcuriteLightningPacket': 71.2, 'dateTime': 1546473707,
'distance.0028.AcuriteLightningPacket': 22,
'active.0028.AcuriteLightningPacket': 0, 'rfi.0028.AcuriteLightningPacket':
0, 'ussb1.0028.AcuriteLightningPacket': 0, 'usUnits': 1,
'exception.0028.AcuriteLightningPacket': 0}
parsed: {'battery.0028.AcuriteLightningPacket': 0,
'strikes_total.0028.AcuriteLightningPacket': 121,
'channel.0028.AcuriteLightningPacket': u'A',
'humidity.0028.AcuriteLightningPacket': 34,
'temperature.0028.AcuriteLightningPacket': 71.2, 'dateTime': 1546473707,
'distance.0028.AcuriteLightningPacket': 22,
'active.0028.AcuriteLightningPacket': 0, 'rfi.0028.AcuriteLightningPacket':
0, 'ussb1.0028.AcuriteLightningPacket': 0, 'usUnits': 1,
'exception.0028.AcuriteLightningPacket': 0}
out: ['{"time" : "2019-01-03 00:01:50", "model" : "Acurite 5n1 sensor",
"sensor_id" : 3431, "channel" : "A", "sequence_num" : 0, "battery" : "OK",
"message_type" : 49, "wind_speed_mph" : 0.000, "wind_dir_deg" : 337.500,
"rain_inch" : 3.210}\n', '{"time" : "2019-01-03 00:01:50", "model" :
"Acurite 5n1 sensor", "sensor_id" : 3431, "channel" : "A", "sequence_num" :
1, "battery" : "OK", "message_type" : 49, "wind_speed_mph" : 0.000,
"wind_dir_deg" : 337.500, "rain_inch" : 3.210}\n', '{"time" : "2019-01-03
00:01:50", "model" : "Acurite 5n1 sensor", "sensor_id" : 3431, "channel" :
"A", "sequence_num" : 2, "battery" : "OK", "message_type" : 49,
"wind_speed_mph" : 0.000, "wind_dir_deg" : 337.500, "rain_inch" : 3.210}\n']
parsed: {'rain_counter.0D67.Acurite5n1Packet': None,
'status.0D67.Acurite5n1Packet': None, 'dateTime': 1546473710,
'channel.0D67.Acurite5n1Packet': u'A', 'battery.0D67.Acurite5n1Packet': 0,
'wind_dir.0D67.Acurite5n1Packet': 337.5,
'wind_speed.0D67.Acurite5n1Packet': 0.0, 'usUnits': 1}
parsed: {'rain_counter.0D67.Acurite5n1Packet': None,
'status.0D67.Acurite5n1Packet': None, 'dateTime': 1546473710,
'channel.0D67.Acurite5n1Packet': u'A', 'battery.0D67.Acurite5n1Packet': 0,
'wind_dir.0D67.Acurite5n1Packet': 337.5,
'wind_speed.0D67.Acurite5n1Packet': 0.0, 'usUnits': 1}
parsed: {'rain_counter.0D67.Acurite5n1Packet': None,
'status.0D67.Acurite5n1Packet': None, 'dateTime': 1546473710,
'channel.0D67.Acurite5n1Packet': u'A', 'battery.0D67.Acurite5n1Packet': 0,
'wind_dir.0D67.Acurite5n1Packet': 337.5,
'wind_speed.0D67.Acurite5n1Packet': 0.0, 'usUnits': 1}
On Wednesday, January 2, 2019 at 11:39:02 PM UTC-6, mwall wrote:
>
> the weewx-sdr extension maps 'raincounter_raw' to 'rain_counter'. but the
> 'rain_counter' is a raw value - it has not been converted to the correct
> units (in this case, cm since the usUnits is METRIC).
>
> so the sensor map should contain:
>
> rain_total = rain_total.xxxx.Acurite5n1Packet
>
> where xxxx is the sensor identifier (a hex string in the case of acurite
> 5n1 instruments)
>
> when i first wrote the weewx-sdr driver, the names reported by rtl433 were
> all over the place, and most of the sensors had no json output. thus my
> attempt to normalize them to something more standard. now that rtl433 has
> much more consistent output, it probably makes sense to make weewx-sdr get
> out of the way and let the sensor_map do more of the work. maybe that is a
> refactoring task to prepare weewx-sdr for a 1.0 release...
>
> for example:
>
> rain_total - total rain count since some reset, in some unit system
> (depends on hardware, typically counter wraparound, power cycle, or
> daily/monthly/yearly reset)
>
> rain - delta value between two times, typically either loop period or
> archive interval
>
> rain_counter - arbitrary counter as number of bucket tips or raindrop
> events (depends on hardware)
>
> the raw labels vary a lot, from 'rfa' (HTTP output from LW30x) to
> 'raincounter_raw' (JSON output from recent rtl433 for acurite 5n1) to
> binary values in specific locations (most other hardware).
>
> charlie, sorry that this has been such a goose chase. there are so many
> different types of sensors and many of their interfaces have changed over
> the past 10 years, so i sometimes get confused between interceptor and sdr
> and some of the low-level protocol naming conventions. when in doubt, look
> at the code! :)
>
> if you could post the output from running weewx-sdr directly, that would
> clarify a lot.
>
> sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/sdr.py
> --cmd="rtl_433 -M UTC -F json -G -vv"
>
> note that the 'cmd' should match whatever you have in your weewx
> configuration file, otherwise you are testing apples while running oranges.
>
> m
>
>
> On Wednesday, January 2, 2019 at 9:29:12 PM UTC-5, rich T wrote:
>>
>> Charlie
>>
>> I believe message 49 of the Acurite5n1Packet has two keys/value for
>> rainfall:
>>
>> rainfall_accumulation_inch
>> raincounter_raw
>>
>> Try the following mapping:
>> rain_total = rainfall_accumulation_inch.0D67.Acurite5n1Packet.
>>
>> Can you post the results of the cmd Gary provided.
>>
>> Rich
>>
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.