How To Set Up MQTT With Raspberry Pi Pico W | Guide For Beginners

  Рет қаралды 31,918

Core Electronics

Core Electronics

Күн бұрын

🔗 The full guide : core-electronics.com.au/guide...
In this guide, we'll get a Raspberry Pi Pico W to send and receive data to the cloud using the MQTT protocol. By the end of this video, we'll be controlling real hardware over the cloud using a web-based dashboard ( Adafruit IO ).
If you need help setting up WiFi on the Pico W head here:
core-electronics.com.au/guide...
If you're new to Raspberry Pi Pico and Thonny give this a read:
core-electronics.com.au/guide...
🔧🔨🧰 Hardware featured in this guide:
Raspberry Pi Pico W:
core-electronics.com.au/catal...
PiicoDev Ultrasonic Rangefinder:
core-electronics.com.au/catal...
PiicoDev 3x RGB LED Module:
core-electronics.com.au/catal...
Other Pico Products:
core-electronics.com.au/raspb...
💡❓ If you have any questions about this content or want to share a project you're working on head over to our maker forum: coreelec.io/forum
0:00 Intro
0:39 Setting Up Adafruit IO
1:47 Publishing To The Dashboard With Your Pico W
3:53 Code Walkthrough
4:24 Subscribing To Data With Your Pico W
6:08 Reconnecting After Losing Power
7:05 Code Walkthrough
8:09 Controlling Hardware Via The Cloud
🌏🦘 Core Electronics is located in the heart of Newcastle, Australia. We're powered by makers, for makers. Drop by if you are looking for:
• Raspberry Pi core-electronics.com.au/raspb...
• Arduino core-electronics.com.au/ardui...
• Sparkfun core-electronics.com.au/brand...
• Adafruit core-electronics.com.au/brand...
• Pololu core-electronics.com.au/brand...
• DFRobot core-electronics.com.au/brand...
The following trademarks are owned by Core Electronics Pty Ltd :
"Core Electronics" and the Core Electronics logo
"Makerverse" and the Makerverse logo
"PiicoDev" and the PiicoDev logo
"GlowBit" and the GlowBit logo

