# Connect to 2 MQTT servers at the same time?

**URL:** <https://community.homey.app/t/connect-to-2-mqtt-servers-at-the-same-time/85563>\
**Category:** Questions & Help\
**Created:** [July 31, 2023, 4:12am UTC](https://community.homey.app/t/connect-to-2-mqtt-servers-at-the-same-time/85563 "2023-07-31T04:12:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Icepick](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/icepick/32/56463_2.png) [@Icepick](https://community.homey.app/u/Icepick)\
**Post date:** [July 31, 2023, 4:12am UTC](https://community.homey.app/t/connect-to-2-mqtt-servers-at-the-same-time/85563/1 "2023-07-31T04:12:19Z")

</div>

I am running the MQTT client on the HP23 and all is working well. Does anyone know if it’s possible to run multiple instances of the app so I can have my Homey connect to 2 different MQTT servers at the same time? This app only allows one configuration.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 31, 2023, 6:14am UTC](https://community.homey.app/t/connect-to-2-mqtt-servers-at-the-same-time/85563/2 "2023-07-31T06:14:47Z")

</div>

The only way to do that is to download the app source, change the app id in `app.json`, and basically run it as a new/different app. But this sounds like solving an XY problem.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 31, 2023, 3:25pm UTC](https://community.homey.app/t/connect-to-2-mqtt-servers-at-the-same-time/85563/3 "2023-07-31T15:25:36Z")

</div>

When your mqtt broker is reachable from all systems, Homey should have access to all mqtt topics?  
What do you like to achieve?

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [August 1, 2023, 12:33am UTC](https://community.homey.app/t/connect-to-2-mqtt-servers-at-the-same-time/85563/4 "2023-08-01T00:33:11Z")

</div>

You can bridge one MQTT broker to another such that they keep each other in synch for selected topics. I don’t know whether the Homey broker supports this though, certainly external brokers like mosquitto do and you only need to set this up on one of participating brokers.

If you must use the internal broker then an external broker should be able to be bridged to it or at least update topics there, or you could maybe just use one external broker?

---

<div class="post-metadata">

**Author:** ![Icepick](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/icepick/32/56463_2.png) [@Icepick](https://community.homey.app/u/Icepick)\
**Post date:** [August 1, 2023, 3:28am UTC](https://community.homey.app/t/connect-to-2-mqtt-servers-at-the-same-time/85563/5 "2023-08-01T03:28:44Z")

</div>

I am trying to extract data from several different MQTT servers. One of them is running locally (so this one I have full control). Others are not managed by me and running externally offering open data that I would like to integrate into my homey scripts.

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [August 1, 2023, 2:45pm UTC](https://community.homey.app/t/connect-to-2-mqtt-servers-at-the-same-time/85563/6 "2023-08-01T14:45:17Z")

</div>

Try configuring your external broker as the one Homey uses and then bridge your external brokers to it too. Basically it will automatically subscribe to the external topics. It uses a permanently connected client for this. Probably you can subscribe fully wildcarded as I’m guessing the external brokers restrict your access based on user access. This will give you one broker that has everything. Check there are no topic overlaps but you can remap topic names if so.

You may be able to treat the Homey MQTT broker in the same fashion as a bridged broker although this would need some trial validation.

I use four bridged brokers in my setup…. It was fiddly to setup but works well.

---

<div class="post-metadata">

**Author:** ![Morten\_Bech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/morten_bech/32/120753_2.png) [@Morten\_Bech](https://community.homey.app/u/Morten_Bech)\
**Post date:** [September 10, 2026, 7:46pm UTC](https://community.homey.app/t/connect-to-2-mqtt-servers-at-the-same-time/85563/7 "2026-09-10T19:46:06Z")

</div>

I made a mttq bridge test app for homey. Maybe it can solve your issue? [MQTT Bro | Homey](https://homey.app/da-dk/app/com.example.mqttbridge/MQTT-Bro/test/)
