Rsudp not retrieving data from right station

Hello,

I’m having a go at using rsudp on my remote raspberry shakes.
I have set the data forwarding to off, instead I have them all on a ZeroTier VPN together with my laptop.

I have kept most of the default configuration settings on the .json file shown here below (~/.config/rsudp/rsudp_settings.json) only changing the station ID.

I set the station ID to any of my 1D stations, but when I run rsudp I am getting the running waveforms and spectrogram datastream for a 3D station labelled as the my 1D station.

For example the one I have in the json file below, R86D1, is a 1D RS, so it can’t possibly stream data for three components.

On the webfront end for this station under DATACAST I specified the vpn IP of my laptop as Target Host IP, and 8888 as Target Port.

I have kept most of the default configuration settings on the .json file shown here below (~/.config/rsudp/rsudp_settings.json) only really changing the station ID.

A more stark example of this is giving the name of a station I know is offline and powered down. I still get the three component data stream.

To make things more confusing my output_dir is gathering miniSEED files for the corresponding stations I specify and the metadata which I have checked to be correct and not just mislabeled.

So in summary I know retrieved the metadata to be correct but the streamed data must be wrong.

What is wrong with my setup?

Thanks in advance for any help with this!

Below is the configuration settings and further below the output on the terminal when the rs-client is run. For this device R86D1 the correct vpn IP address is 192.168.191.21, however under Sending IP address: the ip address of one of my other 3D raspberry shakes shows up 192.168.191.9. Also
the other devices seem to be competing to send data through to the port:
Another IP (192.168.191.17) is sending UDP data to this port
Another IP (192.168.191.2) is sending UDP data to this port

**CONFIGURATION SETTINGS for R86D1**
{
"settings": {
    "port": 8888,
    "station": "R86D1",
    "output_dir": "/home/user/rsudp",
    "debug": true},
"printdata": {
    "enabled": true},
"write": {
    "enabled": true,
    "channels": ["all"]},
"plot": {
    "enabled": true,
    "duration": 90,
    "spectrogram": true,
    "fullscreen": false,
    "kiosk": false,
    "eq_screenshots": false,
    "channels": ["all"],
    "deconvolve": false,
    "units": "CHAN"},
"forward": {
    "enabled": false,
    "address": ["192.168.1.254"],
    "port": [8888],
    "channels": ["all"],
    "fwd_data": true,
    "fwd_alarms": false},
"alert": {
    "enabled": true,
    "channel": "HZ",
    "sta": 6,
    "lta": 30,
    "threshold": 3.95,
    "reset": 0.9,
    "highpass": 0.8,
    "lowpass": 9,
    "deconvolve": false,
    "units": "VEL"},
"alertsound": {
    "enabled": false,
    "mp3file": "doorbell"},
"custom": {
    "enabled": false,
    "codefile": "n/a",
    "win_override": false},
"tweets": {
    "enabled": false,
    "tweet_images": true,
    "api_key": "n/a",
    "api_secret": "n/a",
    "access_token": "n/a",
    "access_secret": "n/a",
    "extra_text": ""},
"telegram": {
    "enabled": false,
    "send_images": true,
    "token": "n/a",
    "chat_id": "n/a",
    "extra_text": ""},
"rsam": {
"enabled": false,
    "quiet": true,
    "fwaddr": "192.168.1.254",
    "fwport": 8887,
    "fwformat": "LITE",
    "channel": "HZ",
    "interval": 10,
    "deconvolve": false,
    "units": "VEL"}
}

OUTPUT:

