Driver SDR with Weewx not work

1,491 views
Skip to first unread message

Massimiliano Neri

unread,
May 15, 2017, 6:09:50 AM5/15/17
to weewx-user
Hi, I need urgent help. I would like to use an SDR stick to intercept my weather station, a WH3080, to show external sensor data on the internal portal to my network. I found some problems to do this.
The stick SDR works manually as you can see below:

Sudo PYTHONPATH = / usr / share / weewx python /usr/share/weewx/user/sdr.py --cmd "rtl_433 -q -U -F json -R32"

As a result:

Out ": 0," id ": 173," id ": 0," id "," msg_type ":" "Temperature_C": 33.700, "humidity": 107, "direction_str": "NNE", "direction_deg": "23", "speed": 20 .808, "gust": 312.120, "rain": 921.600, "battery ":" OK "} \ n ']
Out ": 0," id ": 236," id ": 0," id ": 236," id: Temperature ": 24.300," humidity ": 45," direction_str ":" W "," direction_deg ":" 270 "," speed ": 3.672," gust ": 6.120," rain ": 525.300, OK "} \ n ',' {" time ":" 2017-05-15 09:56:08 "," Model ":" Fine Offset Electronics WH3080 Weather Station "," msg_type ": 2," uv_sensor_id ": 225 , "Uv", "uv_index": 8, "lux": 120032.398, "wm": 175.743, "fc": 11155.428} \ n ',' {"time": "2017-05-15 09 , "Uv_sensor_id": 225, "uv_status": "OK", "uv_index": 8, "lux": 120032.398 ": 56: 08", "model": "Fine Offset Electronics WH3080 Weather Station" , "Wm": 175.743, "fc": 11155.428} \ n ']

Doing this with the rtl-433 command:

2017-05-15 11:58:08: Fine Offset Electronics WH3080 Weather Station
        Msg type: 2
        UV Sensor ID: 225
        Sensor Status: OK
        UV Index: 8
        Lux: 120160.5
        Watts / m: 175.93
        Foot-candles: 11167.33

2017-05-15 11:58:31: Fine Offset Electronics WH1080 / WH3080 Weather Station
        Msg type: 0
        Station ID: 236
        Temperature: 23.9 ° C
        Humidity: 48%
        Wind string: NE
        Wind degrees: 45
        Wind Avg Speed: 1.22
        Wind gust: 2.45
        Total rainfall: 525.3
        Battery: OK

2017-05-15 12:04:48: Fine Offset Electronics WH1080 / WH3080 Weather Station
        Msg type: 1
        Station ID: 173
        Signal Type: WWVB / MSF
        Hours: 21
        Minutes: 71
        Seconds: 11
        Year: 2165
        Month: 25
        Day: 70


Now the problem arises, in my weewx.conf is listed SDR as the default driver and the map is this:

################################################## ############################

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

    # The driver to use
    Driver = user.sdr
    Cmd = rtl_433 -q -U -F json -R 32
    [[Sensor_map]]
        WindGust = wind_gust.236.FOWH1080Packet
        OutBatteryStatus = battery.236.FOWH1080Packet
        Rain_total = rain_total.236.FOWH1080Packet
        WindSpeed ​​= wind_speed.236.FOWH1080Packet
        WindDir = wind_dir.236.FOWH1080Packet
        OutHumidity = humidity.236.FOWH1080Packet
        OutTemp = temperature.236.FOWH1080Packet

But loading weewx me from this error and it does not work:

May 15 07:14:28 orangepilite weewx [719]: import of driver failed: failed to start process: [Errno 2] No such file or directory (<class ... Error '>)
May 15 07:14:28 orangepilite weewx [719]: engine: Unable to load driver: failed to start process: [Errno 2] No such file or directory
May 15 07:14:28 orangepilite weewx [719]: **** Exiting ...
May 15 12:02:27 orangepilite systemd [1]: Started LSB: weewx weather system.
Hint: Some lines were ellipsized, use -l to show in full.

I also wanted to ask if the map I made is correct, in fact I see 3 sections. The first with ID 225, the second with ID 236 and the third with ID 173

gjr80

unread,
May 15, 2017, 6:38:05 AM5/15/17
to weewx-user
Hi,

Case matters in python. According to the install instructions for the sdr driver you should have something like:

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

# The driver to use

driver = user.sdr
cmd = rtl_433 -q -U -F json -R 32

Note the lower case driver and cmd.

Afraid I can't help much with the sensor map. I will say that Matthew usually documents things pretty well in his install instructions and/or the comments at the start of the driver (sdr.py in this case). Make sure you read them thoroughly. Failing this search the forums. Don't forget about the weeWX development forum, I believe there has been a number of posts there re sdr.

Gary

Massimiliano Neri

unread,
May 15, 2017, 6:42:29 AM5/15/17
to weewx-user
I've read a few posts but I always get this error in loading the driver

Massimiliano Neri

unread,
May 15, 2017, 6:46:17 AM5/15/17
to weewx-user

Uppercase letters are due to the translation system. In the weewx.conf file are all tiny.

Il giorno lunedì 15 maggio 2017 12:09:50 UTC+2, Massimiliano Neri ha scritto:

gjr80

unread,
May 15, 2017, 6:50:17 AM5/15/17
to weewx-user
Ok, let's take a step back then, please post your weewx,conf with any sensitive information removed. Also, set debug=1 in weewx.conf then stop weeWX then start weeWX. Post the log from when weeWX starts until the error occurs, do not edit the log.

Gary

Massimiliano Neri

unread,
May 15, 2017, 8:45:48 AM5/15/17
to weewx-user
Ok - where can i find the log to send you?


Il giorno lunedì 15 maggio 2017 12:09:50 UTC+2, Massimiliano Neri ha scritto:

gjr80

unread,
May 15, 2017, 8:48:06 AM5/15/17
to weewx-user
It depends on your system, but most likely in /var/log/syslog. If you have set weeWX to log to its own log file it could be /var/log/weewx.log.

Gary

Massimiliano Neri

unread,
May 15, 2017, 8:49:27 AM5/15/17
to weewx-user
This and the weewx.conf file ...



Il giorno lunedì 15 maggio 2017 12:09:50 UTC+2, Massimiliano Neri ha scritto:
weewx.zip

gjr80

unread,
May 15, 2017, 9:03:10 AM5/15/17
to weewx-user
You did not include the log? No need to zip either, Mr Google has lots of storage.

Gary

Massimiliano Neri

unread,
May 15, 2017, 9:13:30 AM5/15/17
to weewx-user

How is the log file called? On what directory can I find it?


Il giorno lunedì 15 maggio 2017 12:09:50 UTC+2, Massimiliano Neri ha scritto:

gjr80

unread,
May 15, 2017, 9:16:06 AM5/15/17
to weewx-user
Unless you have changed it, the file will likely be named 'syslog'. It will likely be in the /var/log directory.

Massimiliano Neri

unread,
May 15, 2017, 9:30:40 AM5/15/17
to weewx-user
This is syslog file...


Il giorno lunedì 15 maggio 2017 12:09:50 UTC+2, Massimiliano Neri ha scritto:
syslog
weewx.conf

gjr80

unread,
May 15, 2017, 10:25:19 AM5/15/17
to weewx-user
Hi,

Thank you, that helps a lot. Your weewx.conf looks fine. I think the issue is that weeWX is having trouble finding rtl_433 or its libraries. I see there are two (optional) options, path and ld_library_path, that can be used in the [SDR] stanza in weewx.conf, for example:

[SDR]
    driver
= user.sdr
    cmd
= rtl_433 -q -U -F json -R 32
    path
= /usr/local/bin
    ld_library_path
= /usr/local/lib

My only suggestion is to try setting them appropriately. I do not and have never used the SDR driver so I don't know what values these options should be set to nor if they will solve the problem. You might find some clues in to their values/settings in this thread or this one.

If this does not work you will need to wait for Matthew or someone else that is knowledgeable on the SDR config.

Gary

Massimiliano Neri

unread,
May 15, 2017, 11:20:31 AM5/15/17
to weewx-user

I have installed rtl_sdr and libusb-1.0 with repositories. Do you know what file I need to look for to find out where the library is?


Il giorno lunedì 15 maggio 2017 12:09:50 UTC+2, Massimiliano Neri ha scritto:

Massimiliano Neri

unread,
May 15, 2017, 1:47:59 PM5/15/17
to weewx-user

Now it does not make the mistake but does not create the html pages on the /var /www/html/weewx directory. I attach the new syslog file.


Il giorno lunedì 15 maggio 2017 12:09:50 UTC+2, Massimiliano Neri ha scritto:
syslog

gjr80

unread,
May 15, 2017, 7:54:50 PM5/15/17
to weewx-user
Hi,

Looking through your log it appears that the SDR driver is reading hte data from your station but does not recognise the model Fine Offset Electronics WH1080/WH3080 Weather Station eg:

May 15 19:21:10 localhost weewx[674]: sdr: MainThread: lines=['{"time" : "2017-05-15 17:21:07", "model" : "Fine Offset Electronics WH3080 Weather Station", "msg_type" : 2, "uv_sensor_id" : 225, "uv_status" : "OK", "uv_index" : 1, "lux" : 7837.000, "wm" : 11.474, "fc" : 728.346}\n', '{"time" : "2017-05-15 17:21:07", "model" : "Fine Offset Electronics WH3080 Weather Station", "msg_type" : 2, "uv_sensor_id" : 225, "uv_status" : "OK", "uv_index" : 1, "lux" : 7837.000, "wm" : 11.474, "fc" : 728.346}\n', '{"time" : "2017-05-15 17:21:07", "model" : "Fine Offset Electronics WH3080 Weather Station", "msg_type" : 2, "uv_sensor_id" : 225, "uv_status" : "OK", "uv_index" : 1, "lux" : 7837.000, "wm" : 11.474, "fc" : 728.346}\n']
May 15 19:21:10 localhost weewx[674]: sdr: MainThread: parse_json: unknown model Fine Offset Electronics WH3080 Weather Station
May 15 19:21:10 localhost weewx[674]: sdr: MainThread: punt unrecognized line '{"time" : "2017-05-15 17:21:07", "model" : "Fine Offset Electronics WH3080 Weather Station", "msg_type" : 2, "uv_sensor_id" : 225, "uv_status" : "OK", "uv_index" : 1, "lux" : 7837.000, "wm" : 11.474, "fc" : 728.346}#012'
May 15 19:21:10 localhost weewx[674]: sdr: MainThread: parse_json: unknown model Fine Offset Electronics WH3080 Weather Station

therefore the driver cannot parse the data it is receiving. No data in means weeWX does not store any observation data which means no reports are run.

Reading the bottom of the readme in the sdr driver repo would seem to indicate a new parser/modified parser will be needed to properly parse data from your station. Looking in sdr.py from about line 323 onwards there are a number of classes defined that parse data from various stations/sensors (note the WH1080 parser at line 659). If your python skils are up to it you may be able to write your own parser or modify the 1080 parser, or alternatively you will have to wait for some help from Matthew and co (believe Matthew only has intermittent and limited internet access at the present though).

Note that whilst your mapping may need to be verified, the mapping is not the source of your current issue.

Gary

Andy

unread,
May 16, 2017, 7:36:16 PM5/16/17
to weewx-user
Try this driver for your 3080 station.  I do not have a 3080 so I am not sure if it works. 

rename 3080sdr.py to sdr.py, make a bakup of your existing sdr.py, place the new sdr.py in that dir, restart weewx

Andy
3080sdr.py
Message has been deleted

Andy

unread,
May 16, 2017, 7:39:43 PM5/16/17
to weewx-user


and your mapping will be 3080 instead of 1080

     xxxxxxx .236.FOWH3080Packet

mwall

unread,
May 16, 2017, 8:47:16 PM5/16/17
to weewx-user
please try weewx-sdr driver version 0.28

you will need a mapping something like this in weewx.conf:

[SDR]
    driver = user.sdr
    cmd = rtl_433 -q -U -F json -R 32
    [[sensor_map]]
        windGust = wind_gust.236.FOWHx080Packet
        outBatteryStatus = battery.236.FOWHx080Packet
        rain_total = rain_total.236.FOWHx080Packet
        windSpeed ​​= wind_speed.236.FOWHx080Packet
        windDir = wind_dir.236.FOWHx080Packet
        outHumidity = humidity.236.FOWHx080Packet
        outTemp = temperature.236.FOWHx080Packet
        uv = uv_index.236.FOWH3080Packet
        radiation = radiation.236.FOWH3080Packet

adjust the station identifier as needed, or use this:

        outTemp = temperature.*.FOWHx080Packet

to capture from every sensor indiscriminately.

note that the 1080/3080 data are in FOWHx080Packet, and the data specific to 3080 sensors are FOWH3080Packet.  the FOWH1080Packet is still there for backward compatibility with older releases of rtl_433.

i might have gotten the station identifiers wrong - please post the json output from the 1080/3080 messages.

m

Massimiliano Neri

unread,
May 18, 2017, 1:17:23 PM5/18/17
to weewx...@googlegroups.com
Hi Matthew...

I just installed version 0.28 of the driver, but I do not get the weewx data pages. I send you syslog and weewx.conf, can you check where I'm wrong or where is the error?

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/X8f8t--TXII/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Massimiliano Neri
Via del Castello 4 -
05015 Fabro (TR) - ITALY.

Phone:    +39 339 1997334
Fax:       +39 0763 831347

E-mail PEC: neri_mas...@pec.it

Visita il sito:



syslog
weewx.conf

Thomas Keffer

unread,
May 18, 2017, 7:20:51 PM5/18/17
to weewx-user
Check to make sure you do not have more than one weewx process running. It appears there may be two (Process IDs 1869 and 1882, possibly others).

-tk

--
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 weewx-user+unsubscribe@googlegroups.com.

Alexandros Bagos

unread,
Aug 30, 2017, 3:28:29 AM8/30/17
to weewx-user
Hello Massimiliano,
Excuse me for reviving an old thread. May I ask, by using the rtl driver with the WH3080 you basically give up the barometer because it's provided by the base station. How are you getting the pressure?

Thanks,
Alex.

Andy

unread,
Aug 30, 2017, 6:59:10 PM8/30/17
to weewx-user
bme280 on an esp8266 board running easyesp.  That sends the pressure to Home Assistant via MQTT.  Then I wrote  a scrip to pull from the Home Assistant db and write to a file.  File Parse service to get the value in weewx
Reply all
Reply to author
Forward
0 new messages