Already 7 years ago... and still very enjoyable. I needed a refresh... so what else is there to do then watch these videos!
@AndreasSpiess
Жыл бұрын
Indeed, a long time. And I always wonder where I found the time to create these videos during my active work...
@KennethTanFotografie
8 жыл бұрын
One of the best introductions into MQTT ever seen. Love the accent.
@AndreasSpiess
7 жыл бұрын
Thanks!
@IoTLearner
6 жыл бұрын
Well done sir...
@anycatdessai
5 жыл бұрын
True!
@brianschwind6530
8 жыл бұрын
Your series of videos on the ESP8266 is incredibly helpful and informative, thanks so much for taking the time to make them! Your pacing and explanations are perfect.
@AndreasSpiess
8 жыл бұрын
Thank you very much for your nice comment!
@georgei2480
3 жыл бұрын
This is a killer app! I spent days trying to accomplish the same task described in this video but with the use of WebSockets with no success. This took me less than 30 min to get set up and working!
@AndreasSpiess
3 жыл бұрын
Glad the video helped!
@planetcrypto8662
7 жыл бұрын
Particularly like your teaching of practical usage, versus blinking LED's. A channel for the professional versus the student/hobbyist. Although easily digestible by both. We run MQTT servers and you're spot on. Great job, very useful, keep up the outstanding work.
@AndreasSpiess
7 жыл бұрын
Thank you for your nice feedback. I try to do my videos the same way I like them when I want to learn something...
@rinokentie8653
2 жыл бұрын
Andreas - this old video was of great help. I am trying to understand the workings of Adafruit.io. Thanks!
@AndreasSpiess
2 жыл бұрын
Glad it was helpful!
@spacefolder
7 жыл бұрын
You are a great teacher, with an AMAZING sense of humor! Thank you.
@AndreasSpiess
7 жыл бұрын
Thanks!
@filipeterra8981
8 жыл бұрын
best youtube channel ever! great diagrams and a catchy voice. thank you for the esp8266 videos!
@AndreasSpiess
8 жыл бұрын
+filipe terra Thank you very much for your compliment!
@anokhautomation4453
4 жыл бұрын
Very helpful totorial sir. I am already build a project with adafruit mqtt +ifttt+google assistant voice command.
@AndreasSpiess
4 жыл бұрын
Good luck!
@muhammadsameer883
7 жыл бұрын
Very nice and to the point tutorial Andreas.. I like you accent. Very clear and very understandable.
@AndreasSpiess
7 жыл бұрын
Thank you for your positive feedback!
@rolandomartin
7 жыл бұрын
Andreas, you are a great communicator. Love your videos. Greetings from Canada!
@AndreasSpiess
7 жыл бұрын
Thanks you!
@benfletcher7209
6 жыл бұрын
Really good intro to MQTT, looking forward to checking out more ESP8266 stuff. Thank you very much Andreas
@AndreasSpiess
6 жыл бұрын
Thank you and enjoy my other videos on the ESP8266 and the newer ESP32
@techlander00
8 жыл бұрын
Hi Andreas ! Simple, linear, pro, crystal clear. Thanks a lot for everythingM
@AndreasSpiess
8 жыл бұрын
Thanks for this very nice comment!
@kessedk
7 жыл бұрын
MQTT made simple! Thanks again :) Did a small modification of your blink example, so that it sends a MQTT "command" ON/OFF every 3 seconds to adafruit, which it still subscribes to. So it now needs my wifi, internet connection and the adafruit service to be up and running in order to blink the LED :) Fun to play with! Next step is to make it IOTAppStory compatible :)
@AndreasSpiess
7 жыл бұрын
Cool. And build your own MQTT server using a Raspberry Pi...
@kessedk
7 жыл бұрын
Andreas Spiess yep I have it running on my orange ip zero with diet pi, and using the Xmas script ☺️ worked well! I haven't tried anything other than node red for testing the mqtt, but will have to test that also 😀
@AndreasSpiess
7 жыл бұрын
:-)
@rmjjanssen2645
7 жыл бұрын
He Andreas, great tutorial.....yesterday evening I was able to replicate the setup......worked in one go. See a lot of other interesting video's on you channel . So thank you for getting me up to speed with this. Up to my first IoT project...
@AndreasSpiess
7 жыл бұрын
Good. Thanks for the feedback!
@rmjjanssen2645
7 жыл бұрын
He, question .....have you come around a way to create Mqtt based apps for iOS? So an app that can publish data on topics of an mqtt broker like adafruit?
@AndreasSpiess
7 жыл бұрын
+RMJ Janssen There are a few MQTT clients for smartphones available.
@XerotoLabs
8 жыл бұрын
Very nice , great video . As old game coder here , i was thinking your were about to explain how to do NAT punch through with a ESP. that would have been very cool . That might have to be a reason for me to do a bit of game code again .
@AndreasSpiess
8 жыл бұрын
+XerotoLabs That is exactly what I did not want! With NAT as I knew it you have to have fixed ip adresses in your WLAN. This is ok for a printer. But for sure not for devices I tinker around. My at least 10 ESP modules would create always address conflicts and adjust the ports on the route would be an additional nightmare. For me, MQTT is a very elegant solution, at least if you only want to transport data...
@XerotoLabs
8 жыл бұрын
+Andreas Spiess yeah it can be a mess. The way i do NAT punch in game code , i have a public server some place that manages all the handshakes . so it would be no diff' that the MQTT broker 's job . After watching your video , I agree for devices the NAT punch is a waste of resources , but I may do it just for fun . Also for fun , I still want to try having one of my ESPv12E 's run a CNC via TCP , or UDP depending on what i find easier or most fun . I know they support TCP easy . Any how great videos as ever .
@AndreasSpiess
8 жыл бұрын
+XerotoLabs Thanks for the compliment! I just did some milling and just now switched the CNC off. My problems with this technology is not the processor at the machine, it is the processor between my ears! Milling for me is still very difficult and I still make many mistakes. And, even if I have a 6040 it is quite often too small. And then I need work-arounds. Very time-consuming. 3D-printing is much easier but for big parts and for aluminium or wood I still use the CNC. So, now it is 1 AM here and I go to bed ;-)
@sikotryne
8 жыл бұрын
Dave Jones reference made me laugh. Good video Andreas, appreciated.
@AndreasSpiess
8 жыл бұрын
+Sindre Thanks for your comment. I appreciate it!
@jimmy21584
6 жыл бұрын
This was very clear, and a great choice of libraries - thank you!
@AndreasSpiess
6 жыл бұрын
Thank you!
@AcessoTeleInfo
6 жыл бұрын
Congratulations from Brazil! Very good!
@AndreasSpiess
6 жыл бұрын
Thank you!
@MightyTechGuy
6 жыл бұрын
Your videos are priceless! Thanks for all this knowledge :)
@AndreasSpiess
6 жыл бұрын
You are welcome!
@PunitSoni00
8 жыл бұрын
Didnt know that my router protects my "wifey" :) JK, nice video.!
@AndreasSpiess
8 жыл бұрын
+Punit Soni You are never too old to learn something about your "wifey"! :-) I will change my pronincition in the future...
@ramixnudles7958
8 жыл бұрын
+Andreas Spiess We love the accent, but as long as we can suggest pronunciation, "this is the age of the gauge!" At least here, gauge rhymes with age. :-)
@AndreasSpiess
8 жыл бұрын
Thanks! Good example..Try to improve ;-)
@junaidahmed-kc6li
4 жыл бұрын
@@AndreasSpiess Is it possible to retrieve feed data and control actuator ? If yes, then please let me know which board i can use to control it. Thank you :-)
@davem1492
8 жыл бұрын
Thank you.Your video was informative. I like the accent neat.
@AndreasSpiess
8 жыл бұрын
Thanks for the compliment!
@hassanahmad9597
6 жыл бұрын
first thank you second , i wanna create 2 way switch with adafruit i mean in one way you can turn on/off the led(relay) by adafruit io and , in another way you can turn on/off the led(relay) by using a push button
@AndreasSpiess
6 жыл бұрын
This is an old video and I am not sure if you can send messages from Adafruit.io
@troncquoS
8 жыл бұрын
Another nice video, thank you for that Andreas. Und jetzt schnell ein ESP8266 Modul suchen / kaufen und losgehen ;)
@AndreasSpiess
8 жыл бұрын
+Sven Troncquo Danke. Das ist wohl das kleinste Problem. Die gibt's ja unterdessen überall!
@troncquoS
8 жыл бұрын
+Andreas Spiess Is the "build-in" photocel connected to the ADC input of the esp? I'm trying to connect a DHT22 with my NodeMCU . I ordered a DOIT and got an AMICA, but looks like the DOIT and is also breadboard friendly. I saw on the net that the analog ADC input is only capable of 1V maximum. This means that I have to make a voltage divider?
@AndreasSpiess
8 жыл бұрын
+Sven Troncquo 1. the LDR is connected to the ADC, but only on the Witty board 2. Yes, it has a max. Of ca.1Volt and yes, you have to use a voltage divider or a potentiometer to get the maximum (you might not get the exact resistor values needed)
@deangreenhough3479
7 жыл бұрын
I've been struggling with this topic. Why didn't I think to check here first DOH😂😂
@AndreasSpiess
7 жыл бұрын
:-)
@norbertoestrada971
6 жыл бұрын
great tutorial on mqtt, but most of all, the humour cracked me up :))
@AndreasSpiess
6 жыл бұрын
Thanks!
@altsushant674
7 жыл бұрын
@0:45 It's like "your router firewall protects your wife from other people surfing the internet".
@AndreasSpiess
7 жыл бұрын
Of course, it does ;-)
@altsushant674
7 жыл бұрын
true ......but here I am trying to find a wife for me on internet and firewalls coming in my way. :D
@colfaxschuyler3675
8 жыл бұрын
I'm glad you number these! Makes keeping notes much easier... I signed up for the Adafruit beta, and tried to see your feeds from online. Evidently I haven't figured out how to do that yet... Adafruit foiled me at every turn. CAN we see your dashboard? Do I misunderstand, or is it just limited to MQTT traffic through devices (which I haven't, yet). I've tried the obvious strings that you've supplied in the video, and various searches on project and user name. Maybe my account is not configured correctly?
@fuzzie4755
8 жыл бұрын
Hi Andreas, based on you great input, I do now have more a less a platform to connect different sensors and interact with them. Since yesterday there where some sudden reboots when MQTT send/receive and an interrupt on an GPIO happened. Really bad to reproduce but happen from time to time and reboot the ESP. I found more or less by accident this really important add on in function declaration that now avoid any interrupt conflict. ICACHE_RAM_ATTR. You can google on it. For example I modify the MQTT callback like this: "void ICACHE_RAM_ATTR mqtt_callback(char* topic, byte* payload, unsigned int length) {.....}" Maybe you have seen similar and wondering what happened.
@AndreasSpiess
8 жыл бұрын
So far, I did not have problems I was not able to solve. I use the standard attachInterrupt of Arduino. But good to know if it happens to me too... Thanks!
@fuzzie4755
8 жыл бұрын
+Andreas Spiess: it only happens if you handle with different interrupts like the watch dog and Mqtt listener and a interrupt on GPIO.
@AndreasSpiess
8 жыл бұрын
Aha! Thanks
@craiglarson2346
3 жыл бұрын
I keep going back to the Spiess LIbrary to learn more. Thanks for building a great one. In this video, you say that "MQTT transfers all values as characters". I've read that one of the MQTT advantages is that MQTT is data agnostic for M-2-M communications. Transfering a 16-bit variable (e.g. 65565) would require 5 bytes as characters, but only 2 bytes as binary. Could you please comment on why the MQTT standard is character based? Thanks.
@AndreasSpiess
3 жыл бұрын
I am not sure if there is any standard or if people just do it. I assume you can also transfer "coded" numbers if you own the backend and know how to decode it.
@craiglarson2346
3 жыл бұрын
@@AndreasSpiess Thank you, Andreas.
@luchoescobar
5 жыл бұрын
Hey Andreas thanks for the video, what was the name of the esp you used in this video?? I can’t catched up well. The luminiscense sensor is attached to the board??
@eduardfc
7 жыл бұрын
Very instructional video! In my case, I prefer to use DDNS and create a DMZ on my Firewall.
@AndreasSpiess
7 жыл бұрын
Thanks! Also a good concept with a DMZ...
@1_HighDuke
2 жыл бұрын
How would you go about retrieving the last known value for the Command ("On/off") feed? Say you want your lamp to immediately be on or off depending on the position of the button in the Adafruit.io Dashboard. Is there a way to do this in the setup() function? I'm asking because everything I've seen until now requires you to change the state/value of the feed before it gives you the first value -- so say the dashboard button is "Off", well upon running the code, your mqtt subscription will not give you a value until you switch the button in the Dashboard to "On", then it will work ok. But I'm interested in the last known value for that feed upon initialization.
@AndreasSpiess
2 жыл бұрын
You can either change the value by receiving an MQTT message on your ESP or you have to save the last value in the memory of the ESP. If you want it survives a power down, in the "EEPROM"
@siddharthachatterjee9959
8 жыл бұрын
Hi, I have another question please. Can anyone please help on how to install Mosquitto (or any other MQTT service) on 64 bit PC with Windows 8 or 10 ? I have tried the Windows 7 method available on the Internet, but it does not work on 64 bit PC with Windows 8. Thanks.
@IoTLearner
6 жыл бұрын
I'm working with Adafruit_mqtt library, you have make the feeds on your own at Adafruit.io....Don't know about pubsubClient
@AndreasSpiess
6 жыл бұрын
Just google. It is very well documented.
@HGMtyfilms
7 жыл бұрын
Do not worry Sir, your explanation is very very good. I just saying that seems a little too much code, because, if you have somthing that "detetects ligth" and One "light" a side...makes sense (to me) that; if you put them somehow together, you may detect if works or not...i'm i right?....jijijiji
@AndreasSpiess
7 жыл бұрын
Yes, you are right.
@err_404_not_found
5 жыл бұрын
Mindblowing
@AndreasSpiess
5 жыл бұрын
:-)
@padmanabhareddy2918
4 жыл бұрын
I am getting an error esptool.FatalError.Falied to connect to Esp8266:Time out waiting for packet header
@AndreasSpiess
4 жыл бұрын
Maybe you try to upload a blink sketch first. It seems to be a basic error.
@stokseelalleen1913
7 жыл бұрын
The humour :) Subscribed. Also the information was superb. Thank you
@AndreasSpiess
7 жыл бұрын
Thanks for your support!
@AhmadAsmndr
4 жыл бұрын
thank you very much.. Vielen Dank!!
@AndreasSpiess
4 жыл бұрын
You are welcome!
@stevenathandesa208
6 жыл бұрын
Great tutorial!
@AndreasSpiess
6 жыл бұрын
Thank you!
@watawonderfulworld
7 жыл бұрын
Thanks Andreas as usual. Looking forward to more videos. By the way, for local communication, can we use ESP8266 itself as MQTT broker?
@AndreasSpiess
7 жыл бұрын
Newer tried that.
@enricosaccheggiani3192
4 жыл бұрын
Andreas this is the guy with italian accent: You are a genius , you have solved my problem. Thanks a lot There is a problem . I don't find MQTT.h header file no such file or directory. what do we have to do ? Thanks a lot
@AndreasSpiess
4 жыл бұрын
This is an old video and many things changed since then. So I do not know and unfortunately I do not have the time to keep all my videos up-to-date :-(
@selvaaai
7 жыл бұрын
Hey Bro, I implemented a websocket client in node mcu which connects to SAP HANA websocket.It can do a bidirection communication.But after sometime,node mcu client is dead without notification.And also some time the message is not delivered to my node MCU client.Iam in the last phase of the project.Do you think ,i need to switch to MQTT for reliable communication.Please suggest.
@Real_Barbunia
5 жыл бұрын
dont we have a chance to access from internet to our esp without anay other webpage? i want to get connected to my esp but dont want to spend time in adafruit's page. is there any chance to use mqtt in other ways?
@AndreasSpiess
5 жыл бұрын
Yes. Maybe you google?
@alanpowell328
7 жыл бұрын
Hi Andreas, I created an account and got started. Am I correct in thinking that I can subscribe to sensorsiot/feeds/luminosity and check out/ operate your light? I had a quick attempt without success. I will go to learning.adafruit and RTFM. Many thanks for an excellent introduction to MQTT. Alan
@AndreasSpiess
7 жыл бұрын
I cancelled my part since a longtime because I had no reaction. Sorry...
@abhinavkumar1253
6 жыл бұрын
I have made a block in adafruit mqtt in which the value differ from 1 to 10 . And i want to read this as integer in nodemcu i.e in arduino IDE while compiling...i mean i want to set it as ....when the value will be 1 in the feed then it on LED 1 when value in broker will be 2 then ON LED2 and so on.... Please help... How to get it as integer value
@AndreasSpiess
6 жыл бұрын
I cannot do software support for 55'000 subscribers. Sorry.
@chi-tinhnguyen5176
6 жыл бұрын
thank your video much sir please help me when I open serial monitor, It issue some word : Not authorized to connect How can I solve this problem ?
@AndreasSpiess
6 жыл бұрын
I do not know. You have to find the error yourself. Maybe wrong password?
@hgravina
7 жыл бұрын
There is any way to read a value from broker again? I am having some Dropped Packeges ... so i want to my device read the topics every 5 seconds!
@AndreasSpiess
7 жыл бұрын
MQTT protocol offers so called QOS levels. QOS=1 means, that each packet is delivered at least once. QOS=2, that is is exactly delivered once.
@sajjadahmad5298
6 жыл бұрын
Nice tutorial. sir i am trying to establish ssl connection between esp8266 client and MQTT broker, but don't know how to do that. any help in this regard will be appreciated.
@AndreasSpiess
6 жыл бұрын
Maybe you look at the HTTPSRequest example or WiFiClientSecure. I do not know what has to be done for the MQTT libaries. And google ( internetofhomethings.com/homethings/?p=1820 )
@erikjorpes1325
6 жыл бұрын
Thanks for a good inspiration. I currently working on a similar project and have much help from you videos. My project is based on Adafruit MQTT Library ESP8266 Example and including #include "Adafruit_MQTT.h". #include "Adafruit_MQTT_Client.h". What I do not understand is how it should be possible for the main loop to to more than sleep. Assume I have a readSubscription every 5 sek while ((subscription = mqtt.readSubscription(5000))) {... the main loop does nothing in the sleep time. Assume, I will read a motion sensor and interrupt a MQTT message as soon interrupt happens, how is that possible? Currently I inly enter my motionSensorAnalogReadingThing every 5000 ms, independen where I put it in main loop(). Thanks for your engeneering analytics! /E
@AndreasSpiess
6 жыл бұрын
I only used this library once. Now I usually use the pubsub library. So I cannot help you. Maybe you find the info in the usually good documentation of Adafruit.
@prasadjadhav624
4 жыл бұрын
Hi Andreas, nice video, very detail information. i tried this it worked well. One issue i am facing is my nodemcu does not respond after 10-15 minutes. it seems it is dead. I tried following code too WiFi.setSleepMode(WIFI_NONE_SLEEP) but it seems its not working. It works only for 10 mins after restart. can you suggest something to keep nodemcu alive forever. thanks in advance
@AndreasSpiess
4 жыл бұрын
Maybe you insert some serial.print statements to see where it crashes. I cannot do remote debugging:-(
@HGMtyfilms
7 жыл бұрын
yo no se mucho pero si tienes una luz y algo que detecta luz, ...para detectar si funciona le detector pones la luz enfrente, y si cambia lo detecta, cierto? :-)
@AndreasSpiess
7 жыл бұрын
Unfortunately, I do not understand Spanish.
@shoaibiqbal9788
7 жыл бұрын
Hi, I'm looking for something similar but using a Wifly sheild for the Arduino but have had no luck, the shield connects to the internet but does not connect through mqtt to adafruit.io.
@AndreasSpiess
7 жыл бұрын
So, there is some additional work to be done. I used MQTTlens (a chrome extension) to first test the connection to adafruit.io. Like that, you can find out, if your problem is in the call (like credentials, etc.) or in your sketch.
@shoaibiqbal9788
7 жыл бұрын
Andreas Spiess Thanks, I'll try it out asap
@Tanishqdhanuka
5 жыл бұрын
error rc=7 could mean?
@AndreasSpiess
5 жыл бұрын
I do not know
@philippecorbel7365
7 жыл бұрын
Hi Andreas! very good video thanks a lot have question using ESP8266 and io.adafruit mqtt I’am using esp8266 with solar power batterie, publishing mqtt every 5mn or so, then going in sleep mode for saving batterie (thanks Andreas). If in mean time button change ON or OFF, when ESP8266 connect next time for publishing it can’t get the subscriptions change ON/OFF? Or other way to solve it, would it be able to read any value at each time esp8266 is connect to mqtt server. do you have a solution? Thanks Philippe
@AndreasSpiess
7 жыл бұрын
+Philippe CORBEL Google "MQTT quality of service levels". There you will find the solution. Not sure, it works with adafruit
@archgloom
7 жыл бұрын
will it work if internet gets disconnected but WiFi router switched on ?
@AndreasSpiess
7 жыл бұрын
If your MQTT broker is in the internet, it will not work. Then, you would have to build you own MQTT broker (which is not too complicated). Watch my newest videos if you are interested in this.
@siddharthachatterjee9959
8 жыл бұрын
Hi, nice video. Thanks. Further can you suggest a resource where I can lean MQTT-SN ? Thanks in advance.
@AndreasSpiess
8 жыл бұрын
I do not know MQTT-SN (even if it was developed also in IBM Switzerland). So, I cannot help.
@siddharthachatterjee9959
8 жыл бұрын
Okay. Thank you.
@RishiRajKoul
2 жыл бұрын
How does MQTT create connection with remote device without knowing its IP?
@AndreasSpiess
2 жыл бұрын
All devices only connect to the (known) address of a broker.
@RishiRajKoul
2 жыл бұрын
@@AndreasSpiess How does Brocker send messages back to Clients that have a Private IP?
@AndreasSpiess
2 жыл бұрын
@@RishiRajKoul There is a connection made by the client.
@RishiRajKoul
2 жыл бұрын
@@AndreasSpiess thanks. A quick one. Does MQTT work if Private IP is behind a NAT server?
@AndreasSpiess
2 жыл бұрын
@@RishiRajKoul Yes
@Jasmohan
8 жыл бұрын
Can you help me out with something? I have an Arduino which is connected to an analog sensor. The values of the sensor are converted into a number we can understand like degrees celcius. I am sending that number to ESP8266 through Serial port. I am hosting a webpage on my local network. When a client(like my desktop) connects to the ESP8266, I get the webpage on my browser. On the page, the number from the analog sensor is shown. To update the number I use this:- I have used this in the HEAD of the webpage I am sending. Due to this, the page refreshes after 5 seconds so that the client requests again, and ESP8266 sends the full webpage again. I want that the whole page does not refresh, just the the number on the webpage. Do you know any method to do this?
@AndreasSpiess
8 жыл бұрын
+Jasmohan Singh Narula In episode #30 I use a technique called AJAX to do someting like that. You can have a look at this programm. It separates the text from the content. Maybe, with this method you can get what you want if you only once send the text and manytimes send the numbers. You find also a link to the "inventor".
@AndreasSpiess
8 жыл бұрын
+Jasmohan Singh Narula Maybe this is also interesting in this context: babaawesam.com/2015/11/26/control-input-output-of-esp8266-with-ajax/
@Jasmohan
8 жыл бұрын
+Andreas Spiess Thank you my friend. I'll check the episode and link you gave.
@josephtanner248
4 жыл бұрын
Grüezi Andreas is your account still working and public (with account)? I could connect (node-red green), but got this errors: MQTT ERROR: jsail 212.51.158.172 SUBSCRIBE sensorsiot/feeds/command rejected, resource not available or not authorized MQTT ERROR: jsail 212.51.158.172 SUBSCRIBE sensorsiot/feeds/clientstatus rejected, resource not available or not authorized
@AndreasSpiess
4 жыл бұрын
This is an old video and it is well possible that no all services still work.
@danialvarez9
6 жыл бұрын
Hi!, i've got a ask.. How can i do to see "My Feeds" in Adafruit.io?
@AndreasSpiess
6 жыл бұрын
I did not use this service for a long time
@reugrech
8 жыл бұрын
Great video Andreas! Luv the accent! Have a question. Is there any way one could create a simple web interface on the ESP8266 which would be password protected but would allow to enter the WiFi and MQTT usernames and passwords dynamically, and not have them hardcoded?
@AndreasSpiess
8 жыл бұрын
+Reuben Grech Thanks for your compliment! First, the ESP does usually not support SSL. So, the information is readable. An second, yes. If you watch my video series about creating an IOT infrastructure for the ESP you will see, that I present there a solution to connect the ESP first to a smartphone or browser to enter the WiFi credentials. But of course, you can use the same thing to enter the MQTT credentials. Just add the two fields. If you do it right they should be stored in "EEPROM" and be available the next times you start the ESP.
@reugrech
8 жыл бұрын
+Andreas Spiess Thanks for your feedback and keep your videos coming!!
@tejeetmagar2846
8 жыл бұрын
why the adfruit gives this internal server error
@AndreasSpiess
8 жыл бұрын
I do not know
@izoumashka
8 жыл бұрын
very nice video.one question: what is the #include "credentials_Adafruit_IO.h" file?
@AndreasSpiess
8 жыл бұрын
+fun electronics videos Because I do not want to disclose my credentials on github i have a system that I put these into a file in the library folder. Then, I am sure that I do not publish them accidentally. It has the same info as the few lines below the line: /* definition of credentials and feeds In this example it is also easy to change from one broker to another with the same sketch. Then, I just have to change the include file.
@piyushtailor3608
6 жыл бұрын
Sorry,but I didnt get it.
@phaniharsha5306
6 жыл бұрын
Sir plz tell me how to install mqtt library
@AndreasSpiess
6 жыл бұрын
Like any other MQTT library. It is in the Arduino IDE. If you do not know how to install an Arduino library, Google is your friend ;-)
@PIYUSHTAILORstillalive
6 жыл бұрын
I am getting SSID (20): Labhansh Photography Passphrase (9): thakkar69 BSSID set: 0 Attempting MQTT connection... failed, rc=-2 try again in 5 seconds Measure Attempting MQTT connection... failed, rc=-2 try again in 5 seconds Please help!
@AndreasSpiess
6 жыл бұрын
Maybe you check if you have all passwords and keys of adafruit correct in your sketch
@PIYUSHTAILORstillalive
6 жыл бұрын
Ichecked but no progress.Can there be any other issue?
@AndreasSpiess
6 жыл бұрын
Obviously it is another problem ;-) maybe you use mqttlens in the chrome beowser to test adafruit witout your ESP
@PIYUSHTAILORstillalive
6 жыл бұрын
Sorry,but coul d ypu please elaborate?
@MPElectronique
7 жыл бұрын
Hi Andrea. What is the diffrence between adafruit io library and mqtt library ?
@AndreasSpiess
7 жыл бұрын
I do not know the details. Recently, I used the pubsub library and also once the async mqtt client
@leswilk1601
7 жыл бұрын
Hi Andreas, I have installed libraries, ESP8266 and your sample code; I then get error when compiling "Error compiling for board Generic ESP8266 Module". I have tried compiling for another board i.e. Hazzah and still the same error. Any ideas please ?
@AndreasSpiess
7 жыл бұрын
+Les Wilk Do you have more ? This is very generic. Do other examples compile?
@pedrobravo6972
4 жыл бұрын
Hi Andreas, thank you for this wonderfull video!! However I can´t find the adafruit.io in Playstore. Do you use another one? I need it to use it in an Android device. Another thing, I try the sketch you publish in GitHub, but it don´t work properly. Any possibility to have the complete sketch you use in the video??? (this is based in pubsubclient library...) I am developing an MQTT app which can send topics, call back and send SMS to the user. Thank you for your help. Have a nice day. With best regards, Pedro
@AndreasSpiess
4 жыл бұрын
This is an old video and things might be different now. But adafruit.io is still running. It was never in the playstore.
@rezvanrezaei7500
8 жыл бұрын
Thanks for your good video :) I think TLS is really necessary for MQTT. But some MQTT client libraries such as pubsub library doesn't support TLS. I need a library to work on esp8266 and can use it in arduino ide. do you know any of them?
@AndreasSpiess
8 жыл бұрын
I do not know a lot about internet protocols, so I am no help here.
@SamZorSec
8 жыл бұрын
You can use WiFiClientSecure instead of WiFiClient. Link: io.adafruit.com/blog/security/2016/07/05/adafruit-io-security-esp8266/
@rezvanrezaei7500
8 жыл бұрын
YES! thanks indeed :))
@dennbauer
7 жыл бұрын
Hi, I am having the following problem and am desperatly looking for help: I run an Nodemcu ESP8266 12E board, programmed in Arduino. I would like to connect three input buttons to D6, D7 an D8. Each button is linked to a separate pullup-resistor of 10K Ohm. The button on D6 is working fine, if connected alone. But if I connect the others on the circuit board, they do not work. Also I can see that the button on D6 is triggering the input on D7. First questions: Are 10K Ohn the right choice when running more than one pull-up resistor? Are D6 (GPIO 1512), 7 (GPIO 1513) and 8 (GPIO 15) GPIO I can use for inputs? Will try to add a picture of my circuit and example code as soon as possible. Thank you in advance for helping!
@AndreasSpiess
7 жыл бұрын
I am not sure how you connected your switches, but you need an independent pull-up resistor for each pin. Otherwise, your pins are all connected together. Then, check if the levels on each pin is really 0 and 3.3 volt. It is well possible, that D8 will not reach 3.3 volt, because on many boards, it has a pull-down resistor attached to it. GPIO15 is used for the boot process, so, it often is pulled down. And last, I would try one after the other and remove all others completely.
@dennbauer
7 жыл бұрын
Dear Andreas, thank you for your answer! I wired everything up like this: goo.gl/photos/ZTKjQTtsgF3nsg8D9 If I connect only SW2/R1 (GPIO12), everything works fine. If I connect SW2/R1 (GPIO12) and SW3/R2 (GPIO13), the following scenario occurs: Triggering SW2 will trigger both Pins: GPIO12 and GPIO13 Triggering SW3: nothing happens. Is my wiring correct? Thank you again for your help!
@AndreasSpiess
7 жыл бұрын
The wiring seems to be correct. But please do your measurements and tests as I wrote before, because somethings seems not to work properly. Also have a look at the software. Do not use complicated software, just a few statements which exactly do what you want to test (like the blink sketch). Pinmode, digital read, serial.print, delay. Not more.
@dennbauer
7 жыл бұрын
Ok, thanks again. Measurements done and first part of the solution found: When triggering the first button, the pullup-resistor for the second seems to be not strong enough. So I tried 10k and 100k which prevents the second pin from getting pulled by triggering the first button. the code I use is quote simple. I will doublecheck again, but think the solution lies somehow in choosing the correct resistors.
@AndreasSpiess
7 жыл бұрын
I usually resistors around 5k for pullup.
@Popart-xh2fd
7 жыл бұрын
Do you know how to use the ESP8266 together with an Arduino Board and be able to connect trough MQTT? It looks like people only knows to use the ESP8266 alone when it comes to MQTT, for MQTT connections I still haven't saw anyone that have used an ESP8266 as a WiFi module only with sketches uploaded to the Arduino board instead...!
@AndreasSpiess
7 жыл бұрын
No, I do not know of such a concept. But I never searched for one. The concept of using the ESP as a wifi module is no more used by many people.
@Popart-xh2fd
7 жыл бұрын
Andreas Spiess As you know, the ESP8266 (ESP-01) has only Digital GPIOs, no Analog ones. These cheap modules are clearly limited when it comes to GPIO pins, so is reasonable to center the programming in a Arduino board with lots of GPIOs and rely on the ESP only for wireless connections. I did that for Analog sensors report trough HTTP to the dweet.io site. MQTT is different from HTTP in the way that the headers are Binary and not ASCII text, so you are unable to just post AT commands with textual Headers when it comes to MQTT... I realize that the only solution to center sensors in a common Arduino Board is to transmit the data throughout a Serial connection between the Arduino and the ESP8266 where ESP8266 deals with the MQTT protocol and the Arduino board with all the sensors, you just have to use the Read and Write Serial functions to make the sensors' data communication between the two devices, something avoidable if it was possible to use the AT commands for MQTT connections at the Arduino board!
@AndreasSpiess
7 жыл бұрын
+Popart 2015 If you watch my todays video you find exactly this scenario...
@Popart-xh2fd
7 жыл бұрын
Andreas Spiess After seeing your last video, and knowing that the ESP-01 has 1 MBytes of Flash memory and the Arduino Uno has only 32 kBytes, I must realize that the ESP8266 is the device that should be in the center of things and not the typical Arduino board. These boards without the ESP8266 are only useful due to their extra GPIOs, so, when in use as is the case of your last video, it's only to feed the ESP with sensor data... In conclusion, considering the new protocol MQTT, makes no sense to buy an Arduino board without an ESP8266!
@AndreasSpiess
7 жыл бұрын
I agree with you and plan to do an MQTT interface for the Sonoff (ESP8266 based).
@MMphego
7 жыл бұрын
Hi Andreas, quick question on MQTT and ESP8266. Is it possible to have 2(two) brokers running on one ESP8266? local broker running on a raspberry pi and the other from cloud mqtt?
@AndreasSpiess
7 жыл бұрын
+MphoMphego I never tried to connect in parallel to two brokers. But if you start two differen MQTT clients in parallel, this should be possible. Just try if the library is written in a good quality...
@MMphego
7 жыл бұрын
I have been doing some research about this issue, and landed here: stackoverflow.com/questions/24109306/bridge-between-two-mosquitto-brokers It is achievable by using MQTT Bridge.
@ivangarrido6240
7 жыл бұрын
Hi (sorry i am a newbie) I tried to do it through Adafruit MQTT, installed all 3 libraries and changed values on ESP_MQTT_PUBSUB sketch.Using a wemos d1 mini with a photolight sensor. i could not include the library "credentials_Adafruit_IO.h" library is not found when compiled and couldn't find it in any of the 3 libraries. i disabled it to try and sketch runs, it connects to wifi and initially connects/measures to MQTT then stays mostly trying to reconnect. on the IO.Adafruit site on the opened account, it didn't get the feed to show up. current version is different. not sure if need to add the feed somehow or should be recognized when the sketch loaded with right credentials. also not clear on the "credential_adafruit_IO" library missing. really appreciate if given a clue what i am missing.
@ivangarrido6240
7 жыл бұрын
never mind. didn't realized the topic sensorsiot was expired. once i changed it to my Feeds username, the luminosity feed started loading. great tutorial!
@AndreasSpiess
7 жыл бұрын
:-)
@NansEverything
7 жыл бұрын
Excuse me, I have replaced my Feeds username but it still can't find credentials_Adafruit_IO.h What should I do???
@AndreasSpiess
7 жыл бұрын
You have to create your own credentials for adafruit on their homepage.
@NansEverything
7 жыл бұрын
I'm the beginner of MQTT, could you please guide me which page in Adafruit that used for create the credential?
@TechInventorAman
5 жыл бұрын
how do you make your videos or which software do you use ?
@AndreasSpiess
5 жыл бұрын
Maybe you watch my lab reports. I use Powerdirector 14
@edilmarlulab1981
5 жыл бұрын
what is broker?
@AndreasSpiess
5 жыл бұрын
Maybe you ask Google?
@edilmarlulab1981
5 жыл бұрын
@@AndreasSpiess thank you that was very informative
@jesuishalil
8 жыл бұрын
The joke at 2:35 cracked me up! Esp8266 has no wpa2 for hosting the web server right? So would have a secure log in page when using https and a password?
@AndreasSpiess
8 жыл бұрын
+Glychee S Unfortunately, I do not understand what you mean. To my knowledge, WPA protocols are used in LAN environment behind the firewall. And as far as I know, MQTT does not need a webserver on the ESP. Fact is, that currently all traffic from the ESP to Adafruit.io is open. I do not use SSL. This is mybe the next step, but not easy for me, because I do not know a lot about certificates etc. But the test data I transfer for the moment are not very valuable.
@jesuishalil
8 жыл бұрын
I should have posted it as a seperate question, when using a smartphone to log into your esp8266 which is hosting a web page, there is no wpa2 security, i have heard. To have proper security, would hosting a web page with HTTPS and a log in password be more secure?
@AndreasSpiess
8 жыл бұрын
First: In this video there is no log-in necessary on the ESP and there is no webserver running on the ESP. The webserver you see is on adafruit.com. Second: HTTPS would be save, yes. Unfortunately, the ESP8266 does not support that (at least to my knowledge). We have to wait for the ESP32 for this feature. Third: WPA is a different level. It is the protocol used by your Wi-Fi hardware between your device or PC and the access point. It prevents that somebody can listen to your private WiFi trafic. HTTPS is on a higher level and works not only in your wifi, but worldwide from the server to the client.
@jesuishalil
8 жыл бұрын
Great! thanks =)
@soumahend4015
7 жыл бұрын
first : I use mosquitto MQTT local offline MQTT. and it havn't a username and key. second : in my code WiFi.begin(ssid, password); and WiFi.status() dosn't work. this is my code: //ItKindaWorks - Creative Commons 2016 //github.com/ItKindaWorks // //Requires PubSubClient found here: github.com/knolleary/pubsubclient // //ESP8266 Simple MQTT light controller #include #include //EDIT THESE LINES TO MATCH YOUR SETUP #define MQTT_SERVER "192.168.173.1" const char* ssid = "zed_2017"; const char* password = "zed__2017"; //LED on ESP8266 GPIO2 const int lightPin = 2; char* lightTopic = "topic"; //"/test/light1"; void callback(char* topic, byte* payload, unsigned int length); WiFiEspClient wifiClient; PubSubClient client(MQTT_SERVER, 1883, callback, wifiClient); void setup() { //initialize the light as an output and set to LOW (off) pinMode(lightPin, OUTPUT); digitalWrite(lightPin, LOW); //start the serial line for debugging Serial.begin(115200); delay(100); //start wifi subsystem Serial.println("Connecting to "); Serial.println(ssid); delay(1000); WiFi.begin(ssid, password); //attempt to connect to the WIFI network and then connect to the MQTT server reconnect(); //wait a bit before starting the main loop delay(2000); } void loop(){ //reconnect if connection is lost Serial.println("loop"); Serial.println(client.connected()); delay(1000); //Serial.println(WiFi.status()); //delay(1000); if (!client.connected() && WiFi.status() == 3) { Serial.println("reconnect avant"); delay(1000); reconnect(); } Serial.println("loop client avant"); delay(1000); //maintain MQTT connection client.loop(); //MUST delay to allow ESP8266 WIFI functions to run delay(10); } void callback(char* topic, byte* payload, unsigned int length) { //convert topic to string to make it easier to work with String topicStr = topic; //Print out some debugging info Serial.println("Callback update."); Serial.print("Topic: "); Serial.println(topicStr); //turn the light on if the payload is '1' and publish to the MQTT server a confirmation message if(payload[0] == '1'){ digitalWrite(lightPin, HIGH); client.publish("/test/confirm", "Light On"); } //turn the light off if the payload is '0' and publish to the MQTT server a confirmation message else if (payload[0] == '0'){ digitalWrite(lightPin, LOW); client.publish("/test/confirm", "Light Off"); } } void reconnect() { //attempt to connect to the wifi if connection is lost if(WiFi.status() != WL_CONNECTED){ //debug printing Serial.print("Connecting to _reconnect"); Serial.println(ssid); //loop while we wait for connection while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } //print out some more debug once connected Serial.println(""); Serial.println("WiFi connected"); Serial.println("IP address: "); Serial.println(WiFi.localIP()); } //make sure we are connected to WIFI before attemping to reconnect to MQTT if(WiFi.status() == WL_CONNECTED){ // Loop until we're reconnected to the MQTT server while (!client.connected()) { Serial.print("Attempting MQTT connection..."); // Generate client name based on MAC address and last 8 bits of microsecond counter String clientName; clientName += "esp8266-"; uint8_t mac[6]; WiFi.macAddress(mac); clientName += macToStr(mac); //if connected, subscribe to the topic(s) we want to be notified about if (client.connect((char*) clientName.c_str())) { Serial.print("\tMTQQ Connected"); client.subscribe(lightTopic); } //otherwise print failed for debugging else{Serial.println("\tFailed."); abort();} } } } //generate unique name from MAC addr String macToStr(const uint8_t* mac){ String result; for (int i = 0; i < 6; ++i) { result += String(mac[i], 16); if (i < 5){ result += ':'; } } return result; } AND the Out in moniteur serie it is : Connecting to zed_2017 Connecting to zed_2017 Connecting to zed_2017 Connecting to zed_2017 I don't understande what is the probleme? can U help me pliiiz
@AndreasSpiess
7 жыл бұрын
Maybe you ask the author of this sketch first?
@wilsonmassamiishihara6475
4 жыл бұрын
It's easy, but more expensive
@AndreasSpiess
4 жыл бұрын
Compared with what?
@Schnorschel
8 жыл бұрын
lumiNosity, not lumiosity. There is an "n" in there, and it is not silent when pronounced.
Пікірлер: 225