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

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,

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.

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

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.

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.

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.