The technical documentation of the microservice iotsensorsmqtt

This microservice is a community contribution and is not part of the main stack of the United Manufacturing Hub, but it is enabled by default.

This microservice simulates data in three different topics, make sure to look at our Node-RED flows to see how to utilize them to generate custom data. You can read the documentation of the standalone application here.

With the standard configuration it simulates three different parameters around a set mean and standard deviation. It publishes messages on the topic ia/raw/development/ioTSensors/# wherein # is the parameter.

If you want the simulated messaged to be processValues or other message types, just quickly adjust them via a Node-RED flow. We have some templates in our Node-RED repository.

Environment variables

This chapter explains all the variables used in IoTSensorsMQTT. Be aware that in the UMH stack implementation of this microservice many environment variables are set in its own config.yaml instead of the values.yaml which retrieves environment variables for other microservices.

Variable nameDescriptionTypePossible valuesExample value
SERVER_URLServer URL of the MQTT serverstringvalid MQTT server addressmqtt://united-manufacturing-hub-vernemq-local-service:1883
SERVER_USERUser authentication if enabled on the serverstringanyjeremy
SERVER_PWDSpecifies the user of the REST APIstringanychangeme
CLIENT_IDThe Client ID for broker connectionstringallIoTSensorsMQTT-Simulator
SET_DELAY_BETWEEN_MESSAGESdelay between messages in secondsintpositive numbers15
RANDOMIZE_DELAY_BETWEEN_MESSAGESWhether or not the duration between data points should be randomizedbooltrue, falsefalse
SIMULATORSMap with the specifications for all parametersmapvalid maps with name, mean and standard deviation[{Name: Temperature, Mean: 5, StandardDeviation: 1}]
NameName of the parameterstringallTemperature, Humidity, Density, Weight
Meanmean value of the parameterfloatpositive floating point numbers80.7
StandardDeviationstandard deviation of the parameterfloatpositive floating point numbers1.54