trouble installing weewx-sdr driver - help requested

109 views
Skip to first unread message

Eric Koester

unread,
Apr 19, 2021, 12:13:35 PM4/19/21
to weewx-user
I loaded weewx into a Ubuntu 20 vitrual machine I created just to run weewx.
I created a Linux user called weewx, so the /home/weewx directory exists.
I installed the rtl-sdr and rtl-433 using apt-get (DEB packages).
For weewx, I followed the instructions for the "Installation using setup.py" method, where you download the source, make and install it.
That process appeared to work ok - no errors shown during the process.

I'm following the weewx-sdr driver install process and it's falling flat in several places.
Are the instructions incomplete, or out of date?
Is there an incompatibility with python 3.8? (the current version)

Installation
 1) download the driver wget -O weewx-sdr.zip https://github.com/matthewwall/weewx-sdr/archive/master.zip
WORKED
 2) install the driver sudo wee_extension --install weewx-sdr.zip
FAILS with:
weewx@Ubuntu20-WEEWX:~/Downloads$ sudo wee_extension --install weewx-sdr.zip
sudo: wee_extension: command not found

If I remove the sudo, the command runs, but bombs because of permission errors!
FAILS WITH:
weewx@Ubuntu20-WEEWX:~/Downloads$ wee_extension --install weewx-sdr.zip
Request to install 'weewx-sdr.zip'
Extracting from zip archive weewx-sdr.zip
Traceback (most recent call last):
  File "/home/weewx/bin/wee_extension", line 88, in <module>

    main()
  File "/home/weewx/bin/wee_extension", line 80, in main
    ext.install_extension(options.install)
  File "/home/weewx/bin/weecfg/extension.py", line 125, in install_extension
    self.install_from_dir(extension_dir)
  File "/home/weewx/bin/weecfg/extension.py", line 183, in install_from_dir
    shutil.copy(source_path, destination_path)
  File "/usr/lib/python3.8/shutil.py", line 415, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.8/shutil.py", line 261, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/home/weewx/bin/user/sdr.py'


CAN'T GO ANY FARTHER.   HELP REQUESTED.

3) configure the driver sudo wee_config --reconfigure --driver=user.sdr --no-prompt 
4) run the driver directly to identify the packets you want to capture cd /home/weewx sudo PYTHONPATH=bin python bin/user/sdr.py --cmd="rtl_433 -M utc -F json" 
5) modify the [SDR] section of weewx.conf using a text editor - create a [[sensor_map]] for the data you want to capture - possibly modify the 'cmd' parameter 
6) start weewx sudo /etc/init.d/weewx start

storm...@gmail.com

unread,
Apr 19, 2021, 12:22:57 PM4/19/21
to weewx-user
Try this but make sure you are using your path: 
pi@raspberrypi:/home/weewx/bin $ sudo ./wee_extension --install=/home/pi/Downloads/weewx-sdr.zip

Eric Koester

unread,
Apr 19, 2021, 12:49:29 PM4/19/21
to weewx-user
Adding ./ appeared to work!
It appears the installation instructions need to be updated.

weewx@Ubuntu20-WEEWX:~/bin$ sudo ./wee_extension --install weewx-sdr.zip
Request to install 'weewx-sdr.zip'
Extracting from zip archive weewx-sdr.zip
Saving installer file to /home/weewx/bin/user/installer/sdr
Finished installing extension 'weewx-sdr.zip'

vince

unread,
Apr 19, 2021, 4:02:15 PM4/19/21
to weewx-user
Instructions are fine.  All users need to understand how $PATH works and when you need to use absolute paths to commands and when you don't.

In your case, you have a setup.py installation and /home/weewx/bin is not in your $PATH, so you need to use an absolute path for all commands so the shell finds the commands.   If you had been running a dpkg installation, the commands would have been in /usr/bin and in your $PATH automatically.

Reply all
Reply to author
Forward
0 new messages