ESP32 DHT11/DHT22 Asynchronous Web Server (auto updates Temperature and Humidity)

  Переглядів 195,463

Rui Santos

Rui Santos

День тому

For complete project details (schematics + source code), visit ► RandomNerdTutorials.com/esp32...
Enroll in "Learn ESP32 with Arduino IDE" Course ► randomnerdtutorials.com/learn...
In this project, you'll learn how to build an asynchronous ESP32 web server with the DHT11 or DHT22 that displays temperature and humidity using Arduino IDE.
The web server we’ll build updates the readings automatically without the need to refresh the web page.
Like my page on Facebook:
/ randomnerdtutorials
Add me on Google+:
plus.google.com/+RuiSantosdotme
Follow me on twitter:
/ ruisantosdotme
Subscribe for more projects like this!
bit.ly/subscribeRNT

КОМЕНТАРІ: 113
@RuiSantosdotme
@RuiSantosdotme 5 років тому
You can find the full code for the Asynchronous ESP32 DHT11/DHT22 web server on our blog ► RandomNerdTutorials.com/esp32-dht11-dht22-temperature-humidity-web-server-arduino-ide/ You can enroll in "Learn ESP32 with Arduino IDE" Course ► randomnerdtutorials.com/learn-esp32-with-arduino-ide/
@edudz151186
@edudz151186 4 роки тому
Hi Rui, can I use this for my esp8266 wemos d1 mini?
@RuiSantosdotme
@RuiSantosdotme 4 роки тому
@@edudz151186 for the WeMos, you need to use this code instead randomnerdtutorials.com/esp8266-dht11dht22-temperature-and-humidity-web-server-with-arduino-ide/
@Ankit-mq6em
@Ankit-mq6em 3 роки тому
Hello sir I'm getting ip address of esp32 but when I'm putting in browser it is not loading whyyy????
@factormarketing5652
@factormarketing5652 3 роки тому
i don't understand how this type of videos have less views that trash videos , excellent thanks :)
@Flynn3778
@Flynn3778 4 роки тому
One of the best video tutorial I have ever seen. Well done!
@RuiSantosdotme
@RuiSantosdotme 4 роки тому
Thank you! I'm glad you liked it.
@SavioWWE
@SavioWWE 4 роки тому
Very good, thanks. I made a remix with your ideia in this video and with the Oled display, now I have a system that shows the temperature in all devices connected in this IP and in the Oled, as the same time. Thank you for shared your knowledge.
@marinmitev
@marinmitev 4 роки тому
Just awesome explanation! Thank you!
@victor7ultimate
@victor7ultimate Рік тому
I love the detailed voice-over explaination.👍👍
@user-st8bb2gs9e
@user-st8bb2gs9e 2 роки тому
Bro your tutorials are soo amazing good! Never seen anything like this before on youtube ! Ty soo much :)))
@stefanbramel
@stefanbramel 5 років тому
Great job Rui, I'm definitely going to upgrade my current weatherstation as fast as possible. I'am wondering if it is possible to draw diagramms with the sensor data to see for examle how the temperature has changed over night. It would also be nice if you could display the lowest and highest temperature per day on the website. ;)
@marioronquillo4771
@marioronquillo4771 Рік тому
Thx mate, this was so useful for me!
@101appsCoZa
@101appsCoZa 4 роки тому
Excellent tutorial. Thanks very much for sharing!
@alexharijanto9137
@alexharijanto9137 3 роки тому
EXCELENT..!!!..., thanks for sharing and the mailing list
@micaelsantosnascimento8566
@micaelsantosnascimento8566 4 роки тому
Thanks, this video helped me a lot :)
@Squancheeb
@Squancheeb 4 роки тому
Thanks for the informative video. I'm trying to make an arduino that monitors humidity and temperature in my mushroom fruiting chamber. I'd like to use the data from these sensors to also create a graph. Any tips?
@mibrahim4245
@mibrahim4245 Рік тому
Great Rui !!! ... But, I didn't understand the lower part of the web page, how did you replace the variables in HTML with the sensor readings ? "using the % symbol" ?
@Lyndon_K
@Lyndon_K Місяць тому
Great video, thanks!
@leizerleite4457
@leizerleite4457 4 роки тому
Grato por compartilhar conhecimento! Trabalho muito bem elaborado, aprendi muito.
@esp-explain655
@esp-explain655 3 роки тому
thank you so much bro u saved me from a lot of researches from google
@hamzamaxmouri1099
@hamzamaxmouri1099 3 роки тому
did you do the example ??? did it work ?????
@SandeepSandhu
@SandeepSandhu 4 роки тому
Can you please make a video on ESP32CAM to send files over Bluetooth considering Aithinker's builtin Bluetooth. Thanks
@RickB3n
@RickB3n 4 роки тому
Awesome tutorial, i subscribed immidiately :)
@RuiSantosdotme
@RuiSantosdotme 4 роки тому
Happy to hear that! Thanks for watching
@henkkuik2341
@henkkuik2341 3 роки тому
Grato por compartilhar conhecimento Rui. (Had to look that one up) Great video. Can i use basicaly the same method with a max31865 rtd converter and a rtd100/1000 sensor? Witch library would i need then?
@msingh9550
@msingh9550 3 роки тому
Awesome tutorial. Is it possible to have a control of this module and have the data from this station show up in homeassistant iot interface. Thx
@VerasakSahachaisaree
@VerasakSahachaisaree Рік тому
Thank you so much for this video. Very good.
@Shabloop
@Shabloop 3 роки тому
great video tutorial. i have a question though regarding about this esp32. im building a project that will need a camera and internet connectivity and found that there is a esp32 wifi camera. my question is if the esp32 wifi camera can be used to control the arduino over wifi while receiving data then send it to an android app
@jacgeo9887
@jacgeo9887 4 роки тому
Hi Am I able to print a series of texts (from data from a flex sensor - for eg. “hello, how are you?” onto the webserver that the esp32 connects to?
@ogad12
@ogad12 4 роки тому
Thanks for this project and tutorial it has come in really handy. Is it posible to integrate an email alert if the senor detects a dip or increase in temperature? Email would be from pop3 /smtp. Thanks again!
@renen26
@renen26 5 років тому
Nice man! im currently building smart terarium and this is exactly what i need. Previosly i was using html meta refresh command and after 30mins my esp always soft WDT resets.. Could this fix it? or do you thing my app crashes for some other reasons? because when i dont have the web interface opened it runs smoothly :D
@cheapskatetanks8200
@cheapskatetanks8200 4 роки тому
I just want to ask about the esp32, I have a problem when uploading the codes to the esp32. Some says ur need capacitor 10uf to connect the gnd to the EN pin. i dont remmber.. but somewhere in the esp32.
@longngo2418
@longngo2418 3 роки тому
the Webserver can monitor the temparature and humidity value on runtime ? we don't reload website to update the value? Thanks for this interesting video. So very useful!
@fluna1974
@fluna1974 4 роки тому
eXCELENT! How can I do the same but with 4 sensors (4 esp32) I need all of them shows on same page...
@dtn2529
@dtn2529 Рік тому
The DHT22 sensor enables temperature measurement in the range of -40 to 80°Celsius Does your program accept this? I.e it also shows negative temperatures?
@wnemn
@wnemn 4 роки тому
Hello, great work, thanks. But i ran into an issue: If a add more paragraphs for other sensors, the last paragraphs on the page wont be displayed…doesnt matter what i put on the button of the page. Can you helb me?
@TechInventorAman
@TechInventorAman 4 роки тому
If i use the AP mode instead of a STA mode will the values still get updated . And how exactly is the values getting updated automatically without actually using AJAX or anything else without actually refreshing the page ?
@marioneves177
@marioneves177 3 роки тому
Antes demais parabens pelo bom trabalho e por partilhar, tenho uma questao, e possivel atribuir um ip fixo ao esp 8266 para nao estar a ser atribuido pelo dhcp?
@gustavosantos5886
@gustavosantos5886 3 роки тому
Hello,Nice tutorial! How can i use for a hc-sr04 sensor?
@user-mr9ol6lx1l
@user-mr9ol6lx1l 3 роки тому
Very good thanks.
@nhat_uet7151
@nhat_uet7151 4 роки тому
how can i add more sensors to the system? I did try but I can't upload the data from the extra sensor onto the web page? can you help me?
@richrizo1515
@richrizo1515 4 роки тому
i want send a voltage of a potentiometer to a web page like you, you use a library for the sensor, i dont know how make that., can you hep me?
@yvesinformel221
@yvesinformel221 3 роки тому
if you have multiple sensor, is it possible to write something like this DHT garden[2]; then you could initialize them in a for loop like for (i=0; i
@rendirestman4615
@rendirestman4615 3 роки тому
Sir how can i send a message with valiable data from android using MIT app to the esp web server? How the esp can get that data? What i mean is like for controlling led brightness
@teodoro4715
@teodoro4715 4 роки тому
You are my god
@filalieya7725
@filalieya7725 3 роки тому
thank you
@galihridhoutomo
@galihridhoutomo 3 роки тому
Rui Santos, I have problem "Error compiling for board ESP 32 Dev Module" please i need solution
@mustafa97radhwan
@mustafa97radhwan 3 роки тому
How could I change the background color of the web page according to value of the Temperature ?????
@yudistiradewanda4231
@yudistiradewanda4231 4 роки тому
is it possible to use 2 sensors(dht22) in 1 esp32?
@dimitriosa8tsipouras953
@dimitriosa8tsipouras953 4 роки тому
how i make that with fix IP? for example 192.10.1.1 then i login in with that ip? Thank you from Greece
@hamzamaxmouri1099
@hamzamaxmouri1099 3 роки тому
Great vidéo thanks. i tried to do the same but the page would not referech automaticly anny help please !!!
@davidsantiagogalvan3795
@davidsantiagogalvan3795 2 роки тому
Hi Rui! Great video, ¿can you make a video with ESP8266? Thanks.
@carloscoelho3824
@carloscoelho3824 3 роки тому
Muito bom este vídeo, muito bem explicado só é pena não ser em português.
@rafalzasada8826
@rafalzasada8826 2 роки тому
It is possible to have fixed website name instead of IP address? Is Arduino library capable of that?
@jasonmare33
@jasonmare33 3 місяці тому
Hi I have IDE 1.8 arduino esp 32 dev the code stops at the WiFi.mode! the mode is not highlighted cant load any idea what the problem I have used this tutorial before no problems thank you
@shahbaztech7064
@shahbaztech7064 2 роки тому
When connect serial cable with esp32 on rx pin WiFi of esp32 not working it disconnected I take data from. Weights scale and send ko webserver using esp32
@TashTech
@TashTech 4 роки тому
im trying to run this on a nodemcu esp8266MOD, and first i was getting an error about the conts ssid, if i chnage it to insert my ssid and password instead of variable, then the error im getting is Error compiling for board NodeMCU 1.0 (ESP-12E Module). can anyone offer some advice please?
@AlexandreEglit
@AlexandreEglit 2 роки тому
Friend you could do this same project with local indication with Oled display 0.96 I2c SSD1306
@alpeshsoni
@alpeshsoni 3 роки тому
Very Good, How to Access this IP outside wifi? from the mobile location? Any Help!!
@shakerileiwat4341
@shakerileiwat4341 5 років тому
Amazing
@RuiSantosdotme
@RuiSantosdotme 5 років тому
Thanks for watching!
@puchomoreno
@puchomoreno Місяць тому
Can you do it as an access point?
@mohammednidal5206
@mohammednidal5206 3 роки тому
i want to build web server using arduino uno. is this possible? can you help me out with it
@yawarsaeed6499
@yawarsaeed6499 4 роки тому
Thanks for sharing such an Awesome project. Can I get the same web page over an access point without having local WiFi network. Awaiting your earliest response. Thanks.
@henkkuik2341
@henkkuik2341 3 роки тому
Do you mean from outside your network? If so than that is not a problem, you need to open the port 80 for that ip adres on your router. (Portforwarding)
@ManuelCastillo-kq3xy
@ManuelCastillo-kq3xy 4 роки тому
Hi. Thx for this titorial. I need control 4 buttons/relay also. What is the best node to abord this?
@erustuscheruiyot7448
@erustuscheruiyot7448 3 роки тому
I too need this. For 8channel block. Following
@xiaomidrone4k905
@xiaomidrone4k905 Рік тому
Can you make update? Temperature and humanity graph?
@rsrofik2019
@rsrofik2019 2 роки тому
Can I see this output only ip address? And how to store pc? Please help
@Terry_Genereaux
@Terry_Genereaux 2 роки тому
How do you know what board to use?
@budianto3917
@budianto3917 3 роки тому
thank you, good job. I have tried according to the tutorial, but why is it slow response from esp32 sometimes it doesn't even respond
@MoJoM0J01
@MoJoM0J01 3 роки тому
I suggest you put an external antenna on it. After working with a few modules, having the external antenna really makes a difference in response time. I went from thinking I was coding something incorrectly, to realizing that the signal was just weak on multiple projects.
@user-ck4kb7cc6f
@user-ck4kb7cc6f Місяць тому
Iam trying to do same from last 1 week still cannot can help me how to connect to you
@ericjoulin8758
@ericjoulin8758 Місяць тому
Hi, my name is Eric (new subcriber) I have a projet of "connected beehive" to monitor the weight (HX-711 analogic sensor) and temperature (DHT22 digital sensor) with an Heltec ESP 32 Lora V3 board. I'm working with IDE Arduino interface and the driver of my Heltec V3 board has been successfuly installed as well as the boardmanager and library so that the COM communication between my Arduino IDE and my Heltec board works normally. My Heltec board is poorly documented (only a pin diagram which speaks more or less for me) so I found your channel with several videos dealing with "ESP32-DHT" ... But I have problems to make work (simple) sensor such as my DHT22 with my board. I mean I get "abnormal results" from my DHT22 sensor, such as T=253°C and H=253% (let me add that the problem doesn't seem to come from the sensor because I also have a DHT11 which gives the same abnormal results) These abnormal results I got from my DHT22 sensor with my Heltek ESP32 V3 board occurred with the "basic" example you gave to monitor a DHT 22 sensor on the serial monitor of an IDE Arduino interface. As a matter of fact, i exactly used the connexion example you gave BUT for the data pin, I replaced the GPIO 27 (digital pin of your ESP 32 board) given in your example by the GPIO 46 of my Heltec V3 board (which should be a digital pin if I'm not mistaken but I would like you to confirm if you can) After this first problem of abnormal results of my DHT 22, I decided to "start again from scratch" with another of your examples (i.e. the present video dealind with "ESP 32 and asynchronous web servor") BUT I faced with another problem when I downloaded the "DHT unified sensor" library because I wasn't able to make any modification of the sketch because of a error message ("cannot edit in read-only editor") Then I opened the "preferences" of the IDE Arduino interface but didn't find any option to enable the edition of you "DHT unified sensor". So I have 2 questions: 1) how to enable the "edit mode" of your "DHT unified sensor" sketch so as to change the pin name and DHT sensor type? 2) could you confirm that the GPIO 46 of the Heltec ESP32 Lora V3 board is effectively a "digital" pin which suits for the connexion of the DHT22?
@kamalambrator4332
@kamalambrator4332 5 років тому
nice! thank you. just one question, how to run any dht in web server with nodemcu or esp32?
@RuiSantosdotme
@RuiSantosdotme 5 років тому
What do you mean? This web server is running on an ESP32 with a DHT sensor
@user-bg5jr4ji2z
@user-bg5jr4ji2z 4 роки тому
Hello. Thank you for your great work. How to add button for LED in this script?
@irfanpin-2255
@irfanpin-2255 4 роки тому
What is the range of it??
@paulwilkie5350
@paulwilkie5350 10 місяців тому
Hello Rui, I have been successful to replicate your ESP32 DHT11/DHT22 Asynchronous Web Server project, with the info in your great video. How can I convert the sketch to make the ESP32 modile an AccessPoint to communicate with my iPad as a WiFi client. My project will not have access to cell communication or internet access; such the need to make the ESP32 an access point to communicate data.
@mohammedthalha5006
@mohammedthalha5006 2 роки тому
Does it need internet to transfer that data
@dyaa6a
@dyaa6a 3 роки тому
how can we make the IP static?
@Du2025
@Du2025 2 роки тому
Xin chào bạn. tôi ở việt nam . tôi đã làm được. cảm ơn
@nipoanz7865
@nipoanz7865 5 років тому
Hola, una pregunta, con el esp32, cómo se puede configurar en modo (Accesa point) y de Cliente. Y como con esto puedo generar una red de esp32, gracias
@RuiSantosdotme
@RuiSantosdotme 5 років тому
You can set the ESP32 as an Access Point by following this tutorial: randomnerdtutorials.com/esp32-access-point-ap-web-server/
@hoanghaiduong8174
@hoanghaiduong8174 4 роки тому
hey, i have this error message: error: unterminated raw string const char index_html[] PROGMEM = R"rawliteral( ^
@MicroageHD
@MicroageHD 4 роки тому
Same
@Ankit-mq6em
@Ankit-mq6em 3 роки тому
Where to get this ip address ?
@ehsanulkarim
@ehsanulkarim 3 роки тому
I am trying to connect dht22 to esp32. But esp32 gpio can only tolerate 3.3v whereas dht22 output is 5v. How do you solve it?
@davidsantiagogalvan3795
@davidsantiagogalvan3795 2 роки тому
I think DHT22 can work with 3.3V, Because it worked for me. And if the sensor doesn't work you put it on VIN It could work like that
@nilatac115
@nilatac115 5 років тому
It is possible instead using the local ip ( 192.168.0.1 ) to use a domain that can be accessed over internet ?
@Flynn3778
@Flynn3778 4 роки тому
I would like to know this as well.
@gleglenopeone
@gleglenopeone 4 роки тому
If you have a web site you are familiar with adding blocks to the website you can add a block custom HTML to put sensor readings on the website with this HTML code , example like this ,first open the serial display and then power the board and see the ip address for the board on the display , not sure that 192.168.0.1 would be the boards ip address that just looks like the router address . once you have the ip enter it into the code like below also add “DHT sensor library” to the arduino code and the reading will be much more stable . when I used only the recommended libraries the reading would come and go but became constant after adding the DHT sensor library you may need to adjust the width and height number make it fit the display on the web page .
@gleglenopeone
@gleglenopeone 4 роки тому
put your boards ip address in place of this one
@glennpeckham7945
@glennpeckham7945 4 роки тому
@@Flynn3778 disregard what I said about the “DHT sensor library” that is already a recommended library , I made a mistake . the html code to add temperature readings to website works I use it , Im using it right now .
@user-ck4kb7cc6f
@user-ck4kb7cc6f Місяць тому
Hi
@bartekll7068
@bartekll7068 5 років тому
its not IoT right? its work only in local network?
@RuiSantosdotme
@RuiSantosdotme 5 років тому
Yes. It's only available in your local network...
@bartekll7068
@bartekll7068 5 років тому
@@RuiSantosdotme thx for answer. I hope that u will make it in near feauture ;) it is possible to control 12V fan by this ESP8266?
@yooli6829
@yooli6829 5 років тому
hello~ I am trying this project,but when it complied ,the arduino ide said that no such file ... If you ever change the the file's name of AsyncTCP?
@ivanciez
@ivanciez 4 роки тому
Any solution?
@Kaka-zs4cp
@Kaka-zs4cp 4 роки тому
ok, now i'm confused, "Rui Santos" sounds like a Brazilian name ( I'm brazilian), but boy ur accent sounds like russian... MISTER RUI I DEMAND EXPLANATIONS! TRIRTY TUE is russian accent!! you cannot fool me, you are a spy!!
@RuiSantosdotme
@RuiSantosdotme 4 роки тому
I'm from Portugal :-)
@MicroageHD
@MicroageHD 4 роки тому
His accent sounds 0% russian and 100% portugese. Never played CSGO?
@mohammednidal5206
@mohammednidal5206 3 роки тому
hey can i add this with my arduino uno board?
@AlexandreEglit
@AlexandreEglit 2 роки тому
Friend you could do this same project with local indication with Oled display 0.96 I2c SSD1306
Envío de datos a MySQL desde ESP8266 NodeMcu - Método POST
25:27
Proyecto IoT - Esp32 - Esp8266 - Servidor Web Asíncrono
22:58
Jadsa Tech
Переглядів 17 тис.
BRAWLER MUTATIONS WILL BREAK THE GAME! - Brawl Talk
09:34
Brawl Stars
Переглядів 25 млн
Завтра в школу с... | Шоу-квиз «Вопросики»
00:28
Телеканал СОЛНЦЕ
Переглядів 1,7 млн
ВИРУСНЫЕ ВИДЕО / Мусорка 😂
00:34
Светлый Voiceover
Переглядів 7 млн
ESP32 DHT Web Server Project
5:53
Enjoy Mechatronics
Переглядів 85 тис.
PlatformIO: All you need to know in 10 Minutes!
10:56
J's e-shack
Переглядів 277 тис.
ESP32 WebSocket Server
10:25
Anas Kuzechie
Переглядів 50 тис.
ESP32/ESP8266 Relay Module - Control AC Appliances (Web Server)
6:10
Rui Santos
Переглядів 248 тис.
12 Useful & Interesting ESP32 Projects for Beginners!
9:41
ToP Projects Compilation
Переглядів 563 тис.
6 Horribly Common PCB Design Mistakes
10:40
Predictable Designs
Переглядів 159 тис.
Using Arduino IoT Cloud with ESP32 | Is it better than New Blynk 🤔
19:41
The ULTIMATE Raspberry Pi 5 NAS
32:14
Jeff Geerling
Переглядів 1 млн
Getting Started with PlatformIO
51:54
DroneBot Workshop
Переглядів 595 тис.
Как открыть дверь в Jaecoo J8? Удобно?🤔😊
0:27
Суворкин Сергей
Переглядів 799 тис.
Broken Flex Repair #technology #mobilerepair
0:55
ideal institute aligarh
Переглядів 15 млн
The Worst Product I've Ever Reviewed... For Now
25:04
Marques Brownlee
Переглядів 7 млн