Output in debug log 

> Jan 17 00:18:51 raspberrypi weewx[1066]: sdr: MainThread: lines=['{"time" 
>> : "2019-01-17 00:18:48", "model" : "Bresser-5in1", "id" : 118, 
>> "temperature_C" : 5.200, "humidity" : 95, "wind_gust" : 1.400, "wind_speed" 
>> : 1.700, "wind_dir_deg" : 337.500, "rain_mm" : 37.600, "data" : 
>> "df897feb0fe8efadff6a89ecff20768014f01710520095761300", "mic" : 
>> "CHECKSUM"}\n']
>>
>> Jan 17 00:18:51 raspberrypi weewx[1066]: sdr: MainThread: 
>> packet={'outHumidity': 95.0, 'dateTime': 1547684328, 'windDir': 337.5, 
>> 'outTemp': 5.2, 'windSpeed': 1.7, 'windGust': 1.4, 'rain_total': 37.6, 
>> 'usUnits': 17}
>>
>
weewx.conf

[SDR]

    # This section is for the software-defined radio driver.


    # The driver to use

    driver = user.sdr

    cmd = /usr/local/bin/rtl_433 -f 868.3M -R 119 -F json


    [[sensor_map]]

        outTemp = temperature.118.Bresser5in1Packet

        outHumidity = humidity.118.Bresser5in1Packet

        windSpeed = wind_speed.118.Bresser5in1Packet

        windDir = wind_dir.118.Bresser5in1Packet

        windGust = wind_gust.118.Bresser5in1Packet

        rain_total = rain_total.118.Bresser5in1Packet

        log_unknown_sensors = True

        log_unmapped_sensors = True


    [[deltas]]
        rain = rain_total

sdr.py

class Bresser5in1Packet(Packet):

    # '{"time" : "2018-12-15 16:39:52", "model" : "Bresser-5in1", "id" : 
118, "temperature_C" : 6.200, "humidity" : 88, "wind_gust" : 1.400, 
"wind_speed" : 1.500, "wind_dir_deg" : 67.500, "rain_mm" : 10.800, "data" : 
"ea897febcfeaef9dff77f7feff15768014301510620088080100", "mic" : 
"CHECKSUM"}#012'  

        IDENTIFIER = "Bresser-5in1"

        PARSEINFO = {

#           'Msg type': ['msg_type', None, None],

            'StationID': ['station_id', None, None],

            'Temperature': ['temperature', re.compile('([\d.-]+) C'), lambda 
x: float(x)],

            'Humidity': ['humidity', re.compile('([\d.]+) %'), lambda x: 
float(x)],

            'Wind Gust': ['wind_gust', None, lambda x: float(x)],

            'Wind Speed': ['wind_speed', None, lambda x: float(x)],

            'Direction': ['wind_dir', None, lambda x: int(x)],
            'Rain': ['rain_total', None, lambda x: float(x)]} 


and its all working perfectly on https://stormy.ie/weather

-- 
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.

Reply via email to