- Installation
Download or clone the repository source code to your workstation.
- Trough terminal:
git clone https://github.com/industrial-edge/archiving-and-visualization.git- Trough VSCode:
CTRL+↑ SHIFT+P or F1 to open VSCode's command pallette and typegit clone:
- Navigate into
src/influxdbandsrc/mqtt-serviceand find the file namedDockerfile.example. TheDockerfile.exampleis an example Dockerfile that can be used to build the docker image(s) of the service(s) that runs in this application example. If you choose to use these, rename them toDockerfilebefore proceeding - Open a console in the root folder (where the
docker-composefile is) - Use the
docker compose build(replaces the olderdocker-compose build) command to build the docker image of the service which is specified in the docker-compose.yml file. - These Docker images can now be used to build your app with the Industrial Edge App Publisher
docker imagescan be used to check for the images
Please find below a short description how to publish your application in your IEM.
For more detailed information please see the section for uploading apps to the IEM.
- Connect your Industrial Edge App Publisher to your docker engine
- Connect your Industrial Edge App Publisher to your Industrial Edge Management
- Create a new Project or select a existing one
- Create new Application (Remember that you have the Icon App on this repo here)
- Import the docker-compose file using the Import YAML button
Warnings
Build (Detail) (services >> mqtt-service >> build) is not supported
Build (Detail) (services >> influxdb >> build) is not supported.
are caused by the fact, that the docker-compose file defines build commands for local build of the application's docker image which are not supported by the Industrial Edge App Publisher and can safely be ignored
- Click on
ReviewandValidate & Create. When asked about the redirect URL, select the endpoint of the influxdb service:
- Start Upload to transfer the app to Industrial Edge Management
- Further information about using the Industrial Edge App Publisher can be found in the IE Hub
-
Configure a user with password in the Databus for the OPC UA Connector and the Archiving & Operation Application for publishing and subscribing to topics on the Databus.
User name: edge Password: edge Topic: ie/# Permission: Publish and Subscribe
- Open Common Configurator App, first of all you have to connect this app with the pre-configured Databus. To do this, go on the left menu to Settings>Databus Credentials. Click on Add on Data Publisher.
- There, fill these fields with the next screenshot data. Don't forget to activate the checkboxes to share the same information for the subscriber part. The User and Password that you have to use, are the same that you used when you configure the Databus on the previous point.
- If you are connected to the Databus, you will see something like this
- Next step will be configure the OPC UA Connector. Then, on Common Configurator App got to "get data" on the left menu. Here click on "OPC UA Connector" that you are going to see on this section. Add a Data Source and introduce the Required Information of your OPC UA Server.
Note: The name of the Data Source will be very important for the next steps
- Browse Tags and select the tags that you want to use, on this case, we are going to take the tags described on the pre-requisites section
The tags to add are:
- GDB.signals.tankSignals.actLevel - (Read/100ms)
- GDB.signals.tankSignals.actTemperature - (Read/100ms)
- GDB.process.numberProduced - (Read/100ms)
- GDB.process.numberFaulty - (Read/100ms)
- GDB.hmiSignals.HMI_Nextbottle - (Read&Write/100ms)
Note: Remember to save it adding correctly the acquisition cycle and Access mode specified.
- When you have added to your DataBase the tags clicking on top right "Save to Import", yo have to click on "Add to Data Source" on the bottom left to finally see the tags resume that you want to deploy it. Then, click on top right "deploy". Don't forget to fill the checkbox on the left of tags name.
In case of browse timeout you can also add the tags manually Click to show/collapse.
n=3;s="GDB"."signals"."tankSignals"."actLevel"n=3;s="GDB"."signals"."tankSignals"."actTemperature"n=3;s="GDB"."process"."numberProduced"n=3;s="GDB"."process"."numberFaulty"n=3;s="GDB"."hmiSignals"."HMI"."NextBottle"
The MQTT Service can be configured with a form. The form is based on JSONForms. If no configuration is provided during app installation, the application uses default values seen in the following json-file config-default.json:
{
"MQTT": {
"HOST": "ie-databus",
"PORT": "1883",
"USERNAME": "edge",
"PASSWORD": "edge",
"TOPIC_NAME": "ie/d/j/simatic/v1/opcuac1/dp",
"METADATA_TOPIC_NAME": "ie/m/j/simatic/v1/opcuac1/dp",
"DATA_SOURCE_NAME": "Tank"
},
"INFLUXDB": {
"HOST": "influxdb",
"PORT": "8086",
"ORG": "edge",
"BUCKET": "databus_values",
"TOKEN": "industrialedge"
}
}- HOST: This is the service name of the Databus
- PORT: This is the port of the Databus
- USER, PASSWORD: The user and password are configured in the Databus and used in the OPC UA Connector for accessing (publish, subscribe) to topics on the Databus
- TOPIC_NAME: This is the default topic root path for data of the OPC UA Connector
- METADATA_TOPIC_NAME: This is the default topic root path for metadata of the OPC UA Connector
- DATA_SOURCE_NAME The data source Name is configured in the OPC UA Connector. Insert here the data source Name for your OPCUA SOURCE. If you don't change it, it is not going to work anymore.
- HOST: Service name of InfluxDB which is specified in docker-compose. Do not change unless you are trying to connect to a different instance of influxdb.
- PORT: Port on which the InfluxDB service is running. Do not change unless you are trying to connect to a different instance of influxdb.
- ORG: Initial organization created in the Influxdb upon creation. This value needs to correspond to the value set in
docker-compose.ymlfile. - BUCKET: InfluxDB can have multiple database running in the same instance. Data which are collected from databus are written to that database. This value needs to correspond to the value set in
docker-compose.ymlfile. - TOKEN: Administrator token used for authorization of your app in order to bootstrap the app and read and write data to the database. This value needs to correspond to the value set in
docker-compose.ymlfile.
- Go to IE Publisher and select the newly created application. Then click the "+ Configurations" button.
-
Add new configuration and enter all required fields:
Display Name: Configuration Description: JSONForms Configuration Host Path: ./cfg-data/ Add Template - Name: JSONForms - Description: JSONForms Configuration - JSON Schema: set checkbox
In the final step, add the file /cfg-data/config.json as a template file. This template was created with JSON Schema. To find out how to create your own template check out the IEM Operations Documentation.
Fill out Input-Form and select checkbox (check box green)
- MQTT Broker IP: optional
- PORT: optional
- Username: required
- Password: required
- Data Source Name: required
- Connector Metadata Topic: optional
- InfluxDB IP: optional
- InfluxDB Port: optional
- Bucket Name: optional
- Organization: optional
- Token: optional
Install Edge Application to Industrial Edge Device and select app configuration

- Open Industrial Edge Device in Browser and open installed application
- Login to InfluxDB UI using the credentials set in docker-compose.yml, by default:
Username: root
Password: changeMe1! - InfluxDB Welcome Page: Open Dashboards from the left menu
- Click "+ Create Dashboards" button
- Select "Import Dashboard"
- Select the file located in /src/influxdb/Dashboards/NewBottleLineVisualization.json and click on "Import JSON as Dashboard"
- Open the newly imported Dashboard by clicking on "Bottle Line Visualization"
Note
Upon creation the Dashboard will show no data. It may take a moment before enough data coming from the Databus will be stored in the influxDB database and subsequently before it can be plotted in the provided dashboard.














