This guide helps you set up the DataAggregator demo project using Docker. The system includes services to collect, process, and visualize data.
Be sure to have docker and docker-compose installed on your PC. guide here
Actually, the system supports two types of collectors: one for gathering data from an OpenCN environment through Cap’n Proto, and another for collecting data from a simple file. The latter is intended for testing purposes and can be used to simulate data input. The main branch of this repository uses the file-based collector, making it easy to test the system without requiring a real OpenCN environment.
If you want to use the OpenCN connector, you can switch to the deploy/OpenCN branch. The only differences lie in the collector configuration file. The deploy/OpenCN branch contains the necessary configuration and explanations to connect to an OpenCN environment.
git clone git@github.com:CoJaques/DataAggregator-demo.git
# or
git clone https://github.com/CoJaques/DataAggregator-demo.git
cd DataAggregator-demoInfluxDB v3 does not support token creation via env vars, so you must generate it manually:
docker compose pull
docker compose up -d influxdb
docker exec -it dataaggregator_influxdb influxdb3 create token --adminThen, copy the token and paste it into the .env file:
The token must be this form : apiv3_2tJOGgGL9f9kjNobLuZM0DCBbdx0EkeNI5UummbUVNg1_uAq6oY69AUP_ActKb-t4VgoCPguvxVZs6wXmmDjPQ
INFLUXDB3_AUTH_TOKEN=your-token-hereEdit configs/registration/appsettings.json and update the token:
"Influx": {
"Endpoints": [
{
"Name": "DefaultEndpoint",
"Token": "your-token-here",
"Endpoint": "http://influxdb:8181"
}
]
}docker compose up -dOpen http://localhost:3001 and log in with:
- Username:
admin - Password:
admin
The Micro5 dashboard displays the live data collected.
Select the dashboard here :
Then set the parameters to display, for example, the last 15 minutes of data and to automatically refresh the dashboard every 5 seconds.
This service fetches data (e.g., current) from an OpenCN Cap’n Proto server or a simple file.
- DeviceName / Location: metadata for the registration service
- FlushIntervalMilliseconds: how often to send data to InfluxDB
- SamplingRate: ideal rate; the system picks the best matching thread
- BufferSettings: data buffer in case of connectivity issues
- CapnProto.ServerAddress / Port: OpenCN endpoint
- Files: list of files to read data from (for testing)
- Sensors: define collected signals
{
"Name": "current-amp-x",
"Type": "Current",
"Unit": "A",
"Metadata": { "MinValue": "-20", "MaxValue": "20" },
"DataType": "float",
"PinName": "streamer.0.pin.0"
}Supported
DataTypevalues:float,integer,string,boolean.
This service retrieves sensor data and processes it using a configurable pipeline.
-
RegistrationServiceUrl: to fetch machine & sensor metadata
-
Machines: list of machine pipelines to process
-
InputSensors: must match collector sensors
-
WindowSize / WindowSizeInSeconds:
- If
true: process last N seconds of data. - If
false: slice incoming data into fixed-size windows.
- If
-
CycleIntervalSeconds: frequency of processing cycles
{
"MachineName": "Micro5",
"Enabled": true,
"InputSensors": [...],
"WindowSize": 30,
"WindowSizeInSeconds": false,
"CycleIntervalSeconds": 1,
"ProcessingPipeline": [...]
}-
actuatorcurrent: Z-score normalization and features extraction using model-specific parameters:"NormalizationParameters": { "LoadBalance": [ 0.003958, 0.018749 ], ... }
-
onnxprediction: Runs an ONNX model:"ModelPath": "resources/opencn_model.onnx"
-
statedeductionpostprocessor: Post-processing to filter unstable states:"Threshold": 3 // Number of consecutive predictions required for stable state
This project is licensed under the PolyForm Noncommercial License 1.0.0. See the LICENSE file for details.
This project was developed as part of a Bachelor thesis and is published with permission. Any commercial use is not permitted without prior discussion with the author.
this readme was enhanced by AI to clean the formatting and structure the content