weewx with rtl-davis - Installation Assistance?

679 views
Skip to first unread message

arg...@xplornet.ca

unread,
Apr 1, 2023, 10:38:15 AM4/1/23
to weewx-user
I have tried installing rtldavis on both a pi3+ and a debian 11 proxmox vm.  I have no problems with receiving packets from a Davis Vue - packets are consistently received every 3 seconds or so and look correct.  However - on both machines I get the same error (which you would expect - consistently wrong)!!

weewx doesn't appear to process the packets from the rtldavis driver and errors out every 150 seconds with  the following error:

 INFO weewx.engine: Main loop exiting. Shutting engine down.
debian weewx[10816] INFO user.rtldavis: shutdown process /home/pi/work/bin/rtldavis -tf US -tr 1
debian weewx[10816] INFO user.rtldavis: rtldavis with pid 11073 killed
 debian weewx[10816] CRITICAL __main__: Caught WeeWxIOError: rtldavis process stalled

Has anyone successfully installed rtldavis recently and can help with this issue?

I used vince skahans install script modified to use golang-1.15 - see attached.
I set LD_LIBRARY_PATH to the librtlsdr.so instance
weewx.conf points to rtldavis as station type.
user pi is member of sudoers 
I have also included the syslog of the installation, the install script and weewx.conf

I am not a proficient user of Debian - any suggestions gratefully received.

install-weewx-rtldavis.sh
install weewx1.txt
syslog.txt
weewx.conf

Rob Fissel

unread,
Aug 5, 2023, 8:54:23 AM8/5/23
to weewx-user
Did you have any luck with this? I'm facing a similar problem. 

John Argue

unread,
Aug 10, 2023, 8:15:38 AM8/10/23
to weewx...@googlegroups.com

Not yet – busy in summer but have acquired a raspberry pi 4 and will try it with the script as soon as things settle down a bit.

--
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/bGiQPuOljqs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/08137d3c-da45-4821-aeec-92b9f9fd5cd4n%40googlegroups.com.

vince

unread,
Aug 10, 2023, 4:05:04 PM8/10/23
to weewx-user
FWIW - I did get this to work on v5 beta with some tweaks in my install script solely due to the weewx commands being a little different than v4 and earlier, but it was a little bit of a struggle here too.   I had to do a lot of plugging/unplugging the rtl_sdr dongle as it seemed to lock up with device in use when I was trying to run things in the foreground. 

Eventually weewx succeed interactively before I tried it from systemd....

(weewx-venv) pi@pi4jr:~/weewx-data $ weewxd
LOOP:   2023-08-10 12:41:54 PDT (1691696514) 'altimeter': 'None', 'appTemp': 'None', 'barometer': 'None', 'cloudbase': 'None', 'dateTime': '1691696514', 'dewpoint': 'None', 'ET': 'None', 'heatindex': 'None', 'humidex': 'None', 'inDewpoint': 'None', 'maxSolarRad': '0.0', 'pressure': 'None', 'rainRate': '0.0', 'txBatteryStatus': '0', 'usUnits': '1', 'windchill': 'None', 'windDir': '325.3162055335968', 'windrun': 'None', 'windSpeed': '2.0'
LOOP:   2023-08-10 12:41:57 PDT (1691696517) 'altimeter': 'None', 'appTemp': 'None', 'barometer': 'None', 'cloudbase': 'None', 'dateTime': '1691696517', 'dewpoint': 'None', 'ET': 'None', 'heatindex': 'None', 'humidex': 'None', 'inDewpoint': 'None', 'maxSolarRad': '0.0', 'outTemp': '70.1', 'pressure': 'None', 'rainRate': '0.0', 'txBatteryStatus': '0', 'usUnits': '1', 'windchill': '70.1', 'windDir': '325.3162055335968', 'windrun': 'None', 'windSpeed': '2.0'

In repeated previous repetitions I got the following and needed to unplug/replug it to get it to release. 

(weewx-venv) pi@pi4jr:~/weewx-data $ rtldavis -tf US -v -tr 1
12:40:37.537010 rtldavis.go VERSION=0.15
12:40:37.537808 tr=1 fc=0 ppm=0 gain=0 maxmissed=51 ex=0 receiveWindow=300 actChan=[0] maxChan=1
12:40:37.537957 undefined=false verbose=true disableAfc=false deviceString=0
12:40:37.539019 BitRate: 19200
12:40:37.539132 SymbolLength: 14
12:40:37.539222 SampleRate: 268800
12:40:37.539704 Preamble: 1100101110001001
12:40:37.539840 PreambleSymbols: 16
12:40:37.539941 PreambleLength: 224
12:40:37.540165 PacketSymbols: 80
12:40:37.540687 PacketLength: 1120
12:40:37.540778 BlockSize: 512
12:40:37.540866 BufferLength: 2048
usb_claim_interface error -6
12:40:37.603160 resource busy

Also saw the same 'killed' thing you saw:

(weewx-venv) pi@pi4jr:~/weewx-data $ rtldavis -tf US -v
12:35:28.026250 rtldavis.go VERSION=0.15
12:35:28.026668 tr=1 fc=0 ppm=0 gain=0 maxmissed=51 ex=0 receiveWindow=300 actChan=[0] maxChan=1
12:35:28.026720 undefined=false verbose=true disableAfc=false deviceString=0
12:35:28.026986 BitRate: 19200
12:35:28.027010 SymbolLength: 14
12:35:28.027031 SampleRate: 268800
12:35:28.027051 Preamble: 1100101110001001
12:35:28.027071 PreambleSymbols: 16
12:35:28.027091 PreambleLength: 224
12:35:28.027111 PacketSymbols: 80
12:35:28.027131 PacketLength: 1120
12:35:28.027151 BlockSize: 512
12:35:28.027171 BufferLength: 2048
Detached kernel driver
Found Rafael Micro R820T tuner
12:35:28.488329 tr=0 ch=0 freqCorr=0 lastFreqError=0, freqerrTrChList=[0 0 0 0 0 0 0 0 0 0]
12:35:28.488722 Hop: {ChannelIdx:0 ChannelFreq:902419338 FreqError:0 Transmitter:0}
Exact sample rate is: 268800.001367 Hz
12:35:28.667136 GetTunerGain: 0 Db
12:35:28.667276 SetFreqCorrection 0 ppm Successful
12:35:28.671473 Init channels: wait max 135 seconds for a message of each transmitter
12:37:30.504786 m1: -0.217316 l: 224 c: 16 x: [-0.31 -0.28 -0.30 -0.28 0.21 0.19 0.11 -0.35 -0.34 -0.28 -0.33 -0.33 -0.30 -0.28 -0.31 -0.30]
12:37:30.504885 TRANSMITTER 0 SEEN
12:37:30.505103 tr=0 ch=19 freqCorr=0 lastFreqError=0, freqerrTrChList=[0 0 0 0 0 0 0 0 0 0]
12:37:30.505277 Hop: {ChannelIdx:19 ChannelFreq:911952597 FreqError:0 Transmitter:0}
12:37:30.505324 applied freqCorrection=0
12:37:33.068797 m1: -0.211359 l: 224 c: 16 x: [0.13 -0.32 -0.30 -0.28 -0.21 0.22 0.08 -0.37 -0.35 -0.33 -0.27 -0.27 -0.26 -0.29 -0.32 -0.26]
12:37:33.068901 E000E9780100BE3D 2 0 0 0 0 msg.ID=0
12:37:33.068981 tr=0 ch=41 freqCorr=0 lastFreqError=0, freqerrTrChList=[0 0 0 0 0 0 0 0 0 0]
12:37:33.069075 Hop: {ChannelIdx:41 ChannelFreq:922991108 FreqError:0 Transmitter:0}
12:37:33.069125 applied freqCorrection=0
12:37:35.630621 m1: -0.129377 l: 224 c: 16 x: [-0.18 0.21 0.20 0.17 0.16 0.12 -0.01 -0.36 -0.32 -0.33 -0.32 -0.26 -0.31 -0.28 -0.29 -0.28]
12:37:35.630806 5000E9FF7100F302 3 0 0 0 0 msg.ID=0
12:37:35.630935 tr=0 ch=25 freqCorr=0 lastFreqError=0, freqerrTrChList=[0 0 0 0 0 0 0 0 0 0]
12:37:35.631082 Hop: {ChannelIdx:25 ChannelFreq:914963100 FreqError:0 Transmitter:0}
12:37:35.631177 applied freqCorrection=0
12:37:38.192505 m1: -0.248779 l: 224 c: 16 x: [-0.33 -0.30 -0.27 -0.25 -0.13 0.09 -0.29 -0.30 -0.30 -0.26 -0.28 -0.30 -0.27 -0.26 -0.27 -0.25]
12:37:38.192952 9000E905018E11BE 4 0 0 0 0 msg.ID=0
12:37:38.193281 tr=0 ch=8 freqCorr=0 lastFreqError=0, freqerrTrChList=[0 0 0 0 0 0 0 0 0 0]
12:37:38.193627 Hop: {ChannelIdx:8 ChannelFreq:906433342 FreqError:0 Transmitter:0}
12:37:38.193682 applied freqCorrection=0
Killed

And...

