π Table of Contents
β¨ About the Project
- IoTSensorsOPCUA is an IoT sensor data simulator that allows you to realistically simulate multiple IoT sensors with great flexibility and minimal configuration.
Sample of the data generated by the simulator :
Configuration file for the previous result :
{
"SET_DELAY_BETWEEN_MESSAGES" : 5,
"RANDOMIZE_DELAY_BETWEEN_MESSAGES" : "true",
"SIMULATORS": [
{
"Name" : "Temperature",
"Mean" : 50.0,
"StandardDeviation" : 3.0
},
{
"Name" : "Pressure",
"Mean" : 80.0,
"StandardDeviation" : 9.0
},
{
"Name" : "Humidity",
"Mean" : 40.0,
"StandardDeviation" : 3.0
},
{
"Name" : "Air Quality",
"Mean" : 15.0,
"StandardDeviation" : 5.0
}
]
}
The simulator generates data based on the mean and standard deviation of the actual sensor data.
π· Screenshots
IoTSensorsOPCUA microservice:
UaExpert OPCUA Client connected to IoTSensorsOPCUA server:
π Using the simulator
Check out a scenario of using the simulator :
To run this example (Using Docker):
- Clone this repository :
git clone git@github.com:amine-amaach/simulators.git && cd examples/ioTSensorsOPCUA/
- Run π
docker compose up
π» Development
Make sure you have GO installed (1.18+)
- Clone this repository :
git clone git@github.com:amine-amaach/simulators.git && cd ioTSensorsOPCUA
- Run π
go run cmd/main.go
And Happy Coding
βοΈ Configuration
The application is configured using the following variables:
SET_DELAY_BETWEEN_MESSAGES
- Allows you to set the delay between data points in seconds.
RANDOMIZE_DELAY_BETWEEN_MESSAGES
- Allows you to randomize the duration between data points, when set to
false
SET_DELAY_BETWEEN_MESSAGES is used as fixed duration.
SIMULATORS
USERIDs
- Allows you to add users to the OPCUA server for authenticated connections.
Config Sample
{
"SET_DELAY_BETWEEN_MESSAGES" : 5,
"RANDOMIZE_DELAY_BETWEEN_MESSAGES" : "true",
"SIMULATORS": [
{
"Name" : "Temperature",
"Mean" : 50.0,
"StandardDeviation" : 3.0
},
{
"Name" : "Pressure",
"Mean" : 80.0,
"StandardDeviation" : 9.0
}
],
"USERIDs": [
{
"Username" : "root",
"Password" : "secret"
}
]
}
Amine Amaach - LinkedIn - Email
Project Link: https://github.com/amine-amaach/simulators.git
π Contributing
Every bit helps! If you come across any bugs, please send a bug report, or if you feel inclined to fix it yourself, submit a pull request.
π Acknowledgements