Adding Fine Offset WH25 and Fine Offset WH51 to SDR SENSOR MAP

105 views
Skip to first unread message

Richard Horobin

unread,
May 6, 2020, 4:01:18 AM5/6/20
to weewx-user
My SDR-based weewx installation works, and now I want to add two more sensors. Could you please help?

Question. I cannot find the correct device names to go into the [[SENSOR MAP]].  I stopped weewx, ran SDR.PY and looked for PARSED output, but saw none.

Possibility A: SDR.PY contains the relevant parts, but I must do something else to get it to work.

Possibility B: SDR.PY does not yet contain the relevant parts.

Possibility C: Something else, about which I am totally unaware.

Background Info:

Currently, the [[SENSOR MAP]] has input from an Acurite5n1 and an AmbientWH31.  Here is the SDR.PY output, showing that it produces the PARSED output for R 40.
PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/sdr.py --cmd="rtl_433 -M utc -F json -R 40"
out:[u'{"time" : "2020-05-06 07:45:14", "model" : "Acurite-5n1", "subtype" : 49, "id" : 1030, "channel" : "A", "sequence_num" : 0, "battery_ok" : 1, "wind_avg_km_h" : 3.483, "wind_dir_deg" : 22.500, "rain_in" : 9.580, "mic" : "CHECKSUM"}\n', u'{"time" : "2020-05-06 07:45:14", "model" : "Acurite-5n1", "subtype" : 49, "id" : 1030, "channel" : "A", "sequence_num" : 1, "battery_ok" : 1, "wind_avg_km_h" : 3.483, "wind_dir_deg" : 22.500, "rain_in" : 9.580, "mic" : "CHECKSUM"}\n', u'{"time" : "2020-05-06 07:45:14", "model" : "Acurite-5n1", "subtype" : 49, "id" : 1030, "channel" : "A", "sequence_num" : 2, "battery_ok" : 1, "wind_avg_km_h" : 3.483, "wind_dir_deg" : 22.500, "rain_in" : 9.580, "mic" : "CHECKSUM"}\n']
parsed: {'snr.0406.Acurite5n1PacketV2': None, 'noise.0406.Acurite5n1PacketV2': None, 'freq.0406.Acurite5n1PacketV2': None, 'mod.0406.Acurite5n1PacketV2': None, 'sequence_num.0406.Acurite5n1PacketV2': 0, 'model.0406.Acurite5n1PacketV2': u'Acurite-5n1', 'protocol.0406.Acurite5n1PacketV2': None, 'dateTime': 1588751114, 'wind_speed.0406.Acurite5n1PacketV2': 3.483, 'channel.0406.Acurite5n1PacketV2': u'A', 'msg_type.0406.Acurite5n1PacketV2': 49, 'wind_dir.0406.Acurite5n1PacketV2': 22.5, 'rssi.0406.Acurite5n1PacketV2': None, 'battery.0406.Acurite5n1PacketV2': 1, 'usUnits': 1}



I've used rtl_433 to find the hex address of the new devices, converted them to decimal, and used the rtl_433 readme file to choose the -R values:  WH25 corresponds to R 78 and WH51 corresponds to R 142.

When I run sdr.py as per instructions, it produces OUT lines for these two R values, but it does not produce PARSED lines.

Soil Moisture Probe (WH51):
PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/sdr.py --cmd="rtl_433 -M utc -F json -R 142"
out:[u'{"time" : "2020-05-06 07:37:23", "model" : "Fineoffset-WH51", "id" : "00ca01", "battery_ok" : 1.222, "battery_mV" : 1800, "moisture" : 0, "boost" : 7, "ad_raw" : 16, "mic" : "CRC"}\n', u'{"time" : "2020-05-06 07:37:23", "model" : "Fineoffset-WH51", "id" : "00ca01", "battery_ok" : 1.222, "battery_mV" : 1800, "moisture" : 0, "boost" : 7, "ad_raw" : 16, "mic" : "CRC"}\n']
out:[u'{"time" : "2020-05-06 07:37:33", "model" : "Fineoffset-WH51", "id" : "00ca01", "battery_ok" : 1.222, "battery_mV" : 1800, "moisture" : 0, "boost" : 6, "ad_raw" : 16, "mic" : "CRC"}\n']


Temperature, Humidity, Pressure (WH25):
PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/sdr.py --cmd="rtl_433 -M utc -F json -R 78"
out:[u'{"time" : "2020-05-06 07:40:58", "model" : "Fineoffset-WH25", "id" : 98, "battery_ok" : 1, "temperature_C" : 19.500, "humidity" : 57, "pressure_hPa" : 6553.500, "mic" : "CRC"}\n']
out:[u'{"time" : "2020-05-06 07:42:02", "model" : "Fineoffset-WH25", "id" : 98, "battery_ok" : 1, "temperature_C" : 19.500, "humidity" : 57, "pressure_hPa" : 6553.500, "mic" : "CRC"}\n']


I have attached: 
weewx.20200506.amended.text which is a renamed copy of weewx.conf.  It contains a draft SENSOR MAP.
Syslog 1000.text which contains two or three starts of weexw.
Syslog 1000 subset with sdr.text which contains syslog lines that refer to SDR.


weewx.20200506.amended.text
syslog1000.text
Syslog 1000 subset with sdr.text

Allen Wilson

unread,
May 6, 2020, 11:33:49 AM5/6/20
to weewx-user
I just set this up yesterday, It's an issue with the way the sdr.py parses the output of rtl_433. The author of rtl_433 has changed the names 'model:' of the decoded msgs, maybe other stuff as well. The parsers will need to be updated for sdr.py.
There is a simple solution to get it working for now, add  '-M oldmodel' to the cmd=rtl_433 line in weewx.conf

Richard Horobin

unread,
May 7, 2020, 12:38:29 AM5/7/20
to weewx-user
So the keyword is 

-M oldmodel

OK, thanks, I will try that.

Richard Horobin

unread,
May 7, 2020, 6:45:45 PM5/7/20
to weewx-user
Allen Wilson, many thanks.  

  1. -M oldmodel enabled me to add WH25
  2. It didn't help with WH51. No parsed output for the soil moisture sensor.
    1. However, the output had a different value for ad_raw, which changed from 16 to 19.
    2. Now I will go over to RTL_433 forums to see what may have happened.

Allen Wilson

unread,
May 7, 2020, 9:57:51 PM5/7/20
to weewx-user
Glad, it helped with the wh25.
I had the problem with the fine offest wh25 and wh24 and after some digging realized the problem is with the weewx-sdr module not parsing the output of rtl_433 after rtl_433 programmer made his changes.
The problem you're having is with the weewx.sdr module is not parsing the wh51 data that is being decoded by the rtl_433 program. You should check with the weewx.sdr people to see if they can add WH51 parsing to their program.
Looks like the  -M oldmodel parameter is going away soon. Maybe the weewx-sdr people can update the sdr.py to include the FO wh25 and wh24 as well. ;)
Good luck
Reply all
Reply to author
Forward
0 new messages