CMTK external InfluxDB access
1. Explanation of terms
CMTK sensor side: This CMTK enables access to the database. This means that a sensor is connected to this CMTK and its process data is stored in the internal database.
CMTK receiving side: This CMTK accesses the database of the CMTK sensor side and creates a dashboard for this process data. The whole process takes place without a connected sensor.
2. CMTK settings
The prerequisite for this example and similar applications to run reliably is a network connection (accessibility) in the same network between the participants.
2.1. CMTK sensor page
In this example, a BCM sensor is connected to the CMTK. The process data from this sensor is saved in the database of this CMTK.

The database settings are made as shown in the screenshot. External access is activated for the sensor CMTK and a password is assigned. This means that the database of this CMTK can be accessed.

2.2. CMTK reception page
The CMTK receiver side does not require external access, as no values are taken from the database for this CMTK. This CMTK should display the values from the CMTK sensor side.
No process data is saved in the database either, so this database can be deactivated.
3.1. Add database
To be able to display the dashboard of the process data from the CMTK sensor page in the CMTK receiver page, the database of the CMTK sensor page must be added in Grafana of the CMTKS receiver page.
Under "Settings" -> "Data Sources" -> "Add data source", the database from the CMTK sensor page can now be integrated.


The correct database must now be selected. An InfluxDB database is used in CMTk, which is why we add the "InfluxDB database".

Now the name, the URL, the database, the user and the password must be entered in the correct places.
The user and password have already been set in the settings of the CMTK sensor page for external access (chapter 2.1)
Port 80 must be used for the URL in this case. The path is "/influxdb" as described in the CMTK settings.


After "Save & Test" is pressed, feedback is immediately given as to whether the access is successful.
3.2. Create dashboard
The diagram of the process data is made in the Grafana of the CMTK reception page.
A new diagram is added under "Add panel".

A name is assigned above the diagram so that it can be assigned to several diagrams. To obtain the display as shown in the screenshot, the database that we created in section 2.1 must be selected. The port must then be selected under FROM (in our example it is port 1). Finally, the process data to be displayed is selected under SELECT. A diagram then appears showing the desired process data from the CMTK sensor side.
