Installing rsudp

I was interested to see the ‘rsudp’ application so I wanted to try it out on my Raspberry Pi 4 desktop machine. I got the .zip file from github and started as shown here
https://raspishake.github.io/rsudp/installing.html

with ‘bash unix-install-rsudp.sh’ and that appeared to mostly succeed, however I got a failure near the end:

Successfully installed APScheduler-3.6.3 cachetools-4.2.2 chardet-4.0.0 decorator-5.0.9 kiwisolver-1.3.1 matplotlib-3.1.1 oauthlib-3.1.1 obspy-1.2.2 pydub-0.25.1 python-telegram-bot-13.6 pytz-2021.1 requests-2.25.1 requests-oauthlib-1.3.0 rsudp-1.0.2 tornado-6.1 twython-3.8.2 tzlocal-2.1 urllib3-1.26.5
rsudp has installed successfully!
Installing new settings file...
Qt import failed. Trying Tk...
detail: No module named 'PyQt5'
Creating a default settings file at /home/pi/.config/rsudp/rsudp_settings.json
Success.
You can enter the command "conda activate rsudp" to activate the rsudp conda environment
and then run rsudp by using the command "rs-client -h"
pi@rp49:~/rsudp-master $ conda activate rsudp
bash: conda: command not found
pi@rp49:~/rsudp-master $ cd
pi@rp49:~ $ conda activate rsudp
bash: conda: command not found

I attempted to install pyqt5 separately which seemed to succeed, and yet I still got the same error "No module named ‘PyQt5’ " when I tried to run the rs-client. Any advice would be appreciated!

(rsudp) pi@rp49:~ $ sudo pip3 install pyqt5
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyqt5
  Downloading PyQt5-5.15.4.tar.gz (3.3 MB)
     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 3.3 MB 3.4 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting PyQt5-sip<13,>=12.9
  Downloading https://www.piwheels.org/simple/pyqt5-sip/PyQt5_sip-12.9.0-cp37-cp37m-linux_armv7l.whl (274 kB)
     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 274 kB 225 kB/s 
Building wheels for collected packages: pyqt5
  Building wheel for pyqt5 (PEP 517) ... done
  Created wheel for pyqt5: filename=PyQt5-5.15.4-cp36.cp37.cp38.cp39-abi3-manylinux2014_armv7l.whl size=4500428 sha256=4b24d778c3356213a1ed2ee3ac4fb4f4a819d1a2acfe0d8733181f302394d476
  Stored in directory: /root/.cache/pip/wheels/85/17/6c/2e858d4dd371cb27df8fe3b43623e520e96d3cca64814ad999
Successfully built pyqt5
Installing collected packages: PyQt5-sip, pyqt5
Successfully installed PyQt5-sip-12.9.0 pyqt5-5.15.4
WARNING: You are using pip version 21.0.1; however, version 21.1.2 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
(rsudp) pi@rp49:~ $ rs-client -d default
Qt import failed. Trying Tk...
detail: No module named 'PyQt5'
By default output_dir is set to /home/pi/rsudp
Creating a default settings file at /home/pi/.config/rsudp/rsudp_settings.json

Hello jbeale,

regarding PyQt5, this is not available on Raspberry Pi armv71 architecture, and there are reports that a simple installation does not work as it should in some cases. You would have to build it from scratch on the machine and then install it, as suggested in this post: python - Can't install PyQt5 On Raspberry pi - Stack Overflow

However, this is not a particular issue because the system will automatically check for alternatives, as it does with this line: Qt import failed. Trying Tk...

We are aware of those warnings, that appear when one runs RSUDP on a Raspberry armv7I machine, and hopefully, they will be fixed in future releases. Especially the second one states that it is using the Tk module instead of the Qt module because on a Pi only the first module is present.

Regarding the bash: conda: command not found error, have you tried the steps explained in point 2.1.1 of our RSUDP guide? 2. Installing rsudp — rsudp documentation

It remains a puzzle to me why I can apparently successfully compile and install pyqt5 on my Pi4 as shown below, note the line “Successfully installed PyQt5-sip-12.9.0 pyqt5-5.15.4” but then ‘rs-client’ says ‘Qt import failed.’ However, now the problem seems to be something else: libharfbuzz.so.0: undefined symbol: FT_Done_MM_Var
which stackexchange suggests is something about incompatible library versions.

