# MQTT Aedes Problem Connecting Multiple Arduino Controllers

**URL:** <https://discourse.nodered.org/t/mqtt-aedes-problem-connecting-multiple-arduino-controllers/50364>\
**Category:** General\
**Created:** [29 August 2021 22:17 UTC](https://discourse.nodered.org/t/mqtt-aedes-problem-connecting-multiple-arduino-controllers/50364 "2021-08-29T22:17:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alpal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alpal/32/60536_2.png) [@Alpal](https://discourse.nodered.org/u/Alpal)\
**Post date:** [29 August 2021 22:17 UTC](https://discourse.nodered.org/t/mqtt-aedes-problem-connecting-multiple-arduino-controllers/50364/1 "2021-08-29T22:17:35Z")

</div>

Newbie here - hi. And I mean new I. New to Arduino/MQTT/Node-Red etc.

I’m running Arduino Mkr1010 controllers communicating via WiFi, MQTT to Node-Red on a laptop. All goes well running a single arduino. Can subscribe, publish etc. My problem occurs when I try with two arduinos. The second keeps disconnecting from MQTT.

Is there anything obvious I should try? Or would you prefer to see code etc?

Cheers Alpal

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [29 August 2021 22:34 UTC](https://discourse.nodered.org/t/mqtt-aedes-problem-connecting-multiple-arduino-controllers/50364/2 "2021-08-29T22:34:25Z")

</div>

Hello and welcome to the forum.

This really isn't a Node-Red issue... but...

> [@Alpal](#):
>
> My problem occurs when I try with two arduinos. The second keeps disconnecting from MQTT.
> 
> Is there anything obvious I should try?

I would suggest to make sure each Arduino has a distinct client name

---

<div class="post-metadata">

**Author:** ![Alpal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alpal/32/60536_2.png) [@Alpal](https://discourse.nodered.org/u/Alpal)\
**Post date:** [29 August 2021 22:59 UTC](https://discourse.nodered.org/t/mqtt-aedes-problem-connecting-multiple-arduino-controllers/50364/3 "2021-08-29T22:59:16Z")

</div>

Sorry if placed on wrong forum - thought it might relate to the MQTT Aedes node I was using. Have tried your suggestion- didn’t work.

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [30 August 2021 00:38 UTC](https://discourse.nodered.org/t/mqtt-aedes-problem-connecting-multiple-arduino-controllers/50364/4 "2021-08-30T00:38:57Z")

</div>

> [@Alpal](#):
>
> thought it might relate to the MQTT Aedes node I was using

Well, if it does, you might ask on it's git-hub page.

I use the Mosquitto Broker, the core MQTT nodes and pubsubclient... and it just works.

> [@Alpal](#):
>
> Have tried your suggestion- didn’t work.

That mean you had the same client ID on both before??

Are you using any Serial monitor diagnostics on the Arduinos?

How about checking the MQTT flow with something like [MQTT Explorer](http://mqtt-explorer.com/)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 August 2021 10:01 UTC](https://discourse.nodered.org/t/mqtt-aedes-problem-connecting-multiple-arduino-controllers/50364/5 "2021-08-30T10:01:55Z")

</div>

If you don't have a good reason to use aedes I suggest using Mosquito. It is more efficient ready to install and solid as a rock.

---

<div class="post-metadata">

**Author:** ![Alpal](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alpal/32/60536_2.png) [@Alpal](https://discourse.nodered.org/u/Alpal)\
**Post date:** [30 August 2021 12:25 UTC](https://discourse.nodered.org/t/mqtt-aedes-problem-connecting-multiple-arduino-controllers/50364/6 "2021-08-30T12:25:12Z")

</div>

Thanks Gunner - as it turns out you were correct. The code I had copied called the field Dev\_Name and I presumed that referred to the device name of the MQTT broker. Wrong. Back on track now. Two working side by side. You bewdy!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 October 2021 12:25 UTC](https://discourse.nodered.org/t/mqtt-aedes-problem-connecting-multiple-arduino-controllers/50364/7 "2021-10-29T12:25:34Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
