> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.codeandcompile.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-Site PLC-to-Cloud Flow using HiveMQ Edge + Cloud

> Connecting industrial PLCs securely from multiple sites to the cloud has never been this simple.

In this guide, we’ll see how **HiveMQ Edge** and **HiveMQ Cloud** can be used together to bridge data from Siemens and Allen-Bradley PLCs — using **OPC UA**, **Modbus TCP**, and **MQTT**.

<video controls src="https://mintcdn.com/code-and-compile/oJD_SnxirnRME6Em/videos/Post-2.mp4?fit=max&auto=format&n=oJD_SnxirnRME6Em&q=85&s=05edf1db74ddc359e68efb15ac3669ba" />

## System Overview

This setup demonstrates a **multi-site architecture**:

* **Site A**: Process running with Siemens S7-1500 PLC
* **Site B**: Process running with Allen-Bradley Micro850 PLC
* Both sites send local PLC data to **HiveMQ Edge**
  * **Site A**: Siemens S7-1500 PLC via OPC UA
  * **Site B**: Allen-Bradley Micro850 PLC via Modbus TCP
* A secure **MQTT Bridge on HiveMQ Edge** transfers data from the Edge devices to the **HiveMQ Cloud**

### Step 1 – Connect PLCs to HiveMQ Edge and assign a local MQTT Topic

