Installing rtl-sdr and rtl-433 on Raspberry Pi

1,595 views
Skip to first unread message

Gert Andersen

unread,
Dec 12, 2019, 5:48:22 AM12/12/19
to weewx-user
Hi

I'm new to WeeWx and I'm trying to install the SDR software. I have followed this guide https://github.com/weewx/weewx/wiki/sdr-rpi-recipe. I get an error as You can see on the screenshot.

It is the first time I'm using the SDR software, so I really don't know where to look.

Any ideas and thanks for your help?

Rgds
Gert
2019-12-12.png

steeple ian

unread,
Dec 12, 2019, 6:34:56 AM12/12/19
to weewx...@googlegroups.com
Hi Gert,
Have you tried to blacklist? See the trouble shooting section at the end of the recipe instructions.
Ian

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/073287b4-9583-46b9-867f-3aa496ba38d2%40googlegroups.com.

Gert Andersen

unread,
Dec 12, 2019, 6:55:22 AM12/12/19
to weewx-user
Hi Ian

Thanks for the tip. I have overlooked that part.
Now I just need to shift the the right freq. I need 868 MHz instead of 433Mhz

Rgds
Gert 

steeple ian

unread,
Dec 12, 2019, 7:04:18 AM12/12/19
to weewx...@googlegroups.com
    driver = user.sdr
    path = /usr/local/bin
    cmd = rtl_433 -f 868M -s 1024k -M utc -F json -R 78
    

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

steeple ian

unread,
Dec 12, 2019, 7:08:37 AM12/12/19
to weewx...@googlegroups.com

steeple ian

unread,
Dec 12, 2019, 7:11:10 AM12/12/19
to weewx...@googlegroups.com
Sensor map something like this:-

[[sensor_map]]
        
        outTemp = temperature.71.FOWH65BPacket
        windSpeed = wind_speed.71.FOWH65BPacket
        UV = uv_index.71.FOWH65BPacket
        light = light.71.FOWH65BPacket
        outBatteryStatus = battery.71.FOWH65BPacket
        outHumidity = humidity.71.FOWH65BPacket
        windDir = wind_dir.71.FOWH65BPacket
        windGust = wind_gust.71.FOWH65BPacket
        rain_total = rain_total.71.FOWH65BPacket
        inTemp = temperature.233.FOWH32BPacket
        inHumidity = humidity.233.FOWH32BPacket
        barometer = pressure.233.FOWH32BPacket
        inTempBatteryStatus = battery.233.FOWH32BPacket

Then in calibrate section:-

[StdCalibrate]
    
    [[Corrections]]
        # For each type, an arbitrary calibration expression can be given.
        # It should be in the units defined in the StdConvert section.
        # Example:
        foo = foo + 0.2
        radiation = light * 0.007893 if light is not None else None

Gert Andersen

unread,
Dec 12, 2019, 7:18:05 AM12/12/19
to weewx-user
Hi Ian

Great, up and running with 868MHz.

Rgds
Gert


On Thursday, December 12, 2019 at 11:48:22 AM UTC+1, Gert Andersen wrote:

Gert Andersen

unread,
Dec 14, 2019, 1:46:14 PM12/14/19
to weewx-user
Hi

I have tried to find sensors with this command:
rtl_433 -f 868M -s 1024k -M utc -F json -R 78

But I don't find any sensors, just 
pulse_FSK_detect(): Maximum number of pulses reached?

I have attached a screenshot.

Any ideas.

Rgds
Gert


On Thursday, December 12, 2019 at 11:48:22 AM UTC+1, Gert Andersen wrote:
2019-12-14.png

rich T

unread,
Dec 14, 2019, 2:25:37 PM12/14/19
to weewx-user
If you can moved the dongle to a windows machine and run SDRSharp or if you have GQRX installed on the RPI run that. Tune to  the frequency and verify the strength of the signal.  Just to make sure you are receiving a strong signal.

Gert Andersen

unread,
Dec 14, 2019, 2:48:15 PM12/14/19
to weewx-user
Hi

Thanks for your effort.

Are we talking about this? See Screenshot

Rgds
Gert

On Thursday, December 12, 2019 at 11:48:22 AM UTC+1, Gert Andersen wrote:
2019-12-14 (1).png
Message has been deleted

rich T

unread,
Dec 14, 2019, 3:22:09 PM12/14/19
to weewx-user

Yes that is the software. Set the radio to NFM and start the radio.  You should see the noise floor and the station when it transmits.

rich T

unread,
Dec 14, 2019, 3:33:34 PM12/14/19
to weewx-user
Here is what it would look like running.  I'm looking a 433 sensors; did not allow the SDR to warm up, so the frequencies is a little off.
Sensors on SDRSharp.mp4

Gert Andersen

unread,
Dec 14, 2019, 5:02:20 PM12/14/19
to weewx-user
Hi

The dongle inserted into the pc and I started the radio with NFM and the message is: No Device Selected

Gert

On Thursday, December 12, 2019 at 11:48:22 AM UTC+1, Gert Andersen wrote:
2019-12-14 (2).png

