> For the complete documentation index, see [llms.txt](https://wiki.codeandcompile.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.codeandcompile.com/product-reviews/smart-platforms/hivemq/multi-site-plc-to-cloud-flow-using-hivemq-edge-+-cloud.md).

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

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**.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLd2M9UNfMTnw9DjDdZJz%2Fuploads%2F7sqPgX9ygJtGSuymuBBv%2FPost%202.mp4?alt=media&token=caa21492-c932-446a-9466-dfbcca7822c6>" %}

## System Overview

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

* **Site A**: Process running with Siemens S7-1500 PLC&#x20;
* **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

<div data-full-width="true"><figure><img src="/files/UA3OEWswq3fDitkBnxOi" alt=""><figcaption><p>LIVE data in the S7-1500 PLC</p></figcaption></figure></div>

<figure><img src="/files/suo8abhnWXNpETz4NHoo" alt=""><figcaption><p>LIVE data in the Micro850 PLC</p></figcaption></figure>

#### 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.

{% hint style="success" %}
To learn more about how to install HiveMQ Edge on the edge device, check out this [page](/product-reviews/smart-platforms/hivemq/plc-to-cloud-via-hivemq-edge-+-cloud-opc-ua-mqtt-confluent.md).
{% endhint %}

**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.

<figure><img src="/files/zdJiCHdmu6Wt2RWzOKZ9" alt=""><figcaption></figcaption></figure>

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

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

<figure><img src="/files/F9AhG4E1HlMMS9vBAy6I" alt=""><figcaption></figcaption></figure>

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.

{% hint style="success" %}
To learn more about how to install HiveMQ Edge on the edge device, check out this [page](/product-reviews/smart-platforms/hivemq/plc-to-cloud-via-hivemq-edge-+-cloud-opc-ua-mqtt-confluent.md).
{% endhint %}

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

<figure><img src="/files/6cCthMjBJIYXn9FWEUjD" alt=""><figcaption></figcaption></figure>

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

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

<figure><img src="/files/nMUNvI1olGXp17jQRCV8" alt=""><figcaption></figcaption></figure>

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.

<figure><img src="/files/ySLePWVEjr0nDBds7vTq" alt=""><figcaption><p>MQTT bridge in Revolution Pi</p></figcaption></figure>

<figure><img src="/files/Jy17hxOGY5DTWHUyGnL4" alt=""><figcaption><p>MQTT bridge in reComputer</p></figcaption></figure>

### 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:

<figure><img src="/files/1uLIQgqpL6fu45qvUyEH" alt=""><figcaption></figcaption></figure>

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> or drop me a message on [LinkedIn](https://www.linkedin.com/in/singhrajvir/)