Aug 10 12:42:15 pi4jr weewx[478] INFO __main__: Starting up weewx version 5.0.0b10
Aug 10 12:42:15 pi4jr weewx[478] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Aug 10 12:42:15 pi4jr weewx[478] INFO weewx.manager: Starting backfill of daily summaries
Aug 10 12:42:15 pi4jr weewx[478] INFO weewx.manager: Daily summaries up to date
Aug 10 12:42:15 pi4jr weewx[478] INFO weewx.engine: Starting main packet loop.
Aug 10 12:42:15 pi4jr weewx[1911] INFO user.rtldavis: rtldavis with pid 1932 killed
Aug 10 12:42:15 pi4jr weewx[1911] CRITICAL weewxd: Caught WeeWxIOError: rtldavis process is not running
Aug 10 12:42:15 pi4jr weewx[1911] CRITICAL weewxd:     ****  Waiting 60 seconds then retrying...
Aug 10 12:42:15 pi4jr weewx[478] ERROR user.rtldavis: err: <generator object ProcManager.get_stderr at 0xf5444d48>
Aug 10 12:42:15 pi4jr weewx[478] INFO weewx.engine: Main loop exiting. Shutting engine down.
Aug 10 12:42:16 pi4jr weewx[478] INFO user.rtldavis: shutdown process /home/pi/work/bin/rtldavis -tf US -tr 1
Aug 10 12:42:16 pi4jr weewx[478] CRITICAL __main__: Caught WeeWxIOError: rtldavis process is not running
Aug 10 12:42:16 pi4jr weewx[478] CRITICAL __main__:     ****  Waiting 60 seconds then retrying...

I have no explanations other than to guess (guess...) that you just need patience to let the device get acquired and hear something.  It does take quite a while so you might go a couple times through the 'waiting 60 seconds than retrying' attempts til rtldavis gets its brain straight.

But it does seem to work in current raspi os with the current v5 betas...

[Rtldavis]
    cmd = /home/pi/work/bin/rtldavis
    transceiver_frequency = US
    iss_channel = 1
    anemometer_channel = 0
    leaf_soil_channel = 0
    temp_hum_1_channel = 0
    temp_hum_2_channel = 0
    rain_bucket_type = 0
    debug_parse = 3
    debug_rain = 3
    save_pct_good_per_transmitter = False
    driver = user.rtldavis



Lastly - these debug settings are 'really' chatty.  Like really REALLY chatty.  So probably don't leave them set to 3 for long for your SD card life.

Lorin Tremblay

unread,
Sep 5, 2023, 7:48:45 AM9/5/23
to weewx-user
Having the same issue about once a day for 4-6 hours....

Sep  5 07:34:18 WeeWx-APRS270 weewx[610] INFO weewx.engine: Main loop exiting. Shutting engine down.
Sep  5 07:34:18 WeeWx-APRS270 weewx[610] INFO user.rtldavis: shutdown process /home/pi/bin/rtldavis -ex 200 -tf US -tr 1
Sep  5 07:34:18 WeeWx-APRS270 weewx[610] INFO user.rtldavis: rtldavis with pid 1847 killed
Sep  5 07:34:18 WeeWx-APRS270 weewx[610] CRITICAL __main__: Caught WeeWxIOError: rtldavis process stalled
Sep  5 07:34:18 WeeWx-APRS270 weewx[610] CRITICAL __main__:     ****  Waiting 60 seconds then retrying...

Lorin Tremblay

unread,
Sep 7, 2023, 11:16:53 PM9/7/23
to weewx-user

It happens every night for me…

vince

unread,
Sep 7, 2023, 11:22:57 PM9/7/23
to weewx-user
Why are you setting -ex 200 ?
The defaults worked fine for me for multiple days with a VP2 (one ISS), FWIW.

Lorin Tremblay

unread,
Sep 7, 2023, 11:58:29 PM9/7/23
to weewx-user
Don’t remember, but tried without it, still does the same thing and it always restart in the morning……

Lorin Tremblay

unread,
Sep 9, 2023, 8:36:08 AM9/9/23
to weewx-user
As much as I hate to admit that, found the problem on my install.
Something was wrong with the internal battery, taught it was weird that it was always at night.
It was the shipping pull tab on the battery that I forgot to remove. ;(

John Argue

unread,
Sep 12, 2023, 8:42:51 PM9/12/23
to weewx...@googlegroups.com

The problem is definitely the battery.  I didn’t have it installed because I was testing and they’re not cheap.  But – no battery – but supercap charged and valid messages being received - fails every time.  Put battery in and suddenly you get the packet being decoded (which it wasn’t before – you just got the data packet and no decoding)  bat_iss : 0  - wondering if this is issue in driver?

 

John

--

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/bGiQPuOljqs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

weather list

unread,
Sep 12, 2023, 9:12:22 PM9/12/23
to weewx...@googlegroups.com
I had to replace the Supercap, which had leaked. Also had to re-solder the contacts of the battery bracket to the PC board. Problem solved.

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/00e301d9e5db%2436254130%24a26fc390%24%40xplornet.ca.

Reply all
Reply to author
Forward
0 new messages