Chat freely about anything...

User avatar
By Sirquil
#81322 03/24/2019

Thank you RichardS for your help with the readFile Function.

ESP32 'Weather_View.ino' project web site.

Have finished work on "Weather_View.ino." Features added include Rain Gauge support, GPS Longitude, GPS Latitude, GPS Altitude, GPS Time, File Transfer using FTP (Filezilla), and Over the Air (OTA) updates.

Existing features of "NTP_Time-Synced_Web_Interface.ino" kept; except for NTP time keeping.

GPS time is used to set the DS3231, Real Time Clock; which can be set at predetermined interval.

"NTP_Time_Synced_Web_Interface.ino" has been renamed "Weather_View.ino."

Zipped file includes "dataCollector.php" to be uploaded to a hosted web site for using webInterface function of sketch.

Project used a ESP32 Dev. Edtion Board, purchased from "Adafruit.com." GPS Module used is a "NEO m8n."

Rain Gauge code and EEPROM routines were developed by Haroon552.


William
Attachments
ESP32 Project file; port of "NTP_Time-Synced_Web_Interface.ino" with some new features.
(18.39 KiB) Downloaded 12 times
User avatar
By Sirquil
#81452 03/30/2019

Fisished work on latest updates to project. Timing is now based on GPS Time with a DS3231 RTC for backup, should GPS Time be invalid.

ESP32 based web server

Features of "Weather_View_Timezone.ino," ESP32 Project.

1. RTC with GPS Time update; used for 15 minute time interval, date-time stamping. Log file gets renamed, every day. Renamed in the format "LOGxxyyzzzz" xx being the Date, yy being the Month and zzzz being the Year.

2. Dynamic web page of current observations for Last update time and date, humidity, dew
point, temperature, heat index, barometric pressure (both inches of Mercury and millibars.)

3. Server files are listed as web links; clicking link prompts for "Open with/Save as."
"FAVICON.ICO", and "ACCESS.TXT" are listed; however, they are for internal use and are restricted.
"Opened with/Save as," result of clicking link produces "404 Page not found."

4. LOG.TXT file is appended every 15 minutes with the latest update; storing data from Dynamic
web page.

5. DIFFER.TXT stores the difference in Barometric Pressure for the last fifteen minutes. Only
a difference of equal to or greater than .020 inches of Mercury are logged with difference,
date and time.

6. URL file names other than ones defined in the Sketch produce "404 Page not found." Methods
other than "GET," produce "405" message and exits current request.

7. Optional, Audible alert from Piezo electric buzzer when there is Barometric Pressure difference of
.020 inches of Mercury. I am interested in sudden drop of Barometric Pressure in a 15 minute
interval. Serve weather more likely with a sudden drop. Difference of .020 inches of Mercury
point is set for my observations to log and sound audible alert; not based on any known value
to be associated with serve weather.

8. Optional, two-line LCD Display of Barometric Pressure, in both inches of Mercury and millibars.

9. Tempature, Humidity, Barometric Pressure, and Dew Point have four embedded "ThinkSpeak.com"
graphs on one web page. Graphs are created from Iframes provided by "ThingSpeak.com"

10. ESP32HTTPClient library is used to POST data to the hosted, Domain website. Function
webInterface sends data to hosted, domain website.

11. Free, "000webhost powered by HOSTINGER" is used for "Domain hosted" website.
to use "Hosted eb Site feature.

12. "dataCollector.php" needs to be uploaded to your Hosted web site.

13. Simple FTP file transfer; allows for easy file maintence, preventing too many log log files.
tested with Filezilla client.

14. Built-in OTA update; remote sketch update by web interface.

Two websites,one sketch: "Weather_View_Timezone.ino"

ESP32 Server https://bit.ly/2FiuNE5--this has a file browser, selected file
can be downloaded directly without FTP transfer.

Example: Domain Hosted website: https://bit.ly/2M5NBs0 --no file browser due to hosted,
domain server restrictions (free hosting service). Hosted server "sleeps" one hour every 24
hours.
-----------------------------------------------------------------------------------
Note this is a project is in development; maybe offline or log files may be affected.
Server is online 24/7; except during periods of testing.

Server is a "Wemos WiFi D1 R2" with 32 MiB Flash Memory. Development Board, and GY-BME280
breakout board, purchased from "Ebay.com" ; both are required for project. Sensor is located
indoors, currently.

Developement board is Arduino friendly; can be programed using the Arduino IDE.
Under $20.00 with shipping, is the project cost for Development Board and one,
GY-BME280 breakout board, sensor used for Barometric Pressure, Humidity, and Temperature.

William
Attachments
Project file with PHP file for upload to your Hosted, Domain web service. PHP file produces dynamic web page of project Data.
(18.65 KiB) Downloaded 9 times
User avatar
By Sirquil
#81551 04/04/2019

Found "LOGxxyyzzzz.TXT" was ending at 20:00:00 instead of 23:45:00 and starting "LOGxxyyzzzz.TXT" at 20:15:00 instead of 00:15:00.

6v6gt explained the issue to me with corrected code for the getDate_Time function..

Corrected project code is attached.

William
Attachments
6v6gt of Arduino.cc Forum explained and corrected getDate_Time function. Thank you 6v6gt.
(18.69 KiB) Downloaded 9 times