MQTT - distance is no object

MQTT - distance is no object

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.

2 Likes

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.

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.

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.

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

1 Like

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.

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

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.

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.

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.

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

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.

Hi Paul
Yes it is ESP Easy Mega

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

1 Like