Пікірлер: 33
@ariel_monaco
@ariel_monaco 9 ай бұрын
Used MQTT a lot a decade ago. Its big limitation is that is has no authentication nor encryption (regardless of the hardware and energy requirements, it could have been built as an optional feature just like what HTTPS is to standalone HTTP). MQTT was originally created to monitor gas and petrol pipeline sensors, so its deployment and application environment was always inside a closed intranet or some kind of network back then. Anyways awesome video as it shows the vast application capabilities of the Pi Pico W. Such an awesome device!
@ianbrown1963
@ianbrown1963 2 ай бұрын
Most decent MQTT Brokers now support authentication with a username and password as well as encryption via TLS
@billycartdemons
@billycartdemons Жыл бұрын
Great video - been waiting for that
@Meine_Rede
@Meine_Rede 7 ай бұрын
Nice video. Great learning in less than ten minutes. Wonderful !
@ronsflightsimlab9512
@ronsflightsimlab9512 Жыл бұрын
Glad I came across this! Thanks from San Diego, CA.
@henrik3098
@henrik3098 Жыл бұрын
Thank you bro
@yannkitson116
@yannkitson116 6 ай бұрын
Great video :)
@Gerald-iz7mv
@Gerald-iz7mv Жыл бұрын
Hi nice video! Would also love to see LTE communication with raspberry pi zero 2 w. Also long term study would be interesting. How much data you transmit and how much power it consumes…
@bgavin71
@bgavin71 Жыл бұрын
Nice tutorial. I had error trying to install umqtt simple. I found out I need to have Thonny version 4.0.2. I was running Thonny version 4.0.1
@marcovanurk
@marcovanurk Жыл бұрын
Great video. I’m interested in the scripts for the rangefinder and the LEDs at the end of the video. Do you have a link to the source codes? Thx. 🙏🏻
@vish3658
@vish3658 Жыл бұрын
A slightly advanced question - I've an application on the pico w that is publishing data at 50HZ. Now when I try the same thing with a regular python script on an actual RPi 3B, it works splendidly, but when I try running the same script on the pico, I have some lost packets. I was wondering if the issue was because of the way the umqtt works, or if it was an issue with how the clock is configured. I did not touch the clk, so I did not mess that up afaik. Does anyone know what could be happening? Can the pico with its default clk config publish at 50 Hz? (once every 20ms)
@tomlynn1000
@tomlynn1000 Жыл бұрын
I use MQTT to share telephone handset on/off-hook status with homeassistant.
@chrisl2656
@chrisl2656 6 ай бұрын
6:25 If we think of the dashboard as part display, part control panel, we might prefer it if at power-on the device state changed to match the state of the toggle (rather than switching the toggle off). Is that possible - can a subscriber get the *current* state, rather than having to wait for a state change?
@zoro.73
@zoro.73 Жыл бұрын
How to publish the in built temp sensor data to node red via mqqt?
@jacekkomendoowicz8650
@jacekkomendoowicz8650 8 ай бұрын
what could be the problem Failed to publish message: [Errno 104] ECONNRESET
@calibre_au6183
@calibre_au6183 8 ай бұрын
Nice video, it's not clear however how the switch on the adafruit dashboard can communicate from the web back into an internal network. I assume the mqtt publisher on the LAN keeps a NAT session open for incoming traffic.
@chrisl2656
@chrisl2656 6 ай бұрын
No, the subscriber on the pico makes an outbound connection to the dashboard (which can then send updates back to the pico)
@truthhurts1459
@truthhurts1459 Жыл бұрын
Great Video, but I want to monitor my Garage Door Status while away from home, so I need to SUBSCRIBE through an iPhone. I got you code to work, then replaced the slide button with a MOMENTARY one, and put in a 1.5 second to allow a relay to function (to close door if open). Do you have knowledge of the MQTT Apps and what I have to do to get this to function on a phone? Apps are available, but don't have good explanations of connection to Adafruit's site. THanks
@truthhurts1459
@truthhurts1459 Жыл бұрын
Also, the Pico is NOT doing an "infinite wait". If I don't change the state of the slide or button in a couple minutes, then the Pico does not get the message. I have to stop/run the program.
@jyvben1520
@jyvben1520 Жыл бұрын
Even a raspberry pi 3/4 can run a mqtt server, no cloud needed if you only want local access (not outside the home).
@Core-Electronics
@Core-Electronics Жыл бұрын
Yup, we've got a guide on setting up mosquitto on a RPi too - we just wanted to keep the amount of hardware requirements to a minimum in this guide.
@phoenixxflashamv4664
@phoenixxflashamv4664 Жыл бұрын
Can I send 300samples/sec using this? Please answer 🥺
@jaenaax2045
@jaenaax2045 3 ай бұрын
I added the umqtt folder with the simple.py into my project in vscode. But I get a lot of errors. Does anyone know why? Do I have to install anything else?
@WintonMc
@WintonMc 7 ай бұрын
Does this need updating? I got an error install umqtt simple:- '--upgrade-strategy', 'only-if-needed', 'micropython-umqtt.simple', '--index-url', '127.0.0.1:36628']' returned non-zero exit status 1.
@ASHISHKUMAR-ej1fy
@ASHISHKUMAR-ej1fy 20 күн бұрын
Mqtt client id me kya likhe
@bentjensen3841
@bentjensen3841 10 ай бұрын
Just started with MQTT. I got your example working, but was surprised to see, that an IP address is not being set up after establishing the wifi connection. Why is that not needed?
@bentjensen3841
@bentjensen3841 10 ай бұрын
I am using it on Pico W.
@ianbrown1963
@ianbrown1963 2 ай бұрын
When a device connects to a Wifi network and DHCP is enabled, it is assigned an IP address by the server. In this case there is an IP address but you don't see it because is not required to be known to connect to the MQTT broker
@WiselyGaming
@WiselyGaming Жыл бұрын
sir i have a doubt pls clear: i want to connect a 16x2 Lcd display to raspberry pi pico on windows, pls Tell me how can i do.
@zorabixun
@zorabixun Жыл бұрын
Cloud used for info sharing is not good Could you show how to share info straight between devices ? Thank you
@ianbrown1963
@ianbrown1963 2 ай бұрын
You can setup an MQTT broker running on your local network rather than on the cloud using something like Mosquitto. For direct communication between devices just use simple socket connections.
Raspberry Pi Pico W: Wireless Weather Station
17:13
ExplainingComputers
Рет қаралды 284 М.
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 10 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 17 МЛН
UNO!
00:18
БРУНО
Рет қаралды 2,3 МЛН
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 70 МЛН
AWS basics animation
13:59
CloudKode
Рет қаралды 64
WiFi Garage Door Controller | Raspberry Pi Pico W Project
10:46
Core Electronics
Рет қаралды 70 М.
WiFi Control Your Micropython Project Using a Web Interface
51:13
Bytes N Bits
Рет қаралды 28 М.
How To Install The Mosquitto Mqtt Broker On Your Raspberry Pi
14:36
LETS CODE FOR THE OLDER FOLKS
Рет қаралды 2,1 М.
The Raspberry Pi Pico WAS Overrated! But that changed!
10:18
GreatScott!
Рет қаралды 601 М.
PicoMite: Running BASIC on a Raspberry Pi Pico
19:29
ExplainingComputers
Рет қаралды 145 М.
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 10 МЛН