# MQTT - distance is no object

**URL:** <https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577>\
**Category:** Share Your Projects\
**Created:** [15 July 2018 08:04 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577 "2018-07-15T08:04:41Z")\
**Posts on this page:** 13\
**Page:** 1

<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:** [15 July 2018 08:04 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/1 "2018-07-15T08:04:41Z")

</div>

[MQTT - distance is no object](http://resources-area.co.uk/node-red-flows/mqtt_distance_no_object.pdf)

The above link will take you to the tutorial for this week's session with my IoT students.

No real practical use, except to demonstrate to the students that you can use a remote MQTT broker just as easily as a local one.

Hope you enjoy reading this tutorial.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 July 2018 08:41 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/2 "2018-07-15T08:41:41Z")

</div>

nice! as an advanced item, you could have the second wemos subscribe to the topic instead of using the pi, but that would take NR out of the picture, but it might be something to mention to the kids.

---

<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:** [15 July 2018 10:49 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/3 "2018-07-15T10:49:01Z")

</div>

Thanks for your input.

Yes I did consider that idea, but thought "let's not change too many things at the same time".  
Maybe do this in a future session.  
It opens up all sorts of discussions like... the concept of having Wemos units at different places around the world all subscribing to the same topic and being updated simultaneously.

Thanks again for your interest.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [15 July 2018 11:37 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/4 "2018-07-15T11:37:08Z")

</div>

actually you gave me the idea for a project. A wemos with a button installed at my grandkids house that will send a cloud signal to a pi to send me a text message to my phone in case they need to get hold of me.

---

<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:** [15 July 2018 11:39 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/5 "2018-07-15T11:39:14Z")

</div>

Sounds good idea.  
You could also use "Telegram".

---

<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:** [15 July 2018 12:18 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/6 "2018-07-15T12:18:00Z")

</div>

Nice introduction. Future topics: device -\> local MQTT -\> via SSL/TLS/SSH -\> Remote MQTT (when using an insecure device, the MQTT -\> Remote MQTT is secure when it leaves the local LAN). I have such a setup with my Adafruit account for no other reason than to figure out how to do it.

---

<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:** [15 July 2018 12:20 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/7 "2018-07-15T12:20:26Z")

</div>

Thanks for your input.  
Probably useful for a session with my students next year (i.e. September onwards).

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 July 2018 15:31 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/8 "2018-07-15T15:31:06Z")

</div>

An interesting extension would be to link up 2 or more MQTT brokers. Getting them to sync subsets and linking that to security. Not only would you be teaching about multiple MQTT servers syncing with each other but would also show how you can link a less trusted server on the Internet to a more trusted server in a more secure network.

---

<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:** [15 July 2018 15:34 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/9 "2018-07-15T15:34:32Z")

</div>

Hi Julian,  
That sounds like fun, but probably not that visual for the students - unless they develop a dashboard to show what is going on.

Thanks for your input.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 July 2018 15:43 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/10 "2018-07-15T15:43:55Z")

</div>

Easy enough to make this more visual, perhaps using something like MQTTspy which, in itself, is a really useful tool to introduce students to.

I would think that you would want to create a dashboard in advance and give them the code since the idea would be to teach about how the messages flow between the queues, I've no doubt you will already have taught them how to create a dashboard.

This is certainly an advanced topic however, you might reserve it as a stretch topic for more advanced students. It has some really important topics for IoT including an introduction to message sync, partial topic tree sync and, most importantly, IoT message security.

---

<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 July 2018 14:38 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/11 "2018-07-16T14:38:28Z")

</div>

Dave, what is the esp interface that you are using - esp easy mega?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [16 July 2018 16:17 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/12 "2018-07-16T16:17:39Z")

</div>

If you look at the slides you will see it is esp easy mega. I just installed it and have started playing. I have one Wemos loaded via a Mac (a challenge) reading a dht22 and sending the data via mqtt. Next I want to add a switch.

---

<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:** [16 July 2018 16:54 UTC](https://discourse.nodered.org/t/mqtt-distance-is-no-object/1577/13 "2018-07-16T16:54:16Z")

</div>

Hi Paul  
Yes it is ESP Easy Mega

> **[letscontrolit/ESPEasy](https://github.com/letscontrolit/ESPEasy/releases)**
>
> Easy MultiSensor device based on ESP8266. Contribute to letscontrolit/ESPEasy development by creating an account on GitHub.

I normally check the releases each day and then update ONE of my Wemos D1 Minis (just to make sure the firmware is OK) and then upgrade the other units.

Cheers from Dave
