Receiving MQTT Messages in Node-RED

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome back in this lesson we're going to utilize the mqtt in node within node-red to receive messages from iot core this will allow us to perform actions to our flow based on messages received from aws such as potentially stopping a device when it gets too hot for instance so let's go ahead and get started first up if you click on publish to a topic here within the aws iot console we'll see right here you can see a topic name and let's just go ahead and set this topic name to cloud and messages we'll just call it cloud slash messages just like so and we'll just keep message hello from aws iot console just like that which is perfectly fine and of course right now it's not going anywhere publishing does not have anywhere to go it just sends it nowhere so let's go ahead and give it somewhere to send this message so click back on node red and as you can see if we type mqtt up here in the filter you'll get mqtt in so go ahead and drag that in and what we're going to do is we're going to pipe this to another debug mode so we don't get them confused just like so connect those two going to clear the debug that's up here so far and in our debug node i'm going to name it from aws just like so and then i'm going to double click on my mqtt node we need to set this one up as you can see our server since we only had one is already chosen for us aws iot and that carries the tls configuration and everything so we don't have to do that again so what i need to do next if you take a look in the console here and click on additional configuration you'll see we have a choice for quality of service now for the most part aws is incredibly reliable so zero is usually okay but you can change it to one if you'd like and then back in node red for the topic we're going to choose cloud messages since that's the topic we chose and qos of one just like so let's go ahead and click on done and deploy as you can see we are connected so now is the moment of truth let's head back over and click on publish just like so head back to node red and look at that we now have a hello from aws iot console just like we sent right here so that's perfect that's exactly what we need everything is working so that's it for this very quick lesson go ahead and mark this lesson complete come on back to the next one and let's continue building out our deployment
Info
Channel: More than Certified
Views: 2,382
Rating: undefined out of 5
Keywords:
Id: olCnnMAVECE
Channel Id: undefined
Length: 3min 4sec (184 seconds)
Published: Tue Feb 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.