ESP32 DHT11/DHT22 Asynchronous Web Server (auto updates Temperature and Humidity)
HTML-код
- Опубликовано: 2 авг 2024
- 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 Наука
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/
Hi Rui, can I use this for my esp8266 wemos d1 mini?
@@edudz151186 for the WeMos, you need to use this code instead randomnerdtutorials.com/esp8266-dht11dht22-temperature-and-humidity-web-server-with-arduino-ide/
Hello sir I'm getting ip address of esp32 but when I'm putting in browser it is not loading whyyy????
i don't understand how this type of videos have less views that trash videos , excellent thanks :)
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.
One of the best video tutorial I have ever seen. Well done!
Thank you! I'm glad you liked it.
Bro your tutorials are soo amazing good! Never seen anything like this before on youtube ! Ty soo much :)))
I love the detailed voice-over explaination.👍👍
Just awesome explanation! Thank you!
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. ;)
Excellent tutorial. Thanks very much for sharing!
EXCELENT..!!!..., thanks for sharing and the mailing list
Thanks, this video helped me a lot :)
Thx mate, this was so useful for me!
Grato por compartilhar conhecimento! Trabalho muito bem elaborado, aprendi muito.
Great video, thanks!
Thank you so much for this video. Very good.
Awesome tutorial, i subscribed immidiately :)
Happy to hear that! Thanks for watching
thank you so much bro u saved me from a lot of researches from google
did you do the example ???
did it work ?????
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?
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?
Muito bom este vídeo, muito bem explicado só é pena não ser em português.
Very good thanks.
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
thank you
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
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!
Can you please make a video on ESP32CAM to send files over Bluetooth considering Aithinker's builtin Bluetooth. Thanks
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" ?
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!
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?
Hello,Nice tutorial! How can i use for a hc-sr04 sensor?
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
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?
eXCELENT! How can I do the same but with 4 sensors (4 esp32) I need all of them shows on same page...
You are my god
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?
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.
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 ?
Hi Rui! Great video, ¿can you make a video with ESP8266? Thanks.
Amazing
Thanks for watching!
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?
is it possible to use 2 sensors(dht22) in 1 esp32?
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?
Can you do it as an access point?
Great vidéo thanks.
i tried to do the same but the page would not referech automaticly anny help please !!!
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?
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
How could I change the background color of the web page according to value of the Temperature ?????
How do you know what board to use?
Very Good, How to Access this IP outside wifi? from the mobile location? Any Help!!
What is the range of it??
Can you make update? Temperature and humanity graph?
how i make that with fix IP? for example 192.10.1.1 then i login in with that ip?
Thank you from Greece
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?
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
Rui Santos, I have problem "Error compiling for board ESP 32 Dev Module" please i need solution
It is possible to have fixed website name instead of IP address? Is Arduino library capable of that?
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.
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)
i want to build web server using arduino uno. is this possible? can you help me out with it
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
how can we make the IP static?
Hi. Thx for this titorial.
I need control 4 buttons/relay also.
What is the best node to abord this?
I too need this. For 8channel block. Following
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
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.
Does it need internet to transfer that data
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
Friend you could do this same project with local indication with Oled display 0.96 I2c SSD1306
Can I see this output only ip address? And how to store pc? Please help
Iam trying to do same from last 1 week still cannot can help me how to connect to you
Xin chào bạn. tôi ở việt nam . tôi đã làm được. cảm ơn
Hello. Thank you for your great work. How to add button for LED in this script?
nice! thank you. just one question, how to run any dht in web server with nodemcu or esp32?
What do you mean? This web server is running on an ESP32 with a DHT sensor
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.
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
You can set the ESP32 as an Access Point by following this tutorial: randomnerdtutorials.com/esp32-access-point-ap-web-server/
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?
Where to get this ip address ?
hey, i have this error message: error: unterminated raw string
const char index_html[] PROGMEM = R"rawliteral(
^
Same
It is possible instead using the local ip ( 192.168.0.1 ) to use a domain that can be accessed over internet ?
I would like to know this as well.
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 .
put your boards ip address in place of this one
@@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 .
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?
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
Hi
its not IoT right? its work only in local network?
Yes. It's only available in your local network...
@@RuiSantosdotme thx for answer. I hope that u will make it in near feauture ;) it is possible to control 12V fan by this ESP8266?
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?
Any solution?
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!!
I'm from Portugal :-)
His accent sounds 0% russian and 100% portugese. Never played CSGO?
hey can i add this with my arduino uno board?
Friend you could do this same project with local indication with Oled display 0.96 I2c SSD1306