What is the purpose of this article?
This guide explains how to set up a HiveMQ Cloud-based MQTT Broker with the goal of enabling remote monitoring of Rheonics sensor data via MQTT. The account setup and broker configuration to use it on Node-RED are explained.


TABLE OF CONTENTS


1. What is HiveMQ?

HiveMQ is a data streaming platform based on the MQTT publish-subscribe architecture. The product used from HiveMQ in this article is the HiveMQ Cloud, which offers different payment plans depending on the application. However, the version used in this article is HiveMQ Cloud – Serverless, which provides a free, cloud-hosted MQTT broker with the following features:


Plan
Serverless
Type
Shared Broker
Pricing
Free
Connections
100 max
Traffic Limit
10 GB data traffic per month



With this broker, users can publish and subscribe to topics over the internet, making it ideal for testing and remote monitoring of Rheonics SME with Node-RED.


Figure 1: Diagram of HiveMQ Broker implementation for remote monitoring

Figure 1: Diagram of HiveMQ Broker implementation for remote monitoring


2. Setting up a HiveMQ MQTT Broker

2.1. Creating a HiveMQ Cloud Account

1. Go to Get Started with HiveMQ

2. Choose the HiveMQ Cloud option


Figure 2: HiveMQ product selection

Figure 2: HiveMQ product selection


3. Create an account and log in.


Figure 3: HiveMQ Cloud Sign-up Page

Figure 3: HiveMQ Cloud Sign-up Page

2.2. Cluster management

An MQTT broker cluster in HiveMQ acts as a single broker and is based on multiple nodes that makes the system reliable and available.


1. After logging into the HiveMQ account, click on Manage Cluster.


Figure 4: Clusters view

Figure 4: Clusters view


2. The information of the cluster is gonna be displayed.


Figure 5: Clusters information

Figure 5: Clusters information


2.3. Setting User Credentials

1. Press on Access Management in the menu at the top inside your cluster.


Figure 6: Access Management

Figure 6: Access Management


2. Create credentials to access the broker

  • Username
  • Password
  • Permission: Publish and Subscribe


Figure 7: Creating Credentials in HiveMQ Access ManagementFigure 7: Creating Credentials in HiveMQ Access Management


3. After creating a credential, the username and the permission are shown.


Figure 8: Created Credentials in HiveMQ successfully

Figure 8: Created Credentials in HiveMQ successfully


3. HiveMQ MQTT Broker information for Node-RED

To add a new MQTT broker in Node-RED, you need the broker’s connection details. In the case of the HiveMQ broker, this information can be easily found in the Cluster Management section on the HiveMQ Cloud website, as shown earlier.


1. On the MQTT broker configuration in Node-RED, fill the spaces with the broker information.

  • Server: URL of the broker
  • Port: Port used by the broker
  • Use TLS: Enable this option because HiveMQ uses encrypted communication


Figure 9: MQTT broker configuration

Figure 9: MQTT broker configuration


2. On the Security Tab, in the same MQTT broker configuration in Node-RED, add the same credentials of the broker created on HiveMQ.


Figure 10: Configuring broker credentials

Figure 10: Configuring broker credentials


3. Press the Add button to correctly add the broker.


To learn how to use this broker to send Rheonics sensor data to an MQTT broker using Node-RED refer to Integrating Rheonics SME with Node-RED and MQTT for Remote Data Access


To learn how to connect Ignition SCADA to HiveMQ broker to visualize Rheonics sensor data refer to Using Ignition SCADA to Visualize Rheonics SME Data via MQTT


4. Resources