rich T

unread,
Dec 14, 2019, 5:12:24 PM12/14/19
to weewx-user

Gert Andersen

unread,
Dec 14, 2019, 5:48:37 PM12/14/19
to weewx-user
Hi 

Thanks for the tip regarding the driver.

Now I get this. I don't know what it means, see screenshot

Rgds
Gert

On Thursday, December 12, 2019 at 11:48:22 AM UTC+1, Gert Andersen wrote:
2019-12-14 (3).png
Message has been deleted
Message has been deleted

Gert Andersen

unread,
Dec 15, 2019, 11:36:12 AM12/15/19
to weewx-user
Hi
I think I have come a little bit closer. I can see the different sensors and I can see their mapping. 

There are some things I can't figure out though. My reports do not show the data that the sensors show I and can't find pressure mapping. In addition, it is necessary to unplug the dongle and reinsert it, to make it work. About this Matthew writes:
"I have had problems running rtl-sdr on systems with libusb 1.0.11. The rtl_433 command craps out with a segmentation fault, and the rtl_test command sometimes leaves the dongle in a weird state that can be cleared only by unplugging then replugging the dongle .

Using a more recent version of libusb (e.g., 1.0.20) seems to clear things up. "

I don't know how to install a newer version.

Attached relevant screenshots.

Any help really appreciated

I do not know what to do without this group and the people who tried to help. Thank you.

Rgds
Gert

On Thursday, December 12, 2019 at 11:48:22 AM UTC+1, Gert Andersen wrote:
2019-12-15 (5).png
2019-12-15 (10).png
2019-12-15 (11).png
syslog
weewx.conf

rich T

unread,
Dec 15, 2019, 3:21:18 PM12/15/19
to weewx-user
For updating

sudo apt-get update
sudo apt-get upgrade

Your pressure comes from the console not the outdoor sensors.


On Sunday, December 15, 2019 at 11:36:12 AM UTC-5, Gert Andersen wrote:

Gert Andersen

unread,
Dec 16, 2019, 7:22:43 AM12/16/19
to weewx-user
Hi Again
After trying many different things, i found that if i run a usbreset every time i start up SDR, it seems to have helped. 

Now I get data for the Standard reports, but Rain Rate and Daily Rain are wrong. Although it has not rained, I have a value for RR and DR. 

I've attached rain-test-packets.log where I've run weewx manually. Until 12:26:37 DR shows 0.12, although it has not rained today. At 12:26:37  I poured water into the bucket, maybe 3 tips and DR went from 0.12 to 0.16. 

The standard report shows DR 2026.2mm and RR 533. Although it still hasn't rained, the last report shows DR 2135.9mm and RR 373.9mm / h. When 

If I run SDR via weewx, DR looks real, output.txt (rain_total.157.FOWH65BPacket': 4.064)

What have I missed, feeling I'm very close now.

Thanks for your support.

Gert

On Thursday, December 12, 2019 at 11:48:22 AM UTC+1, Gert Andersen wrote:
output.txt
rain-test-packets.log
2019-12-16 (2).png
2019-12-16 (3).png

Gert Andersen

unread,
Dec 17, 2019, 10:53:38 AM12/17/19
to weewx-user
Hi

I have started to upload to a web server. The rain data still wrong and it seems to change all the time.


Anything I can do?

Gert



On Thursday, December 12, 2019 at 11:48:22 AM UTC+1, Gert Andersen wrote:
2019-12-17.png

Gert Andersen

unread,
Dec 18, 2019, 5:32:32 AM12/18/19
to weewx-user
Hi 

I forgot to mention that I also have a Ecowitt GW-1000 uploading to ecowiit.net and it seems to upload the data fine, also the rain data.

Gert

On Thursday, December 12, 2019 at 11:48:22 AM UTC+1, Gert Andersen wrote:
2019-12-18.png

mwall

unread,
Dec 22, 2019, 9:06:42 PM12/22/19
to weewx-user

On Monday, December 16, 2019 at 7:22:43 AM UTC-5, Gert Andersen wrote:

Now I get data for the Standard reports, but Rain Rate and Daily Rain are wrong. Although it has not rained, I have a value for RR and DR. 

that is because you have assigned 'rain' to be 'rain_total'.  

you do not need (and should not specify) 'rain' in the sensor_map, but you should specify 'rain_total' in the sensor map.

'rain' is a delta measurement (amount of rain in a period), whereas 'rain_total' is a cumulative measurement (total amount of rain).

'rain' is calculated from 'rain_total'.  in the weewx-sdr driver, this is handle by the 'deltas' definition.  see the comments in the sdr.py code for details.

this is what you want:

[SDR] ... [[sensor_map]] ... rain_total = rain_total.157.FOWH65BPacket

m

Gert Andersen

unread,
Dec 24, 2019, 12:38:31 AM12/24/19
to weewx-user
Hi Matthew

Thanks a lot, it's working now.

Rgds
Gert
Reply all
Reply to author
Forward
0 new messages