OK. I will do that. Thank you El miércoles, 23 de junio de 2021 a las 15:16:33 UTC+2, gjr80 escribió:
> 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 > <https://github.com/matthewwall/weewx-sdr/blob/2382c2c08bc7ccbd969f783fc6b8c35c3e65083f/bin/user/sdr.py#L1114>. > > The solution is to modify the parse_json() method in class FOWHx080Packet() > to parse the additional fields. > > Gary > > On Wednesday, 23 June 2021 at 23:01:20 UTC+10 [email protected] wrote: > >> 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? >> > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8043a41d-48fd-4efa-bed0-9d946c1199dcn%40googlegroups.com.
