SIEMENS PLC data in CMTK's Grafana - via MQTT data source
1. Introduction
In this application, we will display the data of the PLC SIEMENS in CMTK's Grafana via an MQTT database available with a new firmware version of CMTK, with a NodeRED container installed in CMTK.
2. Pre-Setup
- Install Docker on the SD Cart
- Install NodeRed Container on the Docker.
- Install a palette S7-Contrib on NodeRED -> See the NodeRed S7 Interface
- Install the Mosquitto container (Additional Broker) on the Docker -> See the CMTK Additional MQTT broker for BNI connection
3. NodeRED settings
In NodeRED, configure all input nodes for reading and add an MQTT Out node to enter the values in a Grafana MQTT database

Configure the broker (Mosquitto) in MQTT Out:

Create a topic according to your needs:

Set up this flow.
4. Grafana settings
Open a data source configuration in Grafana.

Open a Grafana mqtt-datasource.

Configure the URI connection according to your broker.

Click on Save and test.

Click on "Create a dashboard".
Select a grafana-mqtt data source.

Under "Topic", enter the topic that you have created in the MQTT Out node of NodeRED.

Save and apply.
The data is displayed on the dashboard
