Pre-installed application - preparation for dispatching values via MQTT

The values obtained from the sensor and the count are regularly published to an MQTT broker. These values can then be subscribed from this MQTT broker by other applications and used accordingly. An MQTT broker and three messages for the dispatch of the temperature, humidity and counter values are configured for this. An event that is regularly triggered by an interval timer will dispatch the messages.

Configuration of the MQTT broker and the messages

Menu MessagesMQTT → edit mqttBrkr1 - HiveMQ_Broker ()

The MQTT broker HiveMQ is configured here. HiveMQ is a public MQTT broker (more information). The values can then be subscribed from this broker.

de app counter mqtt broker

Menu MessagesMQTT → edit mqttMsg1 - Push_Temperature ()

This message transmits the flag flag1, which contains the temperature value (refer to Converting the sensor values), under the topic iot_quickstart_kit/$(SERIALNUMBER)/temperature to an MQTT broker.

de app mqtt temp

Menu MessagesMQTT → edit mqttMsg2 - Push_Humidity ()

This message transmits the flag flag2, which contains the humidity value (refer to Converting the sensor values), under the topic iot_quickstart_kit/$(SERIALNUMBER)/humidity to an MQTT broker.

de app mqtt hum
flag1 and flag2 are unique internal designations for the flags here, which have been allocated with the respective temperature and humidity values. It is also possible to define JSON or CSV values as well as pairs of values as Message here.
$(SERIALNUMBER) is a fix variable for the serial number of the router here that will be inserted into the topic automatically. For further information to this, refer to the online help of the icom Data Suite under Inserting values in messages.

Configuration of the message dispatch

Menu Data pointsTimer → edit Send_Interval ()

A timer of the type Interval is added here, which expires (triggers) every five minutes.

de app mqtt timer

Menu Events → edit Push_Temperature_Event ()

An event is added here, which triggers an action with each expiry of the timer timer1 - Send_Interval, which sends the message mqttMsg1 - Push_Temperature.

de app mqtt event temp

Menu Events → edit Push_Humidity_Event ()

An event is added here, which triggers an action with each expiry of the timer timer1 - Send_Interval, which sends the message mqttMsg2 - Push_Humidity.

de app mqtt event hum

Menu Events → edit Push_Counter_Event ()

An event is added here, which triggers an action with each expiry of the timer timer1 - Send_Interval, which sends the message mqttMsg3 - Push_Counter.

de app mqtt event counter

Menu Events → edit Push_Temperature_Change_Event ()

An event is added here, which triggers an action with each change of the analogue data point flag1 - Temperature, which sends the message mqttMsg1 - Push_Temperature.

de app mqtt event change temp