*(rsudp) user@X1C9:~$ vim ~/.config/rsudp/rsudp_settings.json*
*rs-client*
*Qt import failed. Trying Tk...*
*detail: No module named 'PyQt5'*
*2023-11-08 12:31:21 [Init] Logging initialized successfully.*
*2023-11-08 12:31:21 Using settings file: /home/miguel/.config/rsudp/rsudp_settings.json*
*2023-11-08 12:31:21 Output directory is: /home/miguel/rsudp*
*2023-11-08 12:31:21 [RS lib] Initializing rsudp v 1.1.1.*
*2023-11-08 12:31:21 [openSOCK] Opening socket on localhost:8888 (HOST:PORT)*
*2023-11-08 12:31:21 [RS lib] Waiting for UDP data on port 8888...*
*2023-11-08 12:31:22 [Init] **Available channels: ['EHZ', 'EHN', 'EHE']***
*2023-11-08 12:31:22 [get_inventory] Fetching inventory for station AM.R2ED4 from Raspberry Shake FDSN.*
*/home/user/anaconda3/envs/rsudp/lib/python3.7/site-packages/obspy/io/stationxml/core.py:98: UserWarning: The StationXML file has version 1.2, ObsPy can read versions (1.0, 1.1). Proceed with caution.*
*  version, ", ".join(READABLE_VERSIONS)))*
*2023-11-08 12:31:23 [get_inventory] Inventory fetch successful. Station region is UNITED KINGDOM*
*2023-11-08 12:31:23 [conn_stats] Initialization stats:*
*2023-11-08 12:31:23 [conn_stats]                 Port: 8888*
*2023-11-08 12:31:23 [conn_stats]   **Sending IP address: 192.168.191.9***
*2023-11-08 12:31:23 [conn_stats]     **Set station name: R2ED4***
*2023-11-08 12:31:23 [conn_stats]   **Number of channels: 3***
*2023-11-08 12:31:23 [conn_stats]   Transmission freq.: 84 ms/packet*
*2023-11-08 12:31:23 [conn_stats]    Transmission rate: 11 packets/sec*
*2023-11-08 12:31:23 [conn_stats]   Samples per second: 297 sps*
*2023-11-08 12:31:23 [conn_stats]            Inventory: AM.R2ED4 (Raspberry Shake Citizen Science Station)*
*2023-11-08 12:31:23 [Print] Starting.*
*2023-11-08 12:31:23 [Write] **Writing channels: ['EHZ', 'EHN', 'EHE']***
*2023-11-08 12:31:23 [Write] Starting.*
*2023-11-08 12:31:23 [Plot] WARNING: Running on x86_64 machine, using Tk instead of Qt*
*2023-11-08 12:31:23 [Plot] **Plotting 3 channels: ['EHZ', 'EHN', 'EHE']***
*2023-11-08 12:31:23 [Plot] Seismogram units are channel-specific*
*2023-11-08 12:31:23 [Plot] Starting.*
*2023-11-08 12:31:23 [Alert] Alert stream units are counts*
*2023-11-08 12:31:23 [Alert] Alert stream will be bandpass filtered from 0.8 to 9 Hz*
*2023-11-08 12:31:23 [Consumer] Starting.*
*2023-11-08 12:31:23 [Producer] Starting.*
*2023-11-08 12:31:23 [Producer] **Receiving UDP data from 192.168.191.21***
*2023-11-08 12:31:23 [Producer] **Another IP (192.168.191.9) is sending UDP data to this port**. Ignoring...*
*2023-11-08 12:31:23 [Alert] Starting Alert trigger with sta=6s, lta=30s, and threshold=3.95 on channel=EHZ*
*b"{'EHZ', 1699446681.996, 14544, 14970, 15748, 16513, 17092, 17221, 17494, 17627, 17834, 18047, 17959, 17708, 17031, 16222, 15731, 15348, 15021, 14736, 14739, 14954, 14885, 14640, 14230, 14181, 14201}"*
*2023-11-08 12:31:23 [Producer] **Another IP (192.168.191.17) is sending UDP data to this port**. Ignoring...*
*2023-11-08 12:31:23 [Alert] Earthquake trigger warmup time of 30 seconds...*
*2023-11-08 12:31:23 [Producer] **Another IP (192.168.191.2) is sending UDP data to this port**. Ignoring...*

Hello mdpw,

I did a quick edit of your message to show the code in a more readable way.

It is unusual, but I remember something similar happening to another user in the past (one or two years ago, more or less). A couple of questions:

  1. How many Shakes are on your ZT VPN?
  2. Do all of them have UDP data forwarding enabled?

If the answer to the last one is yes, can you try disabling it for all your ZT Shakes, then re-enabling it only for the one you want to stream via RSUDP, to see if there is no more IP confusion?

After this test, if successful, you can then try to re-enable another one, and see what happens in that instance. This may give us clues on the overall network situation.

Thank you.

Hi @Stormchaser, thanks for your your reply. sorry for the my late reply.

  1. there are at the moment 4 shakes online in the ZT VPN.
  2. All of them have Data forwarding unticked / OFF. under the DATA tab.
    For all of them, under the DATACAST tab, I have set the TARGET HOST IP as my laptop’s virtual IP and TARGET PORT as 8.8.8.8. Does this count as having UDP data forwarding enabled ?

