# Connecting Mqttcloud with Node Red

**URL:** <https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461>\
**Category:** General\
**Created:** [16 January 2020 15:03 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461 "2020-01-16T15:03:41Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![duglas](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@duglas](https://discourse.nodered.org/u/duglas)\
**Post date:** [16 January 2020 15:03 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/1 "2020-01-16T15:03:41Z")

</div>

I have already created the MQTT nodes in NodeRed and configured them appropriately. Now there is a connection between the nodes and CloudMqtt. Even if I implement an mqtt output, I get the right output. However, no data is shown to me on MqttCloud and I cannot send any. Does anyone know what's wrong?

---

<div class="post-metadata">

**Author:** ![ncherry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ncherry/32/27_2.png) [@ncherry](https://discourse.nodered.org/u/ncherry)\
**Post date:** [16 January 2020 20:44 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/2 "2020-01-16T20:44:51Z")

</div>

I'm not familiar with MQTTCloud but I'm assuming that it's just an MQTT cloud service. I also don't know what level of knowledge you have with MQTT.

I'm afraid we'll need more information. When you publish, are you subscribe (in some way) to the topic to see if the data gets published. When you publish are you setting the retain bit? How are you viewing the topic and when?

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [16 January 2020 20:59 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/3 "2020-01-16T20:59:40Z")

</div>

Have you tried publishing a message to mqttcloud (mqtt out node) AND subscribing to mqttcloud (mqtt in node) using the same topic etc..

![mqq](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/a/aa821f8214c158445ded419fb0bec5d7b620f6cc.jpeg)

---

<div class="post-metadata">

**Author:** ![duglas](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@duglas](https://discourse.nodered.org/u/duglas)\
**Post date:** [16 January 2020 21:37 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/4 "2020-01-16T21:37:46Z")

</div>

Yes the connection worked but I don't receive any data in the cloud and the topic is the same.

---

<div class="post-metadata">

**Author:** ![markost](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@markost](https://discourse.nodered.org/u/markost)\
**Post date:** [16 January 2020 22:01 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/5 "2020-01-16T22:01:17Z")

</div>

> [@duglas](#):
>
> ny data in the cloud and the topic

Working OK for me... Set correct port?

 ![cloudmqtt](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/e/0e3d0d2edb7ca9c70344b7ae7a3d06246d19bda6.png)

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [16 January 2020 22:05 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/6 "2020-01-16T22:05:18Z")

</div>

> [@duglas](#):
>
> Yes the connection worked

What do you mean by 'the connection worked'?  
Do you mean that both the `mqtt out node` & the `mqtt in node` are showing a green 'status' indicator and 'connected' beneath each node.  
Yet the `mqtt in node` is not providing an output??

---

<div class="post-metadata">

**Author:** ![duglas](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@duglas](https://discourse.nodered.org/u/duglas)\
**Post date:** [16 January 2020 22:19 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/7 "2020-01-16T22:19:20Z")

</div>

Yes there is under each node a green 'status' indicator named "connected".

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [16 January 2020 22:22 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/8 "2020-01-16T22:22:36Z")

</div>

> [@Paul-Reed](#):
>
> Yet the `mqtt in node` is not providing an output??

...and does it provide an output??

---

<div class="post-metadata">

**Author:** ![duglas](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@duglas](https://discourse.nodered.org/u/duglas)\
**Post date:** [16 January 2020 22:37 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/9 "2020-01-16T22:37:48Z")

</div>

No there is no output at CloudMqtt and even if I send something from the cloud to the node out nothing arrives.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [16 January 2020 22:41 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/10 "2020-01-16T22:41:08Z")

</div>

> [@Paul-Reed](#):
>
> Have you tried publishing a message to mqttcloud (mqtt out node) AND subscribing to mqttcloud (mqtt in node) using the same topic etc..

Have you tried what I asked several posts earlier??

---

<div class="post-metadata">

**Author:** ![duglas](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@duglas](https://discourse.nodered.org/u/duglas)\
**Post date:** [16 January 2020 22:53 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/11 "2020-01-16T22:53:54Z")

</div>

Yes, there is no reaction.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [16 January 2020 22:58 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/12 "2020-01-16T22:58:44Z")

</div>

Then you need to recheck that the:

- Server name
- Username
- Password
- Port number

That are listed in your mqttcloud account, are the same as the settings that you added to your node-RED MQTT nodes?

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [17 January 2020 06:34 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/13 "2020-01-17T06:34:11Z")

</div>

I had similar issues getting CloudMQTT to 'talk' to Node-RED and a Wemos D1 Mini (ESP8266).  
I eventually gave up and found another provider... BeeBotte

[https://beebotte.com/](https://beebotte.com/)

They offer 'free pricing plans' (with usage restrictions) - which means you can experiment with it in your projects.

Really sorry if this suggestion drags you off in another direction - but I think you might have more success and I think quite a few people on this forum use it (including me) so could offer help.

PS:  
Here's a link to a tutorial, from one of my IoT students, showing how he used BeeBotte in his Weather Station project.

[http://resources-area.co.uk/bohunt-projects/weather-station/stage\_4.pdf](http://resources-area.co.uk/bohunt-projects/weather-station/stage_4.pdf)

---

<div class="post-metadata">

**Author:** ![duglas](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@duglas](https://discourse.nodered.org/u/duglas)\
**Post date:** [17 January 2020 08:50 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/14 "2020-01-17T08:50:46Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![hominidae](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hominidae/32/4174_2.png) [@hominidae](https://discourse.nodered.org/u/hominidae)\
**Post date:** [18 January 2020 13:00 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/15 "2020-01-18T13:00:00Z")

</div>

...my way of integrating with node-red and cloudmqtt-service is by way of my local mosquitto broker.  
I configured a bridge from my mosquitto to cloudmqtt....works like a charm.  
Just remember to use TLS connection to cloudmqtt and install official certs on your local mosquitto.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [18 January 2020 14:39 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/16 "2020-01-18T14:39:46Z")

</div>

> [@dynamicdave](#):
>
> Here's a link to a tutorial,

One thing I'd add to that tutorial is that you need to add in a channel token to the security setting of your MQTT config  
(Apologies if its in there and I didn't see it)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/6/b6d35d046cbf0e88c53e808085076e89c85456c4.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/d/adf8f5561bd089e8c302a18b0c32194d0333ff44.png)

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [18 January 2020 16:52 UTC](https://discourse.nodered.org/t/connecting-mqttcloud-with-node-red/20461/17 "2020-01-18T16:52:58Z")

</div>

Hi Simon,  
I forgot to mention inserting the channel token.  
Thanks for showing the screen-shot and completing the jigsaw puzzle.
