matthewwall / weewx-sdr

weewx driver for software-defined radio
GNU General Public License v3.0
114 stars 74 forks source link

How to reset rain? #111

Closed BeanBag112233 closed 3 years ago

BeanBag112233 commented 3 years ago

I have recently upgraded my sensors from Oregon WMR89 to Bresser 5in1. Most is working but rainfall not showing. I think because sensor reports total rain and this is much less with new sensor than old. How should I reset the total rain? I have tried: sudo wee_device --reset-rain but log file shows: Jan 29 14:25:06 PiWeewx wee_device[954] INFO __main__: The driver user.sdr does not include a configuration tool: module 'user.sdr' has no attribute 'configurator_loader'

I tried to trace through what is happening in the code, but got lost in the driver initialisation.

Jan 29 14:25:28 PiWeewx weewx[990] INFO weewx.engine: Loading station type SDR (user.sdr)
Jan 29 14:25:28 PiWeewx weewx[990] INFO user.sdr: driver version is 0.77
Jan 29 14:25:28 PiWeewx weewx[990] INFO user.sdr: sensor map is {'windSpeed': 'wind_speed.541070586.Bresser6in1Packet', 'windGust': 'gust_speed.541070586.Bresser6in1Packet', 'windDir': 'wind_dir_deg.541070586.Bresser6in1Packet', 'outTemp': 'temperature_C.541070586.Bresser6in1Packet', 'outHumidity': 'humidity.541070586.Bresser6in1Packet', 'pressure': 'pressure.541070586.Bresser6in1Packet', 'rain_total': 'rain_mm.541070586.Bresser6in1Packet'}
Jan 29 14:25:28 PiWeewx weewx[990] INFO user.sdr: deltas is {'rain': 'rain_total'}
Jan 29 14:25:28 PiWeewx weewx[990] INFO user.sdr: startup process 'rtl_433 -M utc -F json -f868.2M'
pi@PiWeewx:~ $ sudo rtl_433 -M utc -F json -f868.2M
rtl_433 version 20.11-18-gb9de8421 branch master at 202101130815 inputs file rtl_tcp RTL-SDR
Use -h for usage help and see https://triq.org/ for documentation.
Trying conf file at "rtl_433.conf"...
Trying conf file at "/root/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...

New defaults active, use "-Y classic -s 250k" for the old defaults!

Registered 146 out of 176 device decoding protocols [ 1-4 8 11-12 15-17 19-21 23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119 121 124-128 130-149 151-161 163-168 170-175 ]
Found Rafael Micro R820T tuner
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!
Sample rate set to 1000000 S/s.
Tuner gain set to Auto.
Tuned to 868.200MHz.
{"time" : "2021-01-30 11:02:02", "model" : "Bresser-6in1", "id" : 541070586, "channel" : 0, "battery_ok" : 1, "sensor_type" : 1, "wind_max_m_s" : 0.500, "wind_avg_m_s" : 0.500, "wind_dir_deg" : 90, "rain_mm" : 104.800, "mic" : "CRC"}
^CSignal caught, exiting!
pi@PiWeewx:~ $
    [[sensor_map]]
        # Bresser 5in1 (new format)
                windSpeed = wind_speed.541070586.Bresser6in1Packet
        windGust = gust_speed.541070586.Bresser6in1Packet
        windDir = wind_dir_deg.541070586.Bresser6in1Packet
        outTemp = temperature_C.541070586.Bresser6in1Packet
        outHumidity = humidity.541070586.Bresser6in1Packet
        pressure = pressure.541070586.Bresser6in1Packet
        rain_total = rain_mm.541070586.Bresser6in1Packet

        [[deltas]]
            rain = rain_total
BeanBag112233 commented 3 years ago

sorry - I had mixed tabs and spaces in weewx.conf.