# Confused about using MQTT to manage flows among 2 separate hubs in two different locations

**URL:** <https://community.homey.app/t/confused-about-using-mqtt-to-manage-flows-among-2-separate-hubs-in-two-different-locations/111957>\
**Category:** Questions & Help\
**Created:** [June 24, 2024, 9:28pm UTC](https://community.homey.app/t/confused-about-using-mqtt-to-manage-flows-among-2-separate-hubs-in-two-different-locations/111957 "2024-06-24T21:28:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bobby\_Vaughn](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bobby_vaughn/32/79462_2.png) [@Bobby\_Vaughn](https://community.homey.app/u/Bobby_Vaughn)\
**Post date:** [June 24, 2024, 9:28pm UTC](https://community.homey.app/t/confused-about-using-mqtt-to-manage-flows-among-2-separate-hubs-in-two-different-locations/111957/1 "2024-06-24T21:28:17Z")

</div>

Hi All,

I am very new to all of this and am not a developer. I have two properties and two hubs under the same account. The hubs are Homey1 and Homey2. I want to create flows on Homey1 that include devices on Homey2. For example, at a certain time, turn on the lights at both properties (to use a simple example).

From what I have read on the forums here, MQTT would be a way for me to accomplish this.  
On Homey1 I have installed MQTT Broker, MQTT Hub, and MQTT Client. On Homey2 I have installed MQTT Hub and MQTT Client.

I believe they are all installed properly.

Should I automatically see the Homey2 devices on Homey1 when I try to add a flow or device? I certainly don’t see them.

Do I need to port forward my router or something??

I am at a loss and the documentation doesn’t seem to answer my questions. Please let me know what I might be doing wrong, or let me know if this MQTT approach isn’t what I need to accomplish what I’m trying to do.

Thanks so much,  
Bobby

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [June 24, 2024, 9:50pm UTC](https://community.homey.app/t/confused-about-using-mqtt-to-manage-flows-among-2-separate-hubs-in-two-different-locations/111957/2 "2024-06-24T21:50:26Z")

</div>

The client on Homey 2 needs to reach the Broker on Homey 1, so you will need to setup a port forward on the router that Homey 1 is connected to. Homey 2 will then need to use the public IP or url of your Homey 1 router.  
Make sure you setup a secure password on the Broker as anyone will be able to access it.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [June 24, 2024, 9:52pm UTC](https://community.homey.app/t/confused-about-using-mqtt-to-manage-flows-among-2-separate-hubs-in-two-different-locations/111957/3 "2024-06-24T21:52:35Z")

</div>

Alternatively, use a public MQTT broker service, then you won’t need the port forward.

---

<div class="post-metadata">

**Author:** ![Bobby\_Vaughn](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bobby_vaughn/32/79462_2.png) [@Bobby\_Vaughn](https://community.homey.app/u/Bobby_Vaughn)\
**Post date:** [June 25, 2024, 12:55am UTC](https://community.homey.app/t/confused-about-using-mqtt-to-manage-flows-among-2-separate-hubs-in-two-different-locations/111957/4 "2024-06-25T00:55:09Z")

</div>

Thank you so much. So, I will try the port forwarding method first. If I have that set up correctly, should the devices on Homey2 automatically show up when I attempt to add them to a Homey1 flow, or will I need to add them in some special way? I’m sorry, but none of this is terribly intuitive to me, so I appreciate the help.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [June 25, 2024, 7:42pm UTC](https://community.homey.app/t/confused-about-using-mqtt-to-manage-flows-among-2-separate-hubs-in-two-different-locations/111957/5 "2024-06-25T19:42:29Z")

</div>

I don’t think they will as i believe the MQTT hub is one way and only publishes the devices. However, I haven’t used it myself so I could be wrong.

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [June 25, 2024, 8:47pm UTC](https://community.homey.app/t/confused-about-using-mqtt-to-manage-flows-among-2-separate-hubs-in-two-different-locations/111957/6 "2024-06-25T20:47:51Z")

</div>

For MqttClient you can ist flow triggers where you insert the Mqtt topic. Then put the value into virtual device.  
For MqttHub, you can add a device and define the Mqtt topic the device should listen.
