Tech Note 080 - ESP32/ESP8266 Data Logging Webserver

  Переглядів 60,254

G6EJD - David

G6EJD - David

6 років тому

Please see TN088 for the latest much improved version
An ESP32 or ESP8266 and suitable sensor, in this example an SHT30 are paired together to provide a small data logger with a Webserver front end that enables settings to be adjusted and data to be graphed. Data logs can also be viewed and copied out for external analysis. Data is stored in flash memory.
The code will conditionally compile for an ESP32 or ESP8266.
Code: github.com/G6EJD/ESP32_Data_L...

КОМЕНТАРІ: 206
@JohnTarbox
@JohnTarbox 6 років тому
This is one of the best videos on using the ESP32 I have seen. Very clear and easy to follow.
@quaternion-pi
@quaternion-pi 6 років тому
Thank you for such useful explanations. Time is valuable and I appreciate your sharing your expertise.
@uweri_3851
@uweri_3851 6 років тому
hello David, great job. I love your videos. These is good stuff for beginners like me. Hope you will continue.
@anders4u222
@anders4u222 6 років тому
Thank you a lot for all the work you put down into this project, very much appreciated. Have been playing around with a slightly modified version for some time now and your graph limit of about 80 doesn't seem to limit me. Currently my table_size is 500 records and the heap still has 111000 bytes free and there has been no problem uploading to Google charts. The pages loads snappy without any delay. Just wanted to point this out. Thank you again for all your ESP32 videos, have been a good source off information for me.
@G6EJD
@G6EJD 6 років тому
Anders 4u2 Thanks, have you checked out my latest versions of this I found out what was causes the size issues it was the length of the html/http packet sizes so I now periodically send packets when they grow above a certain size, this now allows unlimited data to be sent to google charts.
@hfe1833
@hfe1833 2 роки тому
SC
@MaxGoddur
@MaxGoddur 6 років тому
This setup is something I have been searching out and now that I have found your incredible code will break it down and attempt to learn it so I can modify it. This is a herculean task as I have not learned skills in either C++ or HTML coding. Wish me luck.
@G6EJD
@G6EJD 6 років тому
I give you fair warning the Google chart bits are 'exceptionally' complicated and any amendment is almost certainly likely to fail.You can modify the HTML colours and fonts, styles, but if you increase the volume of HTML data sent to Google then they complain. Good luck with your learning.
@grizzbeeuno2242
@grizzbeeuno2242 6 років тому
Another terrific project ... Thank You ... Your Time and Effort is Very Much Appreciated !!
@G6EJD
@G6EJD 6 років тому
Thank you I appreciate that as a lot of time and effort goes into the code and videos.
@billmckinzie
@billmckinzie 3 роки тому
Fabulous work sir. Thank you.
@jonathanr4242
@jonathanr4242 2 роки тому
Great video. I am making a power logger for a solar cell set up. I will adapt this.
@MaxGoddur
@MaxGoddur 6 років тому
Well, I have to say you created what I was looking for and now it is functioning as advertised. The really amazing part is the web browser window shows the dial style temp and humidity all wirelessly. Thank you so much for your support you have been very congenial.
@G6EJD
@G6EJD 6 років тому
Things to be aware of, the SD card is quite slow so if there is a power cut and on restart it begins to read the stored data so it carries on continuously but when there are a lot of records that process can take a long time and it won’t allow connections until it’s finished I’m thinking about 2-5 mins so you need to be aware of that don’t think it’s crashed it’s just busy. It will return to webserving eventually
@MaxGoddur
@MaxGoddur 6 років тому
Great good to know. It will be located in an enclosure that is part of a solar panel and battery and will not be a hurry up and read setup. But need to extend my wifi to reach the device as it is just outside the range of my 2.4Ghz signal.
@G6EJD
@G6EJD 6 років тому
You could get an ESP8266 with an external aerial they have a 12cm long diploe a bit like a Wi-Fi antenna and that will extend the range by a factor of two. Antennas are usually an add-on purchase depending on size and gain and need to be vertically polarised so pointing upwards. Often it is also a matter of trying different orientations to maximise signal, the antennas are directional, and similarly with the Router antennas if it has any.
@quaternion-pi
@quaternion-pi 5 років тому
@@G6EJD Another amazing project. (1) Any reasonable way to add an external antenna in place of the built-in esp32 antenna, vs purchase an esp32 with an existing external antenna connector? (2) Any reasonable way to solder additional usable flash memory (not SDI card) to an esp32? Thanks for all your efforts - you have taught me many useful concepts. 73 K6CCA
@G6EJD
@G6EJD 5 років тому
Not really and I’ve never seen any surface mount sockets for sale. The big problem would be getting a match and the feed point is under the shield, there are ESP32 modules with an external antenna socket. Adding memory would be a bit futile as the maximum addressable space is what’s generally already fitted at 32Mb or 4MBytes. To use the extra memory beyond that you’d need to use the Espressif zIDE and special techniques to access the additional storage, but to be honest 4MB is a huge amount of storage for a micro controller. 73 Dave G6EJD
@jadirsegura7778
@jadirsegura7778 3 роки тому
Hi David, is a great video, ask which pin to connect the DTH11 DATA cable to my ESP8266?
@edgarp1
@edgarp1 2 роки тому
Great work with this David. I needed a temperature logger to test a heater I have. This is perfect. The only thing I needed to do was also format the SPIFFS for an ESP32 as it didn't seem to do automatically for that like it does with an ESP8266. Maybe I missed something but that worked. Then it could write and read from the SPIFFS ok. Also I couldn't figure out how to change the timezone if using an ESP32 but no problem as I can fix that in Excel.
@G6EJD
@G6EJD 2 роки тому
I usually include a link in the source code to the timezone database to find the correct code to use, good luck with your project
@edgarp1
@edgarp1 2 роки тому
@@G6EJD thank you for your reply. I will try to understand how this works by looking at the time library and what line I need to add to set this code.
@G6EJD
@G6EJD 2 роки тому
It’s the timezone code setenv("TZ", Timezone, 1); Where timezone is in the form: //const char* Timezone = "MET-1METDST,M3.5.0/01,M10.5.0/02"; // Most of Europe //const char* Timezone = "CET-1CEST,M3.5.0,M10.5.0/3"; // Central Europe //const char* Timezone = "EST-2METDST,M3.5.0/01,M10.5.0/02"; // Most of Europe //const char* Timezone = "EST5EDT,M3.2.0,M11.1.0"; // EST USA //const char* Timezone = "CST6CDT,M3.2.0,M11.1.0"; // CST USA //const char* Timezone = "MST7MDT,M4.1.0,M10.5.0"; // MST USA //const char* Timezone = "NZST-12NZDT,M9.5.0,M4.1.0/3"; // Auckland //const char* Timezone = "EET-2EEST,M3.5.5/0,M10.5.5/0"; // Asia //const char* Timezone = "ACST-9:30ACDT,M10.1.0,M4.1.0/3": // Australia
@wei48221
@wei48221 6 років тому
This is awesome!!
@makerun6927
@makerun6927 4 роки тому
good presentation
@vinothram
@vinothram 2 роки тому
thank you good project
@VideoDetection
@VideoDetection 6 років тому
Another very useful video and its much appreciated! I really like the mini esp32 board you are using and want to get a couple for a project that needs a small footprint. Is the board you are using a TTGO MINI D1 ESP32/ESP-32S from Aliexpress? I could not find a Wemos 32S mini board so figure yours is the TTGO Mini. The 32S is the revision 1.0 board to the best of my understanding?
@VideoDetection
@VideoDetection 6 років тому
Found a ESP32 version of the board you were using, the MH-ET LIVE and ordered a couple. Discovered the ESP32S is simply new packaging for the ESP32 revision 1 chip, not an upgrade or bug fix.
@G6EJD
@G6EJD 6 років тому
The boards go under the name of MH-ET-Live ESP32 but the TTGO variants are the same. Most are now Rev.1 silicon.
@lintangwisesa
@lintangwisesa 6 років тому
Awesome Sir :)
@Q24H
@Q24H 6 років тому
Very excellent, will definitely try to reproduce and play with the code, and maybe adapt some features to my own projects, if I can. I built a GPS logger with a SD card module, and I wounder about the reliability of SPIFF vs SD cards, how do you feel about the two methods of logging?
@G6EJD
@G6EJD 6 років тому
I have had a SPIFFS based logger running for 18-months now and it's worked perfectly. As long as your not continuously writing to the same locations and at a very fast rate (~1,000,000 writes per location) then statistically it should last for a long time. The nature of most data logging is a slow update and write. You can read as many times as you want. You could upload data to Google Maps and get them to save it for you! All you need is lat, lon coordinates.
@MaxGoddur
@MaxGoddur 6 років тому
There is something I don't understand about Github and it concerning locating sketches. I know the name of the sketch and found it once before but now I will be darned if I can not locate the Fahrenheit sketch you posted. Would you be so kind as to place a link? I tried searching for it by name but was unable locate it.
@G6EJD
@G6EJD 6 років тому
YEs it is confusing, the trick is to go up one-level and choose 'Repositories' or click on my class-sign G6EJD and then the most recent changes are listed. Here it is: github.com/G6EJD/ESP8266-Autonomous-Graphing-Data-Logger About two down.
@MaxGoddur
@MaxGoddur 6 років тому
Have a question. Plan on using this in an enclosure just outside the range of my wireless signal is there a way to set up a wemos to extend the range of my wireless signal?
@G6EJD
@G6EJD 6 років тому
There is but I haven’t written my own in some respects unless there is no domestic power a cheap WiFi repeater is better.
@zikermu
@zikermu 5 років тому
Thanks a lot
@diamtakselaluemas8650
@diamtakselaluemas8650 Рік тому
thanks sir
@joeybushagour2612
@joeybushagour2612 6 років тому
Great video!
@MaxGoddur
@MaxGoddur 6 років тому
Found many SHT11 sensors on Ali Express and they are a bit more expensive if I pick one up will it plug and play with the existing code/hardware?
@G6EJD
@G6EJD 6 років тому
These are an almost direct replacement: www.aliexpress.com/item/Free-Shipping-1PCS-Digital-temperature-and-humidity-sensor-AM2305/1555843259.html?spm=2114.search0104.3.1.48021cbfVWeAzD&ws_ab_test=searchweb0_0,searchweb201602_4_10152_10151_10065_10344_10068_10130_10324_10342_10547_10325_10343_10340_10548_10341_10696_10192_10190_10084_10083_10618_10307_10301_10303_5711215_10313_10059_10184_10534_100031_10103_10624_10623_10622_5711315_10621_10620_5722415,searchweb201603_25,ppcSwitch_4&algo_expid=7dcb936d-7aa3-4f7f-97cd-15235709b309-0&algo_pvid=7dcb936d-7aa3-4f7f-97cd-15235709b309&transAbTest=ae803_5&priceBeautifyAB=0
@MaxGoddur
@MaxGoddur 6 років тому
Thank you ordered one should be here in the next month will let you know how it works out.
@MaxGoddur
@MaxGoddur 6 років тому
After getting the sketch to load and connecting to the IP address started viewing the logging graphs and noticed there was no data being shown. This leads to my next question. I have the DHT shield connected and I see you are using the SHT30. Is there a connections difference between these two shields causing my failure to see data being plotted on the graph? The data log file shows all zeros. Also, what would need to be done to store data on the micro card shield?
@G6EJD
@G6EJD 6 років тому
OK, Then you need one of these! github.com/G6EJD/ESP8266-Autonomous-Graphing-Data-Logger
@MaxGoddur
@MaxGoddur 6 років тому
Decided to try: ESP8266_DHT11_WEMOS_SHIELD_SD_LOG_Webserver_FINALc sketch. The shield called out on the silkscreen, DHT and the pictures I found showing the blue Temperature and humidity shield referred to it as DHT11 so that is the sketch I used but will try the other sketches and see if this fixes the problem. I am a GitHub Novice so don't know the steps to help when problems are found so I will share them here. expected '(' before 'isnan' expected ')' before 'dew_point' After making these corrections the sketch uploaded. Pretty dials and stuff looked good as in not showing zero but the serial port was reporting: Error reading temperature! Error reading humidity! Also, I did not have the micro SD card shield installed and it did report this and will add the card now. Hopefully, the card being absent does not cause the Reading errors I reported above.
@G6EJD
@G6EJD 6 років тому
DHT11 is the blue one and DHT22 is the White one and yes they both have different pins unless you swap the blue for the white one. It works without the SD shield but won’t save the data.
@kamilpadula7152
@kamilpadula7152 2 роки тому
i love this channel
@soovui
@soovui 6 років тому
Very interesting and useful knowledge. Great work and thanks a lot for sharing Mr. Goodman. Is that possible to make it on esp8266-12e to share with us? I am looking for a pulse KWH monitoring stuffs too.
@G6EJD
@G6EJD 6 років тому
soovui It will compile and work with the ESP8266 it has conditional compile statements so will work.
@HASEEBALI-kt9jq
@HASEEBALI-kt9jq 2 роки тому
Very interesting and useful knowledge. Thanks a lot for sharing Mr. Goodman, Great work. Is that possible to decrease the variable recording interval to 10miliSeconds?
@G6EJD
@G6EJD 2 роки тому
You could but the processor would spend more time servicing sensor data than serving the web pages and saving the data, it is difficult to calculate the overhead by static code analysis, so you’d need to gradually reduce the sample time to measure the effect on system performance then you’ll get an idea of how fast the sample rate could be, there are few situations that require sampling at that rate, it doesn’t sound sensible to be sampling a real world activity at that rate unless a high speed object or activity
@MaxGoddur
@MaxGoddur 6 років тому
For the past couple of hours have been enjoying the wifi connection ability via my web browser, in fact, moved the wemos into the garage keeping an eye on the signal strength for a given distance. Then It hit me. How is this device logging into my network if there are no entries in the sketch for my SSID or PASSWORD? And the credentials.h file is not found in the same directory as the ino file?
@G6EJD
@G6EJD 6 років тому
Once the ESP8266 has been used on a Wi-Fi and because it's using the WiFiManager library then it uses stored credentials on the ESP8266. If you do a ESP.Reset(); then it clears the credentials and that won't work anymore until you go through the Wi-Fi manager connection process or supply them in the file.
@G6EJD
@G6EJD 6 років тому
If you have plugged the DHT11 in above the ESP8266 you will notice in the readings some heat transfer via both conduction and convection and the only solution is to use say DuPont ca led or get a Wemos D1 mini dual base that solved nearly all heat transfer problems.
@typingcat
@typingcat 3 роки тому
So, the data is written on the on-board flash storage of the ESP8266? If I update the code and re-upload the code, the existing data file will be deleted, right? And how does it impact on the life-span of the flash storage to keep writing data on it? PS:According to this web page ( www.esp8266.com/viewtopic.php?f=32&t=6109 ) 1 year before the flash fails, if you write data for every second. So, it will be 15 years, if you write data for every 15 seconds, I guess.
@G6EJD
@G6EJD 3 роки тому
No if the file exists it’s not deleted, so survives most actions, if the programme size increases it’s possible for the flash area to be overwritten losing data. Yes flash life is affected but using a sensible logging time of once every 10-mins gives a long life of many years.
@allocedricbolamba4266
@allocedricbolamba4266 4 роки тому
what would i need to change in the code if i wanted to use a DHT11and can this work with the normal esp wroom 32 ?
@G6EJD
@G6EJD 4 роки тому
ALLO CEDRIC BOLAMBA, at the start of the code is the definition for the dht12 but commented out just remove the comment prefix and add one to the dht22 line
@fredrahmani6670
@fredrahmani6670 3 роки тому
Hi David, What it is needed to be changed if I want to use DHT11 or DHT22?
@G6EJD
@G6EJD 3 роки тому
Only the lines associated with setting up the sensor and actually read the values, so no more than 4 lines, add the library include in place of the sht31, then define the object replacing the set variant then DHT.begin then dht.readtemperature in place of sht.read...
@fredrahmani6670
@fredrahmani6670 3 роки тому
@@G6EJD Great! Thank you!
@uweri_3851
@uweri_3851 6 років тому
hello David, maybe a stupid question. I have some ESP8266 + extra memory 32M Flash. Can all of these 32M flash be used ?
@G6EJD
@G6EJD 6 років тому
It's a very good question. First off, are you sure it's 32MByte and not the standard 32Mbit (32/8=4MByte). The Arduino IDE does not support accessing flash > 4MByte, you'd need to use the esptool from Espressif to access any Flash greater than 4MB. There is very little written or covered on the subject and I suspect using the extra memory is going to be complex at least. Hopefully in time, the IDE will be updated to support larger storage now becoming more prevalent. All the memory is access via an SPI (serial) bus, so it should not be that difficult to extend. Currently you need to change the memory mapping for the ESP8266 to use any storage >4MB, which is essentially tell it there is extra available, but only in the esptool environment can this be done.
@uweri_3851
@uweri_3851 6 років тому
hello David, for my understanding it's 32Mbit (4MB)yte. It seems that Arduino 1.85 supports only 4Mbits (1 Mbyte) for SPIFFS. For my understanding you can't use these for Arduino today. Maybe usable for esptool or Atom. But my knowledge about these is horrible. Funny is that these modules are realy cheap. It cost by Aliexpress > 2€. As an result of these you get more memory for less money and modules work without any problem.
@G6EJD
@G6EJD 6 років тому
In Arduino IDE there is a 1M or 4M option for SPIFFS so you can use all of the Flash storage. I just looked at my data logger (SHT30) that has been running for about 14-months now and it's data store is reported at 4.1MBytes so it has clearly wrapped around, so that's using all the data for sure.
@DuroLabs85
@DuroLabs85 Рік тому
Hi great project, This was I'm looking for my project but I want to use a DHT-22 sensor how do I do that ??
@G6EJD
@G6EJD Рік тому
I added a DHT22 version, but it is a very old sensor and extremely inaccurate. See Github link in video description.
@DuroLabs85
@DuroLabs85 Рік тому
@@G6EJD Thanks mate for your reply :)
@packpack1432
@packpack1432 6 років тому
Hi, I would like to know how do I set a BME280 sensor instead of SHT30. Nice logger.
@G6EJD
@G6EJD 6 років тому
Luka Knol Hi, I have produced a bme280 version here. github.com/G6EJD/ESP-Sensor-Server-and-Clients the server will display any data received. If need any help let me know
@flp130rs
@flp130rs 5 років тому
Version with server and client requires two platforms with esp32, one for server and second for sensor. Is it possible to modify project from Tech Note 80 to use with BME280?
@Jackth3Gamer
@Jackth3Gamer 5 років тому
does Low View only works with Internet Explorer and Edge and not with Chrome?
@G6EJD
@G6EJD 5 років тому
I use Edge and IE I have not used Chrome but I see why not.
@zanajaf
@zanajaf 4 роки тому
Is this better than Thingspeak.com if my goal is just to store data in a folder in my PC?
@G6EJD
@G6EJD 4 роки тому
Zana Taher, on the basis that it does not need an internet connection then yes. Although at some point you’ll need to use the server to upload data to your PC or request data from the server by your PC both are supported in the code I’ve provided
@hojnikb
@hojnikb 2 роки тому
Could this be made to work with DH11 or LM35?
@G6EJD
@G6EJD 2 роки тому
Yes, in the read sensor section change the code to read the required sensor.
@gordonfrank
@gordonfrank 2 роки тому
Everything works fine including charts and dials but no log. Using ESP32 with SHT30 connected on a breadboard - no shield. Are others having this problem?
@G6EJD
@G6EJD 2 роки тому
So the LogView option does not work?
@subratabiswas8829
@subratabiswas8829 4 роки тому
Sir pls help, how store data into the sd card instead of spiffs & put ssid password in web page for logging for same system.thanks🙏
@G6EJD
@G6EJD 4 роки тому
To convert to SD card requires very little code change, add the SD library reference and replace spiffs with SD eg spiffs.begin SD.begin. I’m not sure what you mean about SSID password in web page, I need more information
@MaxGoddur
@MaxGoddur 6 років тому
After finding the formula to change the output from Celcius to Farheniet I have to ask how complicated it is to carry this out. Have looked at the code but it is a bit overwhelming for me?
@G6EJD
@G6EJD 6 років тому
I presume your using the SHT30 version. This is how you change all units to Deg-F: 1. On line 117 change Deg-C to Deg-F using tempC x 9 / 5 + 32 temp = sht30.cTemp*10*9/5+32; 2. Search for all instances of Deg-C and replace with Deg-F That's it.
@MaxGoddur
@MaxGoddur 6 років тому
Using SHT11 but will see if I can figure it out using your instructions above. Thank you very much.
@G6EJD
@G6EJD 6 років тому
Rud Dog it’s the same process just find the line where it reads temperature and convert it with x9/5+32 change all deg-c to deg-f
@MaxGoddur
@MaxGoddur 6 років тому
Failed to find the line in question so much so that my eyeballs are sore. I realize you said fo the SHT30 version and assumed the SHT11 was similar but getting the feeling they are not.
@G6EJD
@G6EJD 6 років тому
The code was written for the SHT-30 so there is no mention of the SHT-11 so I’ll need to produce a version for it but it will take a few hours. Standby.
@davinfarrell4886
@davinfarrell4886 3 роки тому
thanks for the video, i am sory but i amquite new in this topic. i have esp32 and some sensors and i want to save/store these datas offline, can i save/ store them in a wlan router? and in the end i can see the datas offline in form of charts/ graphs ( with html or javascript to charts the datas). thank you very much
@G6EJD
@G6EJD 3 роки тому
There’s no accessible storage on any wlan router, you can store data on the ESP32 flash or SD card but what you want to do is very complex, other than what I have provided in tn080 and others I’ve done
@davinfarrell4886
@davinfarrell4886 3 роки тому
​@@G6EJD Now i am involved in a project to build a ventilator machine for corona patients. The Sensor datas from the machine should be then showed as graphs/ charts. And we also want to see these charts/ datas on the website (when internet works) and also webbrowser (if internet offline) > when the internet works, we can send the datas and then strore/save them in the database/ website.. and with help with html and javascript, the sensor datas can be displayed as charts: when we go to our website address we will see these kind of charts and datas: THe problem i have is: > when offline, then we cannot send and save the datas in the website, so we need something how to save these sensor datas. with help of memory card we can save the sensor datas that collected from ESP32 in this memory card. Now i want to show/ display these data sensors in the webbrowser (e.g. when we open the webbrowser and type 168.192.1.1.1. for example). When i open my webbrowser and type the address, can these sensor datas that stored offline can be shown also as charts? because i cannot show the raw datas from sensor, the datas must be processed / calculated first and displayed as charts. My Skills iin this area also not great, i am a newbie. so thank you very much for your attention
@G6EJD
@G6EJD 3 роки тому
I have produced a project that can do most of what you want the data logging webserver no external WiFi required plus SD card or flash storage
@davinfarrell4886
@davinfarrell4886 3 роки тому
@@G6EJD Data logging webserver, okay, i alr heard that too, some project use datalogging webserver to save their data online. do u have a liink of your video with data logging? it is a bit confusing to me, i didnt quite understand the logic/ the structure how this kind of system works.
@RoyalTech_2024
@RoyalTech_2024 4 місяці тому
Hi sir, Great video. I am trying to use a generic ESP8266 and DE18B20 sensor only, my question is how many days temperature data can I record using this project, after how many days the data will be overwritten automatically?
@G6EJD
@G6EJD 4 місяці тому
Each reading requires 4-bytes so an 8266 has 80kB of flash so 80000/4= 20000 readings, if using sd-card storage then indefinitely
@RoyalTech_2024
@RoyalTech_2024 4 місяці тому
@@G6EJD Thanks for the reply. Isn't the ESP8266 flash memory 4MB? Is it 80kb? Is sd card option enabled in this project code? Can I just connect an sd card and will the program automatically detect it? Or is there an sd card version of this same project you have done?
@G6EJD
@G6EJD 4 місяці тому
@@RoyalTech_2024 I have produced an sd-card version too
@RoyalTech_2024
@RoyalTech_2024 3 місяці тому
@@G6EJD Ok sir. Do you have a link to that? And how many readings can I store using ESP32 instead of ESP8266? Also couldn't understand you said ESP8266 storage is 80kB not 4MB?
@G6EJD
@G6EJD 3 місяці тому
@@RoyalTech_2024 you are probably getting confused between RAM and programming space, the ESP32 has 512k of RAM, examples here github.com/G6EJD/ESP8266-Autonomous-Graphing-Data-Logger/blob/master/ESP8266_SHT30_WEMOS_SHIELD_SD_Log_Webserver_FINALc.ino
@Electromaniaworld
@Electromaniaworld 6 років тому
I tried to use datalogging on my esp32 wemos board. after that i have probably bricked my board. this is about one problem i am facing, in case you mighthave encountered same issue - i have been using esp32 with bme680 and logging data into its SPIFFS memory, i left it running overnight and in the morning, the esp32 wemos board is not responding to any programming ide. i get following error - esptool.py v2.1 Connecting........__ Chip is unknown ESP32 (revision (unknown 0xe)) Uploading stub... Running stub... Stub running... Configuring flash size... Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB Compressed 8192 bytes to 47... A fatal error occurred: Timed out waiting for packet content A fatal error occurred: Timed out waiting for packet content I have raised issue on github here - github.com/espressif/esptool/issues/263 Any suggestions ?
@G6EJD
@G6EJD 6 років тому
Interesting, mine does not do that, it cycles around. I have had a unit running since Nov'17, it still is, and the FLASH for SPIFFS should be segmented and not write out of bounds, BTW mine is a Rev.1 silicon, but from the release notes I've seen that should make little difference. I wonder if the SPIFFS implementation is untested when the SPIFFS become full, it is possible. Have you tried a ESP.reset() and ESP.clearConfig(); but then if you can't communicate with the device that's odd as I thought that was hardcoded. Thanks for letting us know. BTW I have a an ESP8266 version running and that has twice filled up the SPIFFS and run around again without any issues. I know the libraries are different, so I'm thinking a library issue.
@Electromaniaworld
@Electromaniaworld 6 років тому
thanks. i dont know the cause yet, but i just somehow managedto remove wroom 32 board from my wemos board and put new board i had. now new one works. why first one got damaged , remains mystery to me.
@G6EJD
@G6EJD 6 років тому
Today I have been testing the arrangement and forcing it to wrap around and the results are the same as the esp8266 nothing happens. I have not inspected the differences between fs.h and FS.h but I expect the latter for the ESP32 to be almost identical. On one of ESP8266 loggers the file size reports on screen that it is over 6MB but there is only 3MB allocated so there is something wrong with the filing system. I’ll investigate some more.
@Electromaniaworld
@Electromaniaworld 6 років тому
thanks for letting me know your trial results. may be issue is something else and not SPIFFS related, it could be that some other parameter and my change of sketch both coincided .... before failure. i have now big suspicion that something related to my battery power might have done damage to it. i had used 18650 battery to run it over night.... if you go to my first githup post, i had some communication there, apparently arduino IDE sets some different memory allocation. may be that is the cause of your memory capacity difference.
@Electromaniaworld
@Electromaniaworld 6 років тому
github.com/espressif/esptool/issues/263 this post of mine and subsequent communication with people might be of your interest :)
@dr.kishorkumar256
@dr.kishorkumar256 4 роки тому
Great project..Thank you. But the Log view page is not loaded either in internet explorer, not in chrome ..would you please help me with that?
@G6EJD
@G6EJD 4 роки тому
You should try simulating a client and make sure the data is received, you get confirmation on the serial port that the data was received. Then the log should show up.
@G6EJD
@G6EJD 4 роки тому
If your using the ESP8266 you will find the latest compiler build 2.5.0 does not work for many network functions, the last good build was 2.4.2
@amusementnl
@amusementnl 4 роки тому
i have a problem with codering: credentials.h: No such file or directory, what can i do?
@G6EJD
@G6EJD 4 роки тому
Did you download it, place in the same folder as the sketch? Edit the content to match your information
@amusementnl
@amusementnl 4 роки тому
@@G6EJD i have added the credentials.h file, but it say every time same error :(
@ramprasatheee6549
@ramprasatheee6549 2 роки тому
Sir, I am using ESP32 and SHT30 sensor for data logging. Datalog view web page not loading. I got the following error. All other page woks fine. Need you Help 11:47:50.869 -> E (26) SPIFFS: mount failed, -10025 11:47:50.869 -> E (26) SPIFFS: mount failed, -10025 11:47:50.869 -> SPIFFS failed to start...
@G6EJD
@G6EJD 2 роки тому
Have you enabled SPIFFS when you set the compiler options?
@ramprasatheee6549
@ramprasatheee6549 2 роки тому
@@G6EJD thank you, sir, I have enabled SPIFFS and got the result
@hritambasak6782
@hritambasak6782 4 роки тому
I am trying to log data from analog pins of arduino uno to a sd card with a sampling speed 50kHz..I used the code Analogbinlogger available in the sdfat examples..Also i want to display the stored data on sd card to a webserver in real time..Can u make a video or help me in this topic?
@G6EJD
@G6EJD 4 роки тому
It not really possible with an UNO as you need to take a sample every 20uS and then store it to SD-Card and then get back to take the next reading. Then displaying in real-time from a web server is not possible at that speed, sorry. It's a very ambitious project unless your programming and technical skills are of a very high order.
@hritambasak6782
@hritambasak6782 4 роки тому
@@G6EJD no sir,i have already done it,the data logging is perfectly operational..U can just check the example given in sdfat and just change the sampling frequency to 50kHz..At present i am working on sound,therefore the i kept the frequency to 45kHz,but it acts perfectly on 50kHz.
@hritambasak6782
@hritambasak6782 4 роки тому
@@G6EJD my doubt is in the 2nd part..Real time data display on webserver using nodemcu from sd card
@G6EJD
@G6EJD 4 роки тому
Not and run a web server too
@dand8282
@dand8282 6 років тому
you can plot thousands of points with google charts by initializing an empty dataset then adding your points with charts' JS api, instead of hard-coding the data into the source.
@G6EJD
@G6EJD 6 років тому
You can yes, but for some reason Google are bulking at the HTML headers, styles, body, footers, etc. It used to work OK with an ESP8266, If I drop all the HTML and just upload the scripts and data it works a little better. No data is hard coded in the programme. All the data for the webserver has to be issued in one page and I suspect I have reached the 16,384 String character limit with datasets more than 72 which of course is formed by lots of text like ['nnn','oo.o','pp.p'] for each point. I think 72 points is more than adequate for a temperature/humidity data logger.
@gahramankeivani6521
@gahramankeivani6521 4 роки тому
hi David thanks for explanations. i have question is there a way to make the project completely offline ?
@G6EJD
@G6EJD 4 роки тому
Yes just change the WiFi mode to station ((STA) and set your own IP address if required, there are plenty of examples on how to do this, so just one line to change WiFi.begin(STA)
@gahramankeivani6521
@gahramankeivani6521 4 роки тому
@@G6EJD thanks for answering David. i did WiFi part but it seems internet connection is needed because of google charts is there a easy way around it?
@G6EJD
@G6EJD 4 роки тому
gahraman keivani, I forgot about google charts, so there is no solution other than using java and the browser to do the drawing, but that’s a lot of work to do to implement.
@gahramankeivani6521
@gahramankeivani6521 4 роки тому
thanks David for your time .
@MaxGoddur
@MaxGoddur 6 років тому
I don't know how reliable the DHT11 is but this morning after getting the Fahrenheit display working (Thank you G6JD) it suddenly started showing a temperature of 26F and it is actually 41F outside. Anyone had this type failure of DHT11s? To be fair it is mounted in a wooden box and temps inside the box reache 100F.
@G6EJD
@G6EJD 6 років тому
Well the DHT11 series of sensor whilst they look like they can be mounted outside in contact with the atmosphere, can't in fact there are few if any that can, the problem is with condensing water vapour. Some of the SHT3x series (30, 31 or 35) can be used outside, but only when fitted with a special micron permeable shield see my BME680 video to see what that looks like, or you can buy a DHT11 inside a special sintered / spheroidal bronze permeable housing so that it can come into contact with humidity but only a very fine vapour, when not fitted, water forms on the detection plates and it stops working, sometimes restarts when it's dried up. See here for an example: www.aliexpress.com/item/Soil-temperature-and-humidity-sensor-SHT10-agricultural-greenhouse-sheds-nursery-send-routine-new/32766408137.html?spm=2114.search0104.8.79.518f40f5sstLpr&priceBeautifyAB=0
@G6EJD
@G6EJD 6 років тому
Also: www.aliexpress.com/item/New-Electric-Different-Quality-Protection-type-temperature-and-humidity-sensor-temperature-and-humidity-sensor-built-in/32704749370.html?spm=2114.search0104.8.34.518f40f5sstLpr&priceBeautifyAB=0
@MaxGoddur
@MaxGoddur 6 років тому
So to expand on the enclosure in which this sensor is mounted, it is inside a wood box with a cover there are holes drilled at about a 45-degree angle to allow air to flow and to prevent water from entering the enclosure. But moisture can possibly get in and form dew on the parts and this is the possible culprit. If this is the case then it will be time to switch out to a more of an outdoor sensor. Off I go to review the sensor on your link. Thank You.
@G6EJD
@G6EJD 6 років тому
Why not try the sensor indoors over night or for more time ideally. Yes although the wholes won't let water in, the high humidity levels will condense on the sensor and cause it to react like it has.
@MaxGoddur
@MaxGoddur 6 років тому
Fully agree and at this time I have one sitting on my desktop and the other sitting outside only the one outside has shown temperature errors. I am in full agreement with you I need an outdoor tolerant sensor. Will need to find one for which your code will accommodate the sensor selected. The thought came to mind concerning how these manufacturers are protecting the sensor without blocking its intended purpose. Maybe this could be duplicated with the dht11?
@subratabiswas8829
@subratabiswas8829 3 роки тому
Sir, it is possible to convert Access Point Webserver. If possible how to convert. Thanks.
@G6EJD
@G6EJD 3 роки тому
Yes, just change the WiFi mode to AP it is widely discussed, it’s a single line command.
@subratabiswas8829
@subratabiswas8829 3 роки тому
@@G6EJD After change wifi mode graph & dial are not showing, other functions work properly.
@G6EJD
@G6EJD 3 роки тому
Yes, this is because the system no longer has access to google to draw the graphs! Unfortunately you can’t have everything!
@karthiknatarajanbaskaran9844
@karthiknatarajanbaskaran9844 3 роки тому
very nice can we store log data per second ?
@G6EJD
@G6EJD 3 роки тому
You could try, but the ESP processors don’t have the capacity to do that much
@sangarmutusamy9801
@sangarmutusamy9801 4 роки тому
hi david, my server cant connect to wifi, can you pls help?
@G6EJD
@G6EJD 4 роки тому
Have you selected / entered the correct IP address for your router? What is the base address of your router and are you using a similar address, for example if it is 10.0.0.1 then eg use 10.0.0.99
@sangarmutusamy9801
@sangarmutusamy9801 4 роки тому
@@G6EJD Yup..got it, its working fine now. Thankd david.
@ramprasatheee6549
@ramprasatheee6549 Рік тому
Sir, How to Change the Time of Data Logging The time that the data is stored is -5.30 IST. I am originally from INDIA.
@G6EJD
@G6EJD Рік тому
Have you adjusted the timezone setting in credentials?
@ramprasatheee6549
@ramprasatheee6549 Рік тому
@@G6EJD No, exactly where to change sir, I have changed the start time
@G6EJD
@G6EJD Рік тому
@@ramprasatheee6549 setenv("TZ", "GMT0BST,M3.5.0/01,M10.5.0/02",1); you need the Indian time zone code, check out GitHub for the codes.
@user-pg6kd8ro4b
@user-pg6kd8ro4b Рік тому
Sir , How to contact you?
@G6EJD
@G6EJD Рік тому
g6ejd.dynu.com then contact
@subratabiswas8829
@subratabiswas8829 4 роки тому
Sir pls help,After downloading your Data Logging program and successfully loading it onto my ESP32 board,but there was a two problem.One is time & date not update properly and another one Setup value not accepted by the browser.Thanks in advance. 23:18:27.000 -> SPIFFS Started successfully... Connecting to: TP-LINK Use this URL to connect: 192.168.1.105/ 23:18:28.546 -> Webserver started... 23:18:33.047 -> 03723 318 411 08/04/70 17:12:56 23:18:33.235 -> Restored data from SPIFFS 23:18:35.250 -> Logging started at: 08/04/70 17:48:40
@G6EJD
@G6EJD 4 роки тому
Have you checked your DST / env variable, please give more information about the other issue. Does my example code run noting the time would be different?
@subratabiswas8829
@subratabiswas8829 4 роки тому
@@G6EJD yes, noting time is different.5:30 hrs and another issue is solved
@G6EJD
@G6EJD 4 роки тому
subrata biswas, there is an example of setting Indian DST at 5.5 hrs in the source code
@subratabiswas8829
@subratabiswas8829 4 роки тому
@@G6EJD ok sir, I will try and reply u later. Thanks for your quick response 🙏
@subratabiswas8829
@subratabiswas8829 4 роки тому
@@G6EJD void StartTime(){ configTime(0, 0, "pool.ntp.org"); setenv("TZ", "UTC-05:30", 1); UpdateLocalTime(); } Sir problem was not solve,pls help 17:25:16.992 -> SPIFFS Started successfully... 17:25:16.992 -> 17:25:16.992 -> Connecting to: TP-LINK 17:25:17.554 -> ..WiFi connected at: 192.168.0.105 17:25:18.351 -> Thu Apr 09 2020 17:24:54 17:25:18.351 -> WiFi connected.. 17:25:18.351 -> Webserver started... 17:25:18.351 -> Use this URL to connect: 192.168.0.105/ 17:25:18.351 -> Webserver started... 17:25:23.460 -> 4163 325 501 09/04/20 11:27:42 noting date is ok but time is difference
@suckerburgg7010
@suckerburgg7010 3 роки тому
how can i change the time stamp according to my location
@G6EJD
@G6EJD 3 роки тому
You need to change the time zone value there is a link to get your region code
@suckerburgg7010
@suckerburgg7010 3 роки тому
​@@G6EJD Thank you for your reply. i already change but the date and time in calcDateTime() fuction still not change. it change only in UpdateLocalTime() and GetTime() fuction.
@G6EJD
@G6EJD 3 роки тому
Which processor are you using, if the ESP8266 it can take a long time for time to start like 30-49 seconds. What time server are you using?
@suckerburgg7010
@suckerburgg7010 3 роки тому
@@G6EJD i use esp32. my time zone is utc-7. i already change but the time stamp in log view still the same value.
@G6EJD
@G6EJD 3 роки тому
What time code are you using if in error then this is likely the problem. Try my code in the time zone it should set the clock to right now 09:45 as it will switch the DST on
@ZoomtronicBlogspot
@ZoomtronicBlogspot 2 роки тому
Google changed API, nothing works anymore, no graphs, only gauges
@G6EJD
@G6EJD 2 роки тому
They do this a lot, I’ll need to figure out what’s different and correct it.
@G6EJD
@G6EJD 2 роки тому
I’ve corrected that now, all three google calls had been changed
@MrAnd361
@MrAnd361 5 років тому
C:\Users\and\Documents\Arduino\esp32-WebServerCodeWithCSS\esp32-WebServerCodeWithCSS.ino:37:25: fatal error: credentials.h: No such file or directory how download this library? - credentials.h
@G6EJD
@G6EJD 5 років тому
Andrey Kg have you downloaded the credentials file in the github and placed it in the same folder as the sketch as it says in the reader? Modify the details for your wifi
@MrAnd361
@MrAnd361 5 років тому
@@G6EJD oops! github.com/G6EJD/ESP32-OTA-Example/blob/master/credentials.h i create this file and all ok. thanks, sir!
@MaxGoddur
@MaxGoddur 6 років тому
If you have a minute could you help out a rookie: Arduino: 1.8.5 (Windows 8.1), Board: "WeMos D1 R2 & mini, 80 MHz, 115200, 4M (3M SPIFFS)" C:\Shortened path\ESP32_SHT30_SPIFFS_DataLogger_01.ino:37:88: fatal error: WEMOS_SHT3X.h: No such file or directory #include // github.com/closedcube/ClosedCube_SHT31D_Arduino ^ compilation terminated. exit status 1 Error compiling for board WeMos D1 R2 & mini. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
@G6EJD
@G6EJD 6 років тому
Ok try google closedcube github and you’ll find the library there download the zip and uncompress then place the folder in your ide libraries folder then it should compile ok
@G6EJD
@G6EJD 6 років тому
github.com/wemos/WEMOS_SHT3x_Arduino_Library
@MaxGoddur
@MaxGoddur 6 років тому
Great that worked like a charm. Now I get this error to which I applied what you just taught me but it did not work for this error. Can you explain why? Arduino: 1.8.5 (Windows 8.1), Board: "WeMos D1 R2 & mini, 80 MHz, 115200, 4M (3M SPIFFS)" C:\Users\myhomedir\Desktop\IOT_STuff\WEmos\ESP32_Data_Logging_Webserver-master\ESP32_SHT30_SPIFFS_DataLogger_01\ESP32_SHT30_SPIFFS_DataLogger_01.ino:39:25: fatal error: credentials.h: No such file or directory #include "credentials.h" ^ compilation terminated. exit status 1 Error compiling for board WeMos D1 R2 & mini. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
@G6EJD
@G6EJD 6 років тому
If you look in Github there are two files that need to be in the same folder the .ini and credentials.h and when you start the IDE you can select the credentials tab and update your SSID/password.
@MaxGoddur
@MaxGoddur 6 років тому
Sorry, I give up after getting past the last error I ran into another. Arduino: 1.8.5 (Windows 8.1), Board: "WeMos D1 R2 & mini, 80 MHz, 115200, 4M (3M SPIFFS)" C:\Users udy\Documents\Arduino\libraries\Wire\utility\twi.c:25:20: fatal error: avr/io.h: No such file or directory #include ^ compilation terminated. exit status 1 Error compiling for board WeMos D1 R2 & mini. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
@MaxGoddur
@MaxGoddur 6 років тому
After downloading your Data Logging program and successfully loading it onto my Wemos mini D1 I pushed the chair in and took a break. This morning decided to run the program and see how it was functioning. Ran into some oddities so thought rather then typing it out would make a video. ukposts.info/have/v-deo/i5h8d2mum3himGg.html
@G6EJD
@G6EJD 6 років тому
It says the video is unavailable- typical problems are your router not allowing the ESP to stay connected that’s a roger setting problem under the heading of leases often a router will not allow a continuous connection and renew the lease and IP address after a set period of time so you my not find it where you last used it.
@MaxGoddur
@MaxGoddur 6 років тому
Sorry tried to make it private so only you could see it and appears that is not what "private" means. Here is the public link. ukposts.info/have/v-deo/q5J0f6NtepV8zGw.html
@G6EJD
@G6EJD 6 років тому
Ok thanks I can see what the problem is there are two your browser can’t find the address after the inputs it shows 0.0.0.0 it works ok on ie11 I think your not using that so I’ll fix that for you and I can see the range for the dials needs to be converted to deg-f as a moderate temperature is being shown in red so that needs the conversion doing - watch out it may take a few hours or hopefully less.
@MaxGoddur
@MaxGoddur 6 років тому
There is no hurry currently using your program on my outside station and once this is functional, plan on moving it to that location. Going to be great to see the temp in Fahrenheit. Find it odd as much help as you are free with that you don't have a donate button? You are one of the most responsive person I have run into online.
@G6EJD
@G6EJD 6 років тому
OK I have changed the input method and tested it on IE11, EDGE, Chrome and Firefox all working OK. This is the new version on Github: ESP8266_DHT11_WEMOS_SHIELD_SD_Log_Webserver_Deg-F_v02.ino Any problems let me know. I also fixed the dial range from 5-125 deg-F you can change those I think it's fairly self-evident on line 337: webpage += "var gaugetempOptions={min:5,max:125,yellowFrom:5,yellowTo:32,greenFrom:32,greenTo:90,redFrom:90,redTo:125,minorTicks:10,majorTicks:['5','22','39','56','73','90','107','124']};";so you could go: webpage += "var gaugetempOptions={min:0,max:130,yellowFrom:0,yellowTo:32,greenFrom:32,greenTo:90,redFrom:90,redTo:130,minorTicks:10,majorTicks:['0','16','32','48','64','80','96','112']};";
@MaxGoddur
@MaxGoddur 6 років тому
OK, finally go the sketch to load and typed in 192.168.1.30:8266 This site can’t be reached 192.168.1.30 took too long to respond. Search Google for 192 168 8266 UPDATE: Connecting to: your ssid ...................... Failed to connect to a Wi-Fi network Where do you place the SSID and USER NAME? BTW when I remembered to check the serial port monitor I go this: 15 New Record Added 16 New Record Added 17 New Record Added 18 New Record Added 19 New Record Added 20 New Record Added
@G6EJD
@G6EJD 6 років тому
SSID and Password are in the crednetials file on the tab in your IDE near the menu. You connect to a server with (i don't know what IP your getting but from your example) 192.168.0.30/ don't add 8266 becuase that changes the address. Use the address it prints out in the serial port diagostics. It's adding records so it's running. You've got the address wrong.
@MaxGoddur
@MaxGoddur 6 років тому
Thank you for being so helpful the sketch is now running and I learned you can store password and ssid in a separate file. My C++ coding is non-existent and just started learning Python3 but can't seem to find IOTs running as commonly as C++. Well out of the box python3.
@Fifury161
@Fifury161 4 роки тому
You almost sound normal at x2 speed....
@G6EJD
@G6EJD 4 роки тому
Fifury161, well I’m used to delivery at a pace that enables learning and knowledge transfer to take place, clearly not fast enough for some, but then that will always be the case, for some too fast, for others too slow!
@Fifury161
@Fifury161 4 роки тому
@@G6EJD Indeed - you can't please all of the people all of the time! Thank you for taking the time to reply.
The Best Data Logger?
12:37
Paul's Projects
Переглядів 5 тис.
ESP32 Guide 2024 | Choosing and Using an ESP32 Board
41:06
DroneBot Workshop
Переглядів 199 тис.
Артем Пивоваров х Klavdia Petrivna - Барабан
03:16
Artem Pivovarov
Переглядів 2,9 млн
McDonald’s MCNUGGET PURSE?! #shorts
00:11
Lauren Godwin
Переглядів 18 млн
#121 SPIFFS and JSON to save configurations on an ESP8266
11:30
Andreas Spiess
Переглядів 111 тис.
Tech Note 137 - ESP32 a further insight into using the serial ports
6:43
Tech Note 154 - ESP File Server using the Asynchronous Webserver
9:15
G6EJD - David
Переглядів 13 тис.
#9 Arduino Data Logger with Direct Input to Excel
10:12
Andreas Spiess
Переглядів 127 тис.
12 Useful & Interesting ESP32 Projects for Beginners!
9:41
ToP Projects Compilation
Переглядів 564 тис.
ESP8266 Data Logging and Web Server Viewer
3:30
Tech Talkies
Переглядів 5 тис.
10-channel voltage logger with display and SD card
56:59
Curious Scientist
Переглядів 1,4 тис.
СКОЛЬКО ЕЩЕ БУДЕТ АКТУАЛЕН IPHONE 13?
14:10
DimaViper Live
Переглядів 51 тис.