Higher level downstream data procressing


first of all I want to thank all the team for their work and this great tool. After purchasing my shake 4D some while ago, I finally was able to hock it up last weekend (station R57EA). I quickly was excited about nearly everything.

I already went down the line to connect with Node-Red and used rsudp, which both work as expected. I am now looking into how to process the real-time data at a higher level downstream. Node-Red is a great tool, but it still only gives “counts” and no acceleration or velocity data. rsudp has those and works great, but it “stays” inside rsudp itself (beside ploting, but this does not enable downstream processing). I had hoped that after processing the udp datagrams in rsudp the “forwarding” option could also provide the normalized acc/vel data for e.g. Node-Red. But it seems this does not happen and rsudp simply forwards the dataframes as it got them from the shake.

Ideally I want to send those acc/vel and the alarm/reset data into an MQTT topic, which I than can subscribe wherever I want. The most logical place for me right now seems to be rsudp. I am aware of obspy, but this does not work on real-time data, please correct me if I am wrong?

Any ideas how I could achieve my target? Maybe it is plain simple but I don’t see it?



digging deeper I was thinking to use the rsupd with the feature to forward the alert to Node-Red with the Shake node that can process the raw UDP diagram. But doing so gives only a:

“SyntaxError: Unexpected token A in JSON at position 0”

Seems the whole system around Raspberry Shake is not ready for prime time (at a higher level) as for now.

Ok, next try was the “rsam” added in version 1.0.1. But there is not documentation regarding it. Should I use a UDP socket? TCP or HTTP? Use the same port on Node-Red as for the raw UDP diagrams. Would be nice to have at least some hints.


Hello Martin, welcome to our community!

Node-Red gives only counts, yes. It is meant for playing around and display basic counters, to provide something that will allow, for example, kids to grab the data and play with it by creating meters and such, which is easy to do in Node-Red. You could add a node in that software to “process” the data and remove the instrument response, thus obtaining the desired result.

ObsPy can work with real-time data, and many processes of our RSUDP are based on the packages that the suite provides to us. RSUDP is given as a base template for doing any high-level processing you would like. The intent is that it contains numerous examples of how data can be processed: writing to disk in multiple formats, drawing the data to a display, setting up alerts based on your own criteria, etc.

When you would like something more done than this, all the information is there, inside RSUDP itself, for you to write your own module and process the data exactly as you require. It’s one of its strongest points, and if you create something that could be used by the community, we always encourage our users to share what they have created.

To conclude, even if I’m sure you have already seen it, but to give more help to other users that may read this topic, I leave the link to the RSUDP documentation: rsudp 1.0.2 — rsudp documentation