-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create simulated sensor node using real accelerations #6
Comments
One of my initial Node-RED experiments read in a JSONL file. I practiced on a JSONL file as I learned how to parse the data. It was a windy journey the first time but I could recreate that easily now. I could play that directly into a simple dashboard similar to the Node-RED example #2 ? This would be a flow. Easily modified. You might be asking for a specific Node-RED node. That's quite a bit more work and less flexible. |
I would potentially not do this with Node-RED. Its still a bunch of work.... Would be just as easy to point a dashboard via http get to |
The Docker detection project pretty much does this: https://github.com/openeew/openeew-detection#simulate-sensor-data This simulator runs against the local (Docker) or remote (Kubernetes) MQTT node |
To be honest, if you just need a simulator, there's a full date picker solution in Example #3 of the Node-RED repo here. You can pick your dataset and view it. I think it would be a simple modification to play the data as a simulator. |
Maybe I have another idea for this issue. Strip away the MQTT broker, strip away the dashboard widgets. What if all the date picker dashboard widgets moved into a Node-RED edit dialog. The user picks the sensor, date, time, duration of playback. Behind the scene, the node builds the AWS bucket URL, retrieves all the historic data, and then emits the subsecond x/y/z acceleration data as if it was coming from a live MQTT feed..... The user clicks the "Inject" tab and the data plays into the rest of the Node-RED flow. |
As a first iteration, the Node-RED edit properties dialog asks for a file path to a JSONL file that you've already downloaded. It reads the JSONL file and plays the data into the rest of the Node-RED flow. That would satisfy the initial request? |
Yes, I believe that would satisfy the folk in #node-red who asked for live data |
To help with testing it would be great to have a simple node that reads from a local file that contains sensor readings from a real earthquake, eg https://github.com/openeew/openeew-detection/tree/master/input/2018_7.2, and send them into the flow.
FYI, each of these files is a JSONL file, belonging to a unique sensor, where every line is one seconds worth of data in x,y and z. Therefore we need to send one line per second to simulate a live sensor.
The text was updated successfully, but these errors were encountered: