6 years later and as interesting as it can get Your "one handed typing" is humbling. Nice on-screen graphics! Cheers from So.Ca.USA 3rd house on the left
Well done! Clear and concise tuition. I’m moving away from Blynk into MQTT and this was probably the best 'first step’ that I’ve come across. That 'front end' that you spoke of at the end of your talk, I hope that it’s still a likely project. I eagerly await your updates.
Firstly, thanks for the video. It is helpful and you obviously put lots of effort into it. Just wanted to propose a suggestion. At around 29 minutes or so, you talk about using strings instead of integers for command indices for readability reasons. I would suggest having the best of both worlds: keep an enum with a list of names that correspond to integers. This makes your code safer because when you compile you are not allowed to have typos, and it is just as readable because the enum names, rather than the integer value of each enum, are what is in the code. The only downside is that the same enum must be defined on all platforms involved in the network, but in my opinion it's worth it.
This video caught my eye --- long time MC programmer here for industrial controls. I wonder if you've considered the implications at putting something like a Beaglebone Black or another board with PRUs in the mix to control extremely time-sensitive devices/triggers? Great stuff, thanks. I like the way you've presented MQTT here.
Yes, as a first time viewer I was also puzzled! It sounds like he's calling an Arduino Sketch a Puzzle? ("it's running a puzzle"). I guess I'll need to look back at some older video's, to understand what he's on about with all the Puzzle references. :-)
Ah yes, sorry - the majority of my Raspberry Pi/Arduino projects are used for escape room games, so the "program" they run is the controller for a puzzle. I probably say "puzzle" without thinking about it!
Hi Alastair, thanks for taking the time to explain mqtt in detail. I feel you've done a great job explaining it. In your code you reference a pulseCount var, but it's not used elsewhere. Can you explain how you would go about monitoring the heartbeat? I get the frequent publishing of the count and subscribing to it, just unclear as to how you would action an mqtt or WiFi failure. Also, have you had chance to play with micropython on the esp32 and mqtt? Cheers!
Hi, I just found out about your channel. Thanks for all the helpful tips I've already gotten from your videos. I am currently working on a project where I want to implement a MQTT-server. However, since MQTT works with a publish-subscribe principle, there is no real check if the message was received by a subscribed client. In escape rooms I believe this is a crucial part, since you want to make sure that a message has been received. How would you account for this?
Great video, I have not got a chance to watch all of it but it`s a really rare video to see. I was wondering if you could attach a VR shield in order to control the separate relays on the different machines by voice. Also a verification message from each machine back to your pc would be awesome to add, could that be done ?
If you like the WeMos D1 mini or any esp8266 board for that matter you will LOVE, love, love the esp32! It runs much faster than any Arduino or Raspberry Pi. It has plenty of analog to digital pins as well as a single digital to analog pin. Three processors, security, deep sleep mode (to conserve battery life), Bluetooth, PWM, Mesh and much more. If you get one then you can replace the Raspberry Pi and then turn the Pi into your MQTT Broker (even a Raspberry Pi zero W will work). One final question that I may have missed. Did you send the message (i.e. payload) back to the MQTT Broker, so if it did not receive the message correctly or if it did not see the message at all the Broker could resend the message?
I've literally got some ESP32s on order as we speak! Re: sending a message receipt - you can certainly do that - you might also want to check out "Quality of Service" (QoS) settings in your MQTT client, which control levels of reliability in delivery.
Hi Playful Technology, what a great project! It works properly. I would like to setup a MQTT project with one ESP32 as a subscriber and another ESP32 as publisher. The broker should be a local RasPi standalone as Broker-Server creating its own WLAN without connection to the Internet via Router or Access Point. Can you give me hints how to do this? The handling of the ESP32 should be easy. But with the RasPi I have got my problems to combine the installed Mosquitto and the WLAN-Server capabilities. Do you have this setup described in one of your courses? (Please without NodeRed.) Thanks! Oli
I found this video is fruitful and could learn the concept of MQTT and I have a question on deployment - what is the best practices of deploying the bug-fixes, updates of client software onto MQTT client devices?
Wow ! Very nice tutorial ! Love it. Keep it up. If this is connected to a mikrotik mqtt broker, and mikrotik has snmp, can u monitor the data over network routing through public ips, or gsm with ddns or how should this be done in order to connect it and monitor it through a local server dashboard(grafana or something like this ). Thank u and great work
Great in depth vid covering 3 different "gadgets" ... Which one would you say it's best from a practicability point of view ? I would probably look into installing some magnetic locks on my shed door , or side garden door etc.. to play about with .. I've got some pi3's laying about which I used for different applications ... Also would like to incorporate all the other "smart" devices I have in Home Assistant which is already running one a Ubuntu Pi ...
Thank you for the great video. I have a question. Can i access to RasPi MQTT broke and control it in defferent WiFI?? For example: I'm in my conpany and use my company wifi. can i use MQTT app that U seggest to control my device at home???
Yes, you can use one of the Node-RED MQTT server nodes, such as that based on Aedes. Mosquitto is normally considered to be a little bit more robust and feature-rich, but it really depends on your use-case.
hi,can you explain to me a little bit about MQTT as I'm stuck? I want to send a message from my laptop to node MCU or esp8266. I have an MQTT broker installed on my laptop, so I will use that broker or my self-made server/broker.
Hi (عيد مبارك). Please if you still have the codes, I am kindly asking you to send them to me at the following address (a_zitouni@hotmail.com). unfortunately the provided link does not work. Regards.
hi, thanks for great tutorial. I have one question, so, your android app interact directly with MQTT server or through a daemon in the same host of MQTT server?
I am working on a wrist watch project and need a way to move 1 to 40 Mbyte data files from an Android and iOS mobile device to the watch over Bluetooth Classic. ESP32 drives the watch. Have you seen a solution? -Frank
Hey Alastair. Firstly thanks loads for this, it took me ages to get the info to work out how to achieve something similar and your solution is far more elegant. Quick question though, if connection to WiFi/mqtt broker fails would the code get stuck waiting to connect or would the puzzles still function but without reporting to the broker? Couldn't quite follow the program flow at that point. Cheers
Kieran Schlechter That's a good question, and because I was trying to keep the code example simple, I probably didn't make it as robust in that respect as I could have.... What behaviour would you like to happen in that scenario? One feature I didn't demonstrate here is a "heartbeat" message regularly published by all clients that are connected. The server subscribes to the topic that those messages are sent to and, if no pulse is detected from a prop for a certain amount of time either because it fails to connect, the connection is lost, or some other malfunction, a warning can be sent to the control room computer (but the prop otherwise continues to function in "offline" mode as usual). Is that the behaviour you'd want?
Alastair, it wasn't a critisism of the code you posted, I just wasn't sure how it would behave if connectivity was lost. In real application of this I think users would want what you describe above. At the very least the prop should function as normal with or without the MQTT functionality. Networks and servers go down from time to time and it shouldn't affect a game in progress if they do. I was just looking at the connection sections of code, and wondering if it would get stuck in the connection loop until a connection was established, and therefore prevent the prop from functioning.
Maybe it's too late for an answer but yes, you have to install an operating system, setting up users etc... basically you have to do all the stuff you would do on a normal computer. Because that's what it is. A computer. To do what was done in this video you also have to install a MQTT broker. There's several option for that, but generally speaking, people use Mosquitto.
No, not in this case (although you can get "Power over Ethernet" (PoE) which could be used to do so) - the ethernet is data only and I'm powering the Arduino as normal.
Does anyone know? If he goes to the client.connect() part of the RaspberryPi. Is it the ip adress from the Pi self or is it from his Windows Computer? Thanks in advance! Jens
Can you speak to the robustness of MQTT for IoT used in these manners where cyber security is in question? It seems that if you know the topics to subscribe to, you can create havoc in an MQTT environment, or is that harder than it seems?
Hiya, Just wanted to know if there is tutorial on how to implement MQTT on Arduino uno with seeedstudio V2.0 wifi shield? Can anyone please help me in this regard?
6 years later and as interesting as it can get Your "one handed typing" is humbling. Nice on-screen graphics! Cheers from So.Ca.USA 3rd house on the left
Well done! Clear and concise tuition. I’m moving away from Blynk into MQTT and this was probably the best 'first step’ that I’ve come across. That 'front end' that you spoke of at the end of your talk, I hope that it’s still a likely project. I eagerly await your updates.
I wish I had found this video a year or two ago. Nice description of the various different pieces of HW, and SW and how they differ. Well done.!!!
Forgot how much I love this channel
Firstly, thanks for the video. It is helpful and you obviously put lots of effort into it.
Just wanted to propose a suggestion. At around 29 minutes or so, you talk about using strings instead of integers for command indices for readability reasons. I would suggest having the best of both worlds: keep an enum with a list of names that correspond to integers. This makes your code safer because when you compile you are not allowed to have typos, and it is just as readable because the enum names, rather than the integer value of each enum, are what is in the code.
The only downside is that the same enum must be defined on all platforms involved in the network, but in my opinion it's worth it.
Every beginner should see this
Wonderful explanation! I loved the variation of devices used instead of the typical sole device, as well as the "puzzles"! Keep up the great videos!
Thanks again for a very clear and understandable tutorial. With a few tweeks I managed to do the same with esp32.
you put the puzzle pieces together, good job, well done
Good job, clear explanations.
Great MQTT video, thank you!
Thank you, just what I was looking for!
Oh yes, I forgot to say thank you for the great video - I got a lot out of it.
Wow. This is a very detailed explanation. Thank you.
This video caught my eye --- long time MC programmer here for industrial controls. I wonder if you've considered the implications at putting something like a Beaglebone Black or another board with PRUs in the mix to control extremely time-sensitive devices/triggers? Great stuff, thanks. I like the way you've presented MQTT here.
Very clean and ubderstable video! Thank you 🙏
it is ''puzzling'' that you've called them actions '''puzzles''. Anyways...keep up the good work. And by the way, great video.
Yes, as a first time viewer I was also puzzled! It sounds like he's calling an Arduino Sketch a Puzzle? ("it's running a puzzle").
I guess I'll need to look back at some older video's, to understand what he's on about with all the Puzzle references. :-)
This was for an escape room. Escape rooms have physical puzzles.
Ah yes, sorry - the majority of my Raspberry Pi/Arduino projects are used for escape room games, so the "program" they run is the controller for a puzzle. I probably say "puzzle" without thinking about it!
also just want to say great stuff you making.
This is a very helpful video! Thanks! You def earned a sub!
Hi Alastair, thanks for taking the time to explain mqtt in detail. I feel you've done a great job explaining it. In your code you reference a pulseCount var, but it's not used elsewhere. Can you explain how you would go about monitoring the heartbeat? I get the frequent publishing of the count and subscribing to it, just unclear as to how you would action an mqtt or WiFi failure. Also, have you had chance to play with micropython on the esp32 and mqtt? Cheers!
Hi, I just found out about your channel. Thanks for all the helpful tips I've already gotten from your videos. I am currently working on a project where I want to implement a MQTT-server. However, since MQTT works with a publish-subscribe principle, there is no real check if the message was received by a subscribed client. In escape rooms I believe this is a crucial part, since you want to make sure that a message has been received. How would you account for this?
thank you for the great video
Great video, I have not got a chance to watch all of it but it`s a really rare video to see. I was wondering if you could attach a VR shield in order to control the separate relays on the different machines by voice. Also a verification message from each machine back to your pc would be awesome to add, could that be done ?
If you like the WeMos D1 mini or any esp8266 board for that matter you will LOVE, love, love the esp32! It runs much faster than any Arduino or Raspberry Pi. It has plenty of analog to digital pins as well as a single digital to analog pin. Three processors, security, deep sleep mode (to conserve battery life), Bluetooth, PWM, Mesh and much more. If you get one then you can replace the Raspberry Pi and then turn the Pi into your MQTT Broker (even a Raspberry Pi zero W will work). One final question that I may have missed. Did you send the message (i.e. payload) back to the MQTT Broker, so if it did not receive the message correctly or if it did not see the message at all the Broker could resend the message?
I've literally got some ESP32s on order as we speak! Re: sending a message receipt - you can certainly do that - you might also want to check out "Quality of Service" (QoS) settings in your MQTT client, which control levels of reliability in delivery.
super video ...really great!! thank you very much!
Hi Playful Technology,
what a great project! It works properly.
I would like to setup a MQTT project with one ESP32 as a subscriber and another ESP32 as publisher. The broker should be a local RasPi standalone as Broker-Server creating its own WLAN without connection to the Internet via Router or Access Point.
Can you give me hints how to do this?
The handling of the ESP32 should be easy. But with the RasPi I have got my problems to combine the installed Mosquitto and the WLAN-Server capabilities.
Do you have this setup described in one of your courses? (Please without NodeRed.)
Thanks!
Oli
I found this video is fruitful and could learn the concept of MQTT and I have a question on deployment - what is the best practices of deploying the bug-fixes, updates of client software onto MQTT client devices?
Wow ! Very nice tutorial ! Love it. Keep it up.
If this is connected to a mikrotik mqtt broker, and mikrotik has snmp, can u monitor the data over network routing through public ips, or gsm with ddns or how should this be done in order to connect it and monitor it through a local server dashboard(grafana or something like this ).
Thank u and great work
Thanks, your video is very great
Excellent, Thanks.
I guess you need wifi or wired lan connection between the nodes. Maybe using RF is cheaper?
Great in depth vid covering 3 different "gadgets" ... Which one would you say it's best from a practicability point of view ? I would probably look into installing some magnetic locks on my shed door , or side garden door etc.. to play about with ..
I've got some pi3's laying about which I used for different applications ... Also would like to incorporate all the other "smart" devices I have in Home Assistant which is already running one a Ubuntu Pi ...
Great tutorial.
This is amazing! Great work :)
Great video. Do you have a C-version of the RPI code? And maybe also a version operating over wifi (still C).
What UI are you using to diagram the three boards? Thanks!
Thank you for the great video. I have a question. Can i access to RasPi MQTT broke and control it in defferent WiFI??
For example: I'm in my conpany and use my company wifi. can i use MQTT app that U seggest to control my device at home???
i was reading somewhere that the MQTT Borker might be needed anymore, that its build into node red. is that true?
Yes, you can use one of the Node-RED MQTT server nodes, such as that based on Aedes. Mosquitto is normally considered to be a little bit more robust and feature-rich, but it really depends on your use-case.
Nice demo! How could a simply IP PTZ camera be added to use the video and control the Pan, Tilt position from the Raspberry PI(3) and opencv? Thanks.
hi,can you explain to me a little bit about MQTT as I'm stuck? I want to send a message from my laptop to node MCU or esp8266. I have an MQTT broker installed on my laptop, so I will use that broker or my self-made server/broker.
very nice !
Awesome, great work!
Hi (عيد مبارك).
Please if you still have the codes, I am kindly asking you to send them to me at the following address (a_zitouni@hotmail.com). unfortunately the provided link does not work.
Regards.
This is amazing
thank you namaste
hi, thanks for great tutorial. I have one question, so, your android app interact directly with MQTT server or through a daemon in the same host of MQTT server?
How would you do a keypad
good one. super
I am working on a wrist watch project and need a way to move 1 to 40 Mbyte data files from an Android and iOS mobile device to the watch over Bluetooth Classic. ESP32 drives the watch. Have you seen a solution? -Frank
Can you do this using node red please!
Hey Alastair.
Firstly thanks loads for this, it took me ages to get the info to work out how to achieve something similar and your solution is far more elegant. Quick question though, if connection to WiFi/mqtt broker fails would the code get stuck waiting to connect or would the puzzles still function but without reporting to the broker? Couldn't quite follow the program flow at that point. Cheers
Kieran Schlechter That's a good question, and because I was trying to keep the code example simple, I probably didn't make it as robust in that respect as I could have.... What behaviour would you like to happen in that scenario? One feature I didn't demonstrate here is a "heartbeat" message regularly published by all clients that are connected. The server subscribes to the topic that those messages are sent to and, if no pulse is detected from a prop for a certain amount of time either because it fails to connect, the connection is lost, or some other malfunction, a warning can be sent to the control room computer (but the prop otherwise continues to function in "offline" mode as usual). Is that the behaviour you'd want?
Alastair, it wasn't a critisism of the code you posted, I just wasn't sure how it would behave if connectivity was lost. In real application of this I think users would want what you describe above. At the very least the prop should function as normal with or without the MQTT functionality. Networks and servers go down from time to time and it shouldn't affect a game in progress if they do.
I was just looking at the connection sections of code, and wondering if it would get stuck in the connection loop until a connection was established, and therefore prevent the prop from functioning.
For raspberry pie do u have to setup in a raspberry pie in any way ?
Thanks.
Marc.
Maybe it's too late for an answer but yes, you have to install an operating system, setting up users etc... basically you have to do all the stuff you would do on a normal computer. Because that's what it is. A computer.
To do what was done in this video you also have to install a MQTT broker. There's several option for that, but generally speaking, people use Mosquitto.
Is the Ethernet cable both transmitting data and powering the Arduino?
No, not in this case (although you can get "Power over Ethernet" (PoE) which could be used to do so) - the ethernet is data only and I'm powering the Arduino as normal.
Didn't realize you replied. Thanks a lot for the answer. Your videos are fantastic.... Keep it up.
Thanks
Super cool can you make it a kit
Can you make this mqtt connection with arduino uno board with esp8266 esp01?
Yep. See here: www.patreon.com/posts/how-to-wi-fi-any-21931879
@@PlayfulTechnology Thank you so much
i have a stupid question: is it possible to multiple arduino devices connected at same time to the MQTT broker?
They will have different IP's and Mac addys, So yes.
ESP32esp 32 will work as a broker?
Does anyone know?
If he goes to the client.connect() part of the RaspberryPi. Is it the ip adress from the Pi self or is it from his Windows Computer?
Thanks in advance!
Jens
byte to string : str(msg.payload) must be changed to msg.payload.decode('utf-8')
MQTT for IOT looks the same as OPC for Industrial Automation, tag, topic, subscribe. For IOT I use websockets, js, html which do fine.
Nice Job!!
What are puzzles?
Can you speak to the robustness of MQTT for IoT used in these manners where cyber security is in question? It seems that if you know the topics to subscribe to, you can create havoc in an MQTT environment, or is that harder than it seems?
Hiya, Just wanted to know if there is tutorial on how to implement MQTT on Arduino uno with seeedstudio V2.0 wifi shield? Can anyone please help me in this regard?
How to write python code in adruino
If you like the wemos you should order a bunch of ESP32's from china, smaller and cheaper and very powerful! (ESP32 is next Gen of ESP8266).
Lewis Lisa Allen Daniel Martinez Donald
What the F*** is a puzzle?
Something that needs to be solved.