(rsudp) pi@rp49:~/doppler/rp22 $ pip install pyqt5
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyqt5
  Downloading PyQt5-5.15.4.tar.gz (3.3 MB)
     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 3.3 MB 3.0 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting PyQt5-sip<13,>=12.9
  Downloading PyQt5_sip-12.9.0.tar.gz (103 kB)
     |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 103 kB 3.7 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pyqt5, PyQt5-sip
  Building wheel for pyqt5 (PEP 517) ... done
  Created wheel for pyqt5: filename=PyQt5-5.15.4-cp36.cp37.cp38.cp39-abi3-manylinux2014_armv7l.whl size=4500398 sha256=c22f1e82bc4ffd76d8f54a513d84fe6601dcde78c9880647f0631c3c782e17ff
  Stored in directory: /home/pi/.cache/pip/wheels/2e/b0/47/ee44a3922ee4f20d3212cf4fed5686caa82bb9541e4a958b7c
  Building wheel for PyQt5-sip (PEP 517) ... done
  Created wheel for PyQt5-sip: filename=PyQt5_sip-12.9.0-cp36-cp36m-linux_armv7l.whl size=252275 sha256=90ac9ecc0a2e0d132e2e7e698f4f1aefe9cc205365dad31ce466685c9589cbe7
  Stored in directory: /home/pi/.cache/pip/wheels/22/d0/21/ceccddaccf29e34df20648594f21e95a35cec661ee11122373
Successfully built pyqt5 PyQt5-sip
Installing collected packages: PyQt5-sip, pyqt5
Successfully installed PyQt5-sip-12.9.0 pyqt5-5.15.4
(rsudp) pi@rp49:~/doppler/rp22 $ rs-client -d default
Qt import failed. Trying Tk...
detail: /usr/lib/arm-linux-gnueabihf/libharfbuzz.so.0: undefined symbol: FT_Done_MM_Var
By default output_dir is set to /home/pi/rsudp
Creating a default settings file at /home/pi/.config/rsudp/rsudp_settings.json

I decided maybe the RPi just won’t work, so I tried on a Windows machine. This began to work, but the installer failed to install miniconda3 because the user’s home directory has a space in the directory name, and it did not offer to use a different directory.

Hello jbeale,

Regarding the libharfbuzz.so.0: undefined symbol: FT_Done_MM_Var, I tried to replicate the issue with a new installation on my RPi but this has not appeared in the two times I did it. I have a RPi 3+ board in case you need this information for a comparison with what you have.

I am seeing that from your code the last line indicates that a rsudp_settings.json should have been created. If so, have you tried going forward in setting up the modules and trying to start the software as indicated here 3. Modules and Settings — rsudp documentation and here 4. Running rsudp — rsudp documentation?

Regarding the Windows installation instead, you can go around the issue by installing Anaconda or Miniconda by yourself first, and then adding the environment and the software afterwards, as shown here: 2. Installing rsudp — rsudp documentation

I actually did it in this way because I had Anaconda already installed on my Win10 system.

I got this working, after getting a new Win10 laptop, installing Anaconda, and then rsudp. Very good!

However I am puzzled by the correct format of the station name in the setup file. For example, with this in the rsudp_settings.json file:

"settings": {
    "port": 8888,
    "station": "RF7DC",
    "output_dir": "C:\Users\beale\rsudp",
    "debug": true},

I get no graphical output, and a warning about the station name being wrong:

