SDR not mapping all fields

58 views
Skip to first unread message

enu...@gmail.com

unread,
Jun 23, 2021, 9:01:20 AM6/23/21
to weewx-user
I have in weewx.conf
[SDR]
    driver = user.sdr
    cmd = rtl_433 -q -F json -R 32 -M utc -M level -f 868.3M
    path = /usr/local/bin
    #ld_library_path = /usr/local/lib:/opt/rtl-sdr/lib
    log_unmapped_sensors = True
    [[sensor_map]]
        windGust = wind_gust.*.FOWHx080Packet
        windDir = wind_dir.*.FOWHx080Packet
        windSpeed = wind_speed.*.FOWHx080Packet
        outTemp = temperature.*.FOWHx080Packet
        outHumidity = humidity.*.FOWHx080Packet
        rain_total = rain_total.*.FOWHx080Packet
        #battery = battery.*.FOWHx080Packet
        rssi = rssi.*.FOWHx080Packet
        snr = snr.*.FOWHx080Packet
        noise = noise.*.FOWHx080Packet
I get if i run sudo PYTHONPATH=bin python bin/user/sdr.py --cmd="rtl_433 -f 868.3M -R 32 -F json -M level"
The output is this
out:[u'{"time" : "2021-06-23 14:54:44", "model" : "Fine Offset Electronics WH1080/WH3080 Weather Station", "msg_type" : 0, "id" : 106, "temperature_C" : 20.200, "humidity" : 53, "direction_deg" : 225, "speed" : 0.000, "gust" : 1.224, "rain" : 102.000, "battery" : "OK", "mic" : "CRC", "mod" : "ASK", "freq" : 868.306, "rssi" : -10.221, "snr" : 23.472, "noise" : -33.693}\n', u'{"time" : "2021-06-23 14:54:44", "model" : "Fine Offset Electronics WH1080/WH3080 Weather Station", "msg_type" : 0, "id" : 106, "temperature_C" : 20.200, "humidity" : 53, "direction_deg" : 225, "speed" : 0.000, "gust" : 1.224, "rain" : 102.000, "battery" : "OK", "mic" : "CRC", "mod" : "ASK", "freq" : 868.305, "rssi" : -10.415, "snr" : 24.739, "noise" : -35.154}\n']
parsed: {'msg_type.106.FOWHx080Packet': 0, 'signal_type.106.FOWHx080Packet': 0, 'temperature.106.FOWHx080Packet': 20.2, 'hours.106.FOWHx080Packet': None, 'wind_gust.106.FOWHx080Packet': 1.224, 'minutes.106.FOWHx080Packet': None, 'dateTime': 1624460084, 'wind_speed.106.FOWHx080Packet': 0.0, 'year.106.FOWHx080Packet': None, 'battery.106.FOWHx080Packet': 0, 'month.106.FOWHx080Packet': None, 'wind_dir.106.FOWHx080Packet': 225.0, 'seconds.106.FOWHx080Packet': None, 'humidity.106.FOWHx080Packet': 53.0, 'day.106.FOWHx080Packet': None, 'usUnits': 16, 'rain_total.106.FOWHx080Packet': 10.2}
In the lines noise, rssi, snr appears but not in the parsed why?

gjr80

unread,
Jun 23, 2021, 9:16:33 AM6/23/21
to weewx-user
rtl_433 knows how to decode the signal from the WH1080 and obtain the noise, rssi and snr data but the SDR does not know how to parse these fields. Refer to class FOWHx080Packet() in the SDR driver. The solution is to modify the parse_json() method in class FOWHx080Packet() to parse the additional fields.

Gary

enu...@gmail.com

unread,
Jun 23, 2021, 12:27:51 PM6/23/21
to weewx-user
OK. I will do that.
Thank you

Reply all
Reply to author
Forward
0 new messages