SDR and Digoo DG-R8H Temp & Humidity sensor

150 views
Skip to first unread message

Gazza

unread,
Aug 2, 2018, 7:00:23 AM8/2/18
to weewx-user
I picked up a cheap Digoo DG-R8H Temp & Humidity sensor from ebay to add to my system and it is recognised by rtl_433 as a #19 "Nexus Temperature & Humidity Sensor".

The output of running rtl_433 from the command line is:

2018-08-01 22:03:11 :   Nexus Temperature/Humidity
        House Code:      180
        Battery:         OK
        Channel:         1
        Temperature:     20.10 C
        Humidity:        42 %

When I run sdr.py from the command line the parsed output is missing the humidity data.

pi@Pi3Btest:~ $ sudo PYTHONPATH=/home/weewx/bin python /home/weewx/bin/user/sdr.py --cmd="rtl_433 -q -U -F json -R 19"

out: ['{
"time" : "2018-08-01 12:36:26", 
"model" : "Nexus Temperature/Humidity", 
"id" : 180, 
"battery" : "OK", 
"channel" : 1, 
"temperature_C" : 20.100, 
"humidity" : 43
}\n']

parsed: {
'temperature.1:180.NexusTemperaturePacket': 20.1,
'battery.1:180.NexusTemperaturePacket': 0, 
'usUnits': 16, 
'dateTime': 1533126986
}

How do I get the missing humidity data ??


Gary

Andy

unread,
Aug 9, 2018, 10:27:45 PM8/9/18
to weewx-user
        pkt['temperature'] = Packet.get_float(obj, 'temperature_C')
        if 'humidity' in obj:
            pkt['humidity'] = Packet.get_float(obj, 'humidity')
        pkt['msg_type'] = Packet.get_int(obj, 'msg_type')


Add these two lines (around line 1612) as shown above to sdy.py:

        if 'humidity' in obj:
            pkt['humidity'] = Packet.get_float(obj, 'humidity')

Let me know if it works.

Andy

Andy

Gazza

unread,
Aug 10, 2018, 2:23:46 AM8/10/18
to weewx-user
Hi Andy

I now get a parsed output like this:

parsed: {
'temperature.1:180.NexusTemperaturePacket': 16.6,
'humidity.1:180.NexusTemperaturePacket': 49.0,
'battery.1:180.NexusTemperaturePacket': 0,
'usUnits': 16,
'dateTime': 1533881039
}

So your edit worked, my version of sdr.py is not exactly the same as what you posted but close enough to work out where to put the extra lines.


Gary
Reply all
Reply to author
Forward
0 new messages