![LIVE data in the S7-1500 PLC](https://mintcdn.com/code-and-compile/vyZWkkrmhHGreXPC/images/image-53.png?fit=max\&auto=format\&n=vyZWkkrmhHGreXPC\&q=85\&s=b01644abfbc19b3a0871d3b18b32a53d)

LIVE data in the S7-1500 PLC

![LIVE data in the Micro850 PLC](https://mintcdn.com/code-and-compile/AVgt2ILUleJ-6Ioq/images/9.png?fit=max\&auto=format\&n=AVgt2ILUleJ-6Ioq\&q=85\&s=4d22825757757f5ffdc885b88cfb425a)

LIVE data in the Micro850 PLC

#### a) Siemens S7-1500 (OPC UA)

Install HiveMQ in the edge device. In this case, we are using Revolution Pi as an edge device where HiveMQ Edge has been installed.

> [!TIP]
>
> To learn more about how to install HiveMQ Edge on the edge device, check out this [page](https://wiki.codeandcompile.com/product-reviews/smart-platforms/hivemq/plc-to-cloud-via-hivemq-edge-+-cloud-opc-ua-mqtt-confluent.md).

**Navigate to the HiveMQ Edge → Protocol Adapters**, add a new **OPC UA Protocol Adapter**.\
Configure the connection details of your S7-1500 using the OPC UA endpoint, and select the OPC UA tag.

![Multi-Site PLC-to-Cloud Flow using HiveMQ Edge + Cloud](https://mintcdn.com/code-and-compile/AVgt2ILUleJ-6Ioq/images/2.png?fit=max\&auto=format\&n=AVgt2ILUleJ-6Ioq\&q=85\&s=fbcf5a0a120c5fc7861d073d94a69e71)

Then create a **northbound mapping** to publish it as:

```
Topic: machine/s71500/rTemp
```

![Multi-Site PLC-to-Cloud Flow using HiveMQ Edge + Cloud](https://mintcdn.com/code-and-compile/AVgt2ILUleJ-6Ioq/images/3.png?fit=max\&auto=format\&n=AVgt2ILUleJ-6Ioq\&q=85\&s=9ef0a73ab422b0d7e1ba46a642ab3f55)

This allows HiveMQ Edge to read OPC UA values and push them to the local MQTT broker.

#### b) Allen-Bradley Micro850 (Modbus TCP/IP)

Similarly, install HiveMQ in another edge device. In this case, we are using a reComputer from Seeed Studio as an edge device where HiveMQ Edge has been installed.

> [!TIP]
>
> To learn more about how to install HiveMQ Edge on the edge device, check out this [page](https://wiki.codeandcompile.com/product-reviews/smart-platforms/hivemq/plc-to-cloud-via-hivemq-edge-+-cloud-opc-ua-mqtt-confluent.md).

Add a **Modbus Protocol Adapter** and connect to the Micro850 PLC via MODBUS TCP/IP.

![Multi-Site PLC-to-Cloud Flow using HiveMQ Edge + Cloud](https://mintcdn.com/code-and-compile/AVgt2ILUleJ-6Ioq/images/6.png?fit=max\&auto=format\&n=AVgt2ILUleJ-6Ioq\&q=85\&s=7f2429c7696337707e8f0a645bbab96a)

Select the tag `Current_Temp` and map it to the following topic:

```
Topic: machine/micro850/rTemp
```

![Multi-Site PLC-to-Cloud Flow using HiveMQ Edge + Cloud](https://mintcdn.com/code-and-compile/AVgt2ILUleJ-6Ioq/images/7.png?fit=max\&auto=format\&n=AVgt2ILUleJ-6Ioq\&q=85\&s=b4b92f5d43de23ac025972637057c8a9)

Each tag update will now be converted to MQTT messages locally.

### Step 2 – Creating the MQTT Bridge

In both **HiveMQ Edge → MQTT Bridges**, create a bridge to your **HiveMQ Cloud Cluster**.\
Once connected, data from both sites is securely forwarded to the cloud broker.

![MQTT bridge in Revolution Pi](https://mintcdn.com/code-and-compile/AVgt2ILUleJ-6Ioq/images/4-1.png?fit=max\&auto=format\&n=AVgt2ILUleJ-6Ioq\&q=85\&s=d7ad2b49df575926a3b491e07850bda3)

MQTT bridge in Revolution Pi

![MQTT bridge in reComputer](https://mintcdn.com/code-and-compile/AVgt2ILUleJ-6Ioq/images/8.png?fit=max\&auto=format\&n=AVgt2ILUleJ-6Ioq\&q=85\&s=1d817f09395e65cb591e0d15250e3c31)

MQTT bridge in reComputer

### Step 4 – Visualizing Data on HiveMQ Cloud

Log in to your **HiveMQ Cloud Web Client**, subscribe to your topic (e.g., `#`), and you’ll start receiving live messages as shown below:

![Multi-Site PLC-to-Cloud Flow using HiveMQ Edge + Cloud](https://mintcdn.com/code-and-compile/AVgt2ILUleJ-6Ioq/images/10.png?fit=max\&auto=format\&n=AVgt2ILUleJ-6Ioq\&q=85\&s=3722b34c9f5097e6e7119e2ccc28673d)

You can now view, analyze, and integrate these values into dashboards or data platforms.

***

### Step 5 – Understanding the Data Flow

From each PLC:

* Data is read using **OPC UA** or **Modbus TCP**

* HiveMQ Edge maps the tags to MQTT topics

* The **MQTT Bridge** sends this data securely to **HiveMQ Cloud**

* Supports multiple sites

* Secure TLS connection

* Cloud-ready and scalable

### Why HiveMQ Cloud?

* Secure MQTT Bridge
* Multi-site scalability
* Cloud-ready architecture
* Perfect bridge between OT and IT

## Work With Me

I regularly test **industrial automation and IIoT devices**. If you’d like me to **review your product** or showcase it in my courses and YouTube channel:

Email: [rajvir@codeandcompile.com](mailto:rajvir@codeandcompile.com) or drop me a message on [LinkedIn](https://www.linkedin.com/in/singhrajvir/)


## Related topics

- [HiveMQ](https://wiki.codeandcompile.com/product-reviews/smart-platforms/hivemq/index.md)
- [PLC to Cloud via HiveMQ (Edge + Cloud) — OPC UA → MQTT → Confluent](https://wiki.codeandcompile.com/product-reviews/smart-platforms/hivemq/plc-to-cloud-via-hivemq-edge-+-cloud-opc-ua-mqtt-confluent.md)
- [HiveMQ Edge-to-Cloud AI Pipeline](https://wiki.codeandcompile.com/product-reviews/smart-platforms/thingsboard/hivemq-edge-to-cloud-ai-pipeline/index.md)
- [Secure OT/IT Data Integration Using HiveMQ Edge and Site DMZ](https://wiki.codeandcompile.com/product-reviews/smart-platforms/hivemq/secure-ot-it-data-integration-using-hivemq-edge-and-site-dmz.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.