2021-06-10 23:29:04 [Main] Logging initialized successfully.
2021-06-10 23:29:04 Using settings file: C:/Users/beale/.config/rsudp/rsudp_settings.json
2021-06-10 23:29:04 Output directory is: C:\Users\beale\rsudp
2021-06-10 23:29:04 [Init] Initializing.
2021-06-10 23:29:04 [openSOCK] Opening socket on localhost:8888 (HOST:PORT)
2021-06-10 23:29:04 [Init] Waiting for UDP data on port 8888...
2021-06-10 23:29:07 [Init] Available channels: ['EHZ']
2021-06-10 23:29:07 [get_inventory] Fetching inventory for station AM.RF7DC from Raspberry Shake FDSN.
2021-06-10 23:29:08 [get_inventory] Inventory fetch successful. Station region is WASHINGTON-OREGON BORDER REGION
2021-06-10 23:29:08 [conn_stats] Initialization stats:
2021-06-10 23:29:08 [conn_stats]                 Port: 8888
2021-06-10 23:29:08 [conn_stats]   Sending IP address: 192.168.1.130
2021-06-10 23:29:08 [conn_stats]     Set station name: RF7DC
2021-06-10 23:29:08 [conn_stats]   Number of channels: 1
2021-06-10 23:29:08 [conn_stats]   Transmission freq.: 250 ms/packet
2021-06-10 23:29:08 [conn_stats]    Transmission rate: 4 packets/sec
2021-06-10 23:29:08 [conn_stats]   Samples per second: 100 sps
2021-06-10 23:29:08 [conn_stats]            Inventory: AM.RF7DC (Raspberry Shake Citizen Science Station)
2021-06-10 23:29:08 [Plot] Plotting 1 channels: ['EHZ']
2021-06-10 23:29:08 [Plot] Signal deconvolution set to CHAN
2021-06-10 23:29:08 [Plot] Seismogram units are channel-specific
2021-06-10 23:29:08 [Plot] Starting.
2021-06-10 23:29:08 [Alert] Alert stream units are counts
2021-06-10 23:29:08 [Consumer] Starting.
2021-06-10 23:29:08 [Producer] Starting.
2021-06-10 23:29:08 [Producer] Receiving UDP data from 192.168.1.130
←[91m2021-06-10 23:29:08 [make_trace] ERROR: No matching response information found.←[0m
2021-06-10 23:29:08 [Alert] Starting Alert trigger with sta=6s, lta=30s, and threshold=1.7 on channel=EHZ
←[91m2021-06-10 23:29:08 [make_trace] ERROR: Could not attach inventory response.←[0m
2021-06-10 23:29:08 [Alert] Earthquake trigger warmup time of 30 seconds...
←[91m2021-06-10 23:29:08 [make_trace]        Are you sure you set the station name correctly?←[0m
←[91m2021-06-10 23:29:08 [make_trace]        This could indicate a mismatch in the number of data channels←[0m
←[91m2021-06-10 23:29:08 [make_trace]        between the inventory and the stream. For example,←[0m
←[91m2021-06-10 23:29:08 [make_trace]        if you are receiving RS4D data, please make sure←[0m
←[91m2021-06-10 23:29:08 [make_trace]        the inventory you download has 4 channels.←[0m

Now if I change that line in the .json file for the station name to “station”: “AM.RF7DC”,
then I do see the live data scroll across the screen (nice display by the way) but the window is labelled “AM.AM.RF7DC” and I get a warning about a non-standards-conformant name.
It feels like I am missing something here.

2021-06-10 23:37:18 [Main] Logging initialized successfully.
2021-06-10 23:37:18 Using settings file: C:/Users/beale/.config/rsudp/rsudp_settings.json
2021-06-10 23:37:18 Output directory is: C:\Users\beale\rsudp
2021-06-10 23:37:18 [Init] Initializing.
←[93m2021-06-10 23:37:18 Station name does not follow Raspberry Shake naming convention.←[0m
2021-06-10 23:37:18 [openSOCK] Opening socket on localhost:8888 (HOST:PORT)
2021-06-10 23:37:18 [Init] Waiting for UDP data on port 8888...
2021-06-10 23:37:21 [Init] Available channels: ['EHZ']
2021-06-10 23:37:21 [get_inventory] Fetching inventory for station AM.AM.RF7DC from Raspberry Shake FDSN.
←[93m2021-06-10 23:37:22 [get_inventory] WARNING: No inventory found for AM.RF7DC. Are you forwarding your Shake data?←[0m
←[93m2021-06-10 23:37:22 [get_inventory]          Deconvolution will only be available if data forwarding is on.←[0m
←[93m2021-06-10 23:37:22 [get_inventory]          Access the config page of the web front end for details.←[0m
←[93m2021-06-10 23:37:22 [get_inventory]          More info at https://manual.raspberryshake.org/quickstart.html←[0m
2021-06-10 23:37:22 [conn_stats] Initialization stats:
2021-06-10 23:37:22 [conn_stats]                 Port: 8888
2021-06-10 23:37:22 [conn_stats]   Sending IP address: 192.168.1.130
2021-06-10 23:37:22 [conn_stats]     Set station name: AM.RF7DC
2021-06-10 23:37:22 [conn_stats]   Number of channels: 1
2021-06-10 23:37:22 [conn_stats]   Transmission freq.: 250 ms/packet
2021-06-10 23:37:22 [conn_stats]    Transmission rate: 4 packets/sec
2021-06-10 23:37:22 [conn_stats]   Samples per second: 100 sps
2021-06-10 23:37:22 [Plot] Plotting 1 channels: ['EHZ']
2021-06-10 23:37:22 [Plot] Seismogram units are channel-specific
2021-06-10 23:37:22 [Plot] Starting.
2021-06-10 23:37:22 [Alert] Alert stream units are counts
2021-06-10 23:37:22 [Consumer] Starting.
2021-06-10 23:37:22 [Producer] Starting.
2021-06-10 23:37:22 [Producer] Receiving UDP data from 192.168.1.130
2021-06-10 23:37:22 [Alert] Starting Alert trigger with sta=6s, lta=30s, and threshold=1.7 on channel=EHZ
2021-06-10 23:37:22 [Alert] Earthquake trigger warmup time of 30 seconds...

Figured it out. I have two R-Shake stations, and I used the name of the wrong one. I only configured the other one to send UDP packets. So changing it to

"station": "R79D5",

in my case is what was needed to fix it; now it works as expected.

2 Likes

That’s great to know! And yes, RSUDP now shows exactly what it should be shown!

Enjoy!

Enjoy @jbeale.

It is always great to see you on the forum.

branden

1 Like