ioTSensorsOPCUA

module
v0.0.0-...-0c72d35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: Apache-2.0

README ΒΆ

logo

IoT Sensors Data Simulator - OPCUA

IoT Sensors Data over OPCUA

contributors forks stars open issues license Linkedin

Demo Β· Report Bug Β· Request Feature


πŸ“’ 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 :

screenshot

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:

screenshot

UaExpert OPCUA Client connected to IoTSensorsOPCUA server:

screenshot

πŸ“Ž Using the simulator


Check out a scenario of using the simulator :

  • Docker is the recommended way to use the simulator.

    A Docker image of the simulator is available : docker pull amineamaach/sensors-opcua.

pgmqtt-example

To run this example (Using Docker):

  1. Clone this repository :
  git clone git@github.com:amine-amaach/simulators.git && cd examples/ioTSensorsOPCUA/
  1. Run πŸƒ
  docker compose up

πŸ’» Development


Make sure you have GO installed (1.18+)

  1. Clone this repository :
  git clone git@github.com:amine-amaach/simulators.git && cd ioTSensorsOPCUA
  1. 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

  • Allows you to define simulators with their parameters.

    Name : The sensor's name.

    Mean : The data mean of the actual sensor.

    StandardDeviation : The data Standard Deviation of the actual sensor.

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"
        }
    ]
}

🀝 Contact


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


Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL