Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "BaSyx / Documentation / Monitoring Scenarios"

(Node Red)
(Node Red)
Line 52: Line 52:
 
* a node <b>"Calculate Average"</b> computes the temperature average for all read values, and node <b>"MQTT Avg Temp Publisher"</b> sends it to a server via MQTT Publisher protocol.
 
* a node <b>"Calculate Average"</b> computes the temperature average for all read values, and node <b>"MQTT Avg Temp Publisher"</b> sends it to a server via MQTT Publisher protocol.
 
* a node <b>"Calculate Fahrenheit"</b> transforms the values from Celsius to Fahrenheit, and node <b>"MQTT Fahrenheit Temp Publisher"</b> sends it to a server via MQTT Publisher protocol.
 
* a node <b>"Calculate Fahrenheit"</b> transforms the values from Celsius to Fahrenheit, and node <b>"MQTT Fahrenheit Temp Publisher"</b> sends it to a server via MQTT Publisher protocol.
 +
  
 
[[file:NodeRedDashboard.png|thumb|center]]
 
[[file:NodeRedDashboard.png|thumb|center]]

Revision as of 07:34, 17 November 2020

Overview

Basyx enables integration with third-party tools to support real-time data visualization, real-time data monitoring, and data processing. The following examples provide different use cases according each application.

Applications & Benefits

Streamsheets

Streamsheets is an Eclipse project providing an application for monitoring and visualizing streams of data from various sources.

  • Data streams may be processed, aggregated, visualized and transformed in real-time as a server application.
  • Data streams may be exchanged over REST-based protocols (request/response)
  • Data streams may be published/subscribed via protocols like MQTT, Apache Kafka or AMQP.


In the following example, a parameter called temperature is collected via a proxy each 1 second. The accumulated results can be see as bar chart. It is also possible to customize some alert messages, for example when the temperature reaches a certain value. It is possible to send such critical values as a message to an e-mail address.

Basyx.monitoring-streamsheets-thumb.png

Grafana

Grafana is an open-source browser-based tool for creating dashboards of different types of data sources.

  • It is possible to query and visualize data independent of where data is stored.
  • Data may be read from multiple sources.
  • Different metrics and parameters can be visualized in a single dashboard.


In the following example, a parameter called temperature is collected via a proxy each 1 second. This interval can also be customized according the need, e.g. 5 sec, 1 min, 10 min, 1 hour, and so on. The accumulated results can be see using different types of charts. It is also possible to configure alert messages based on customized rules. Messages can be sent to an e-mail (single or multiple addresses); Telegram; Microsoft Teams; Slack; webhooks; and many more.

GrafanaDashboard.png

Node Red

Node-RED is a browser-based tool for data-flow editing.

  • Flows shall be composed by nodes and links. These flows can be wired, and then deployed in runtime.
  • Flows can be deployed to run locally; in a device (e.g. a Raspberry Pi); or in the cloud.
  • Nodes may send and receive messages whilst the flow is running.


Node-RED shall be used for use cases such as:

  • Data processing and transformation - e.g. a temperature is collected in Celsius and need to be consumed in Fahrenheit;
  • Data propagation - e.g. temperature collected from an oven A shall be sent to a cloud server X, and temperature collected from an oven B shall be sent to a cloud server Y;

and many more.


In the following example:

  • a node "Get Temperature" reads temperature via http request each 1 second. This interval can also be customized according the need, e.g. 5 sec, 1 min, 10 min, 1 hour, and so on.
  • a node "Calculate Average" computes the temperature average for all read values, and node "MQTT Avg Temp Publisher" sends it to a server via MQTT Publisher protocol.
  • a node "Calculate Fahrenheit" transforms the values from Celsius to Fahrenheit, and node "MQTT Fahrenheit Temp Publisher" sends it to a server via MQTT Publisher protocol.


NodeRedDashboard.png

How to Use

TODO: deploy the built docker images to DockerHub TODO: Push the files to BaSyx SDK

A full example for monitoring properties in Asset Administration Shells is given in the Git repository. To run this example, there exist following minimum requirements:

  • Git
  • A running Docker environment


To download the necessary files, you can check out the BaSyx repository from the command line with:

git clone https://git.eclipse.org/r/basyx/basyx

After checking out the repository, you can easily run the example:

1. Browse to /examples/monitoring
2. Run the "start.bat"-file or alternatively run "docker-compose up" in the /docker folder

If there are issues with the docker environment, make sure that the files inside of the git repository are shared with the docker containers by configuring the file sharing mechanism in the docker daemon settings.

Back to the top