Apart from the above and installing rsudp on my laptop following the instructions in the Documentation (rsudp 1.1.1 — rsudp documentation ), I have not changed any other settings on the raspberry shakes themselves.

I’ve noticed the DNS server under NETWORK is not the same for all of them. Should it be say, 8.8.8.8 for all of them? or is this irrelevant?

I tested the following: I removed the target host ip and target port entries. for all except one device.
I ran rsudp and out of 5 tries I might have got one where what I think the right stream was showing.
but the output on the terminal still seems to me like things are jumbled up.

It also doesn’t seem to make any difference what the settings under DATACAST are, whether there IP and Port are defined or not on one or any.

The virtual ip for the R2ED4 is 192.168.191.21. In the below terminal output you can see how the IP addresses shown from [conn-stats] or [producer] don’t match this. Also the IP addresses from [conn-stats] or [producer] just swap around between tries. Ultimately I have no way of knowing what is being streamed. :confused:

2023-11-23 17:15:28 [Init] Logging initialized successfully.
2023-11-23 17:15:28 Using settings file: /home/user/.config/rsudp/rsudp_settings.json
2023-11-23 17:15:28 Output directory is: /home/user/rsudp
2023-11-23 17:15:28 [RS lib] Initializing rsudp v 1.1.1.
2023-11-23 17:15:28 [openSOCK] Opening socket on localhost:8888 (HOST:PORT)
2023-11-23 17:15:28 [RS lib] Waiting for UDP data on port 8888...
2023-11-23 17:15:30 [Init] Available channels: ['EHZ']
2023-11-23 17:15:30 [get_inventory] Fetching inventory for station AM.R2ED4 from Raspberry Shake FDSN.
/home/user/anaconda3/envs/rsudp/lib/python3.7/site-packages/obspy/io/stationxml/core.py:98: UserWarning: The StationXML file has version 1.2, ObsPy can read versions (1.0, 1.1). Proceed with caution.
version, ", ".join(READABLE_VERSIONS)))
2023-11-23 17:15:30 [get_inventory] Inventory fetch successful. Station region is UNITED KINGDOM
2023-11-23 17:15:30 [conn_stats] Initialization stats:
2023-11-23 17:15:30 [conn_stats]                 Port: 8888
2023-11-23 17:15:30 [conn_stats]   Sending IP address: **192.168.191.17**
2023-11-23 17:15:30 [conn_stats]     Set station name: **R2ED4**
2023-11-23 17:15:30 [conn_stats]   Number of channels: 1
2023-11-23 17:15:30 [conn_stats]   Transmission freq.: 136 ms/packet
2023-11-23 17:15:30 [conn_stats]    Transmission rate: 7 packets/sec
2023-11-23 17:15:30 [conn_stats]   Samples per second: 183 sps
2023-11-23 17:15:30 [conn_stats]            Inventory: AM.R2ED4 (Raspberry Shake Citizen Science Station)
2023-11-23 17:15:30 [Print] Starting.
2023-11-23 17:15:30 [Write] Writing channels: ['EHZ']
2023-11-23 17:15:30 [Write] Starting.
2023-11-23 17:15:30 [Plot] WARNING: Running on x86_64 machine, using Tk instead of Qt
2023-11-23 17:15:30 [Plot] Plotting 1 channels: ['EHZ']
2023-11-23 17:15:30 [Plot] Seismogram units are channel-specific
2023-11-23 17:15:30 [Plot] Starting.
2023-11-23 17:15:30 [Alert] Alert stream units are counts
2023-11-23 17:15:30 [Alert] Alert stream will be bandpass filtered from 0.8 to 9 Hz
2023-11-23 17:15:30 [Consumer] Starting.
2023-11-23 17:15:30 [Producer] Starting.
2023-11-23 17:15:30 [Producer] **Receiving UDP data from 192.168.191.21**
2023-11-23 17:15:30 [Producer] Another IP (192.168.191.17) is sending UDP data to this port. Ignoring...
1 Like

hello mdpw,

if you want to send data from multiple stations to the same destination computer, you will need to set up separate configuration files for each station (since the station name is configured there), and will also need to have each of your Shake units specify a different port number, you cannot send data from multiple shakes to the same IP::PORT combination.

you can find additional details in another post that asked this:

cheers, hope this helps,
richard

1 Like