« All blog posts

OPC UA PubSub to Cloud via MQTT at SPS 2022

02.11.2022


In this Demo for SPS 2022, we at Prosys OPC decided to repurpose our demo from Hannover Messe. In the demo, we use the Raspberry Pi 4 platform, where we have created an OPC UA PubSub solution that publishes JSON packaged data over MQTT protocol.

As hardware we chose the base Raspberry Pi 4 with the touchscreen addon. Using Prosys OPC UA SDK for Java, our team created a lightweight sample publisher that would serve as the basis for our demo. The demo is divided into two parts: a built-in event visualiser and the actual MQTT PubSub cloud connection.

Cloud Wall Demo

Figure 1. The basic structure of the demo.

The event visualiser was configured into the demo to mimic a subscriber and show the JSON formatted data. Data contains sample values and simulated alarms and events generated by the publisher. This visualiser is additionally connected to a custom Web application that displays the sample data using MQTT-compatible JSON package form.

Pubslisher Screen

Figure 2. Screenshot of the Web APP showing sample data.

With the visualised PubSub connection ready, we configured an MQTT forwarder to publish the JSON sample data into the cloud. Using the MQTT protocol, we connect the PubSub demo to SPS 2022 Marketing Broker. We also have a sample publisher running on a separate machine that sends data to the cloud connectivity wall of the OPC Foundation.

For the final version of the demo, everything is configured to run automatically on the Raspberry Pi 4 upon startup. The process begins by starting the sample publisher and opening the chromium-browser in the kiosk to autorun the visualiser application. Lastly, we connect the Mosquitto MQTT broker to the publisher and start sending the data to the cloud.

In addition to the PubSub MQTT cloud connection created with Prosys OPC UA SDK for Java, our free software Prosys OPC UA Simulation Server and Prosys OPC UA Browser are compatible with the 64-bit Raspberry Pi OS for future solutions. Both applications have built-in PubSub capabilities. You can read about them on our blog.

At SPS 2022, you can find us with the OPC Foundation in Hall 5, Booth 140. If you’re interested in the demo, our PubSub capabilities or would like to ask any other questions, come meet us there or send an email to sales@prosysopc.com.

Abbreviations

  • JSON = Java Script Object Notation
  • MQTT = Message Queuing Telemetry Transport
  • OPC UA = OPC Unified Architecture
  • PubSub = Publisher/Subscriber model
  • SDK = Software Development Kit

Tools used

  • Prosys OPC UA SDK for Java: Development kit for OPC UA
  • Mosquitto: Open-source MQTT broker
  • Spring: Open-source backend for the Web Application
  • Vaadin: Open-source frontend for the Web Application

Henri Toivola

Henri Toivola

Sales Engineer

Email: henri.toivola@prosysopc.com

Tags: OPC UA, PubSub, MQTT, Cloud, Demo

comments powered by Disqus

About Prosys OPC Ltd

Prosys OPC is a leading provider of professional OPC software and services with over 20 years of experience in the field. OPC and OPC UA (Unified Architecture) are communications standards used especially by industrial and high-tech companies.

Read more about us »

Newest blog posts

Introducing Prosys OPC UA Edge

The very first blog post about Prosys OPC UA Edge. The article introduces the main features and functionalities of the EDGE software.

Windows DCOM Hardening And OPC Classic Applications

How do the Windows DCOM hardening changes affect your OPC Classic applications.

OPC UA vs MQTT (or OPC UA over MQTT)

Our input on the debate of the differences between OPC UA and MQTT and how actually there is competition.

View all blog posts »

-->