Go Down

Topic: Rain Gauge with Data Logger and more... (Read 2518 times) previous topic - next topic

Techno500

#15
Sep 30, 2019, 09:21 pm Last Edit: Oct 20, 2019, 08:07 am by Techno500 Reason: Website change
9/30.2019

Finished "variableInput.h;" which is a new include file with options requiring editing are available in one file!  No more hunting occurrences throughout the code.  Be sure to copy "variableInput" folder to your library folder!

Upload "Rain_Gauge_Two.zip" contains:  Sketch "Rain_Gauge_Two.ino," library folder, "variableInput", PHP file for use on a Domain hosted website "dataCollector.php," and "README.TXT."

"Rain_Gauge_Two" Project Website.

William

zoomx

Hello William,

you can put variableInput.h in the sketch folder, I believe that it's more simple since you can edit the file inside the IDE.

rockwallaby

Hello William,

I notice on your rain gauge two project a few things I thought to comment on.
On the main page, you have temperature in degrees Celsius, whereas on the graph it is something else with no units.

The Humidity should be stated as Relative Humidity and again on the graph as well together with % as units.
Generally and typically, relative humidity sensors are not so accurate to less than ±1%, within the typical operating band, and worse outside than band. So little point in showing fractional parts for % rh.

On the main page, you have barometric pressure as metric, well sort of, it is hPa, not hpa, but not on the graph page. Generally, with barometric pressure in hPa, you only need to represent whole units. Check the resolution of the sensor being used as a guide.

For the rain, you should express it as mm per unit time, so for example, it should read 5mm/day, not 5 day/mm.

With your latitude and longitude, is it north or south and east or west ?
I notice your elevation changes with updates, that's interesting. I imagine that should be fixed.

The link you provide in post #8 does not work: ESP32 Server
And again in your post #12: Website for ESP32 project

Will be looking forward to seeing the project progress.
Paul - VK7KPA

Techno500

#18
Oct 31, 2019, 01:09 am Last Edit: Nov 02, 2019, 12:58 am by Techno500 Reason: Updated attachment
Quote
Hello William,

I notice on your rain gauge two project a few things I thought to comment on.
On the main page, you have temperature in degrees Celsius, whereas on the graph it is something else with no units.

On main page temperature now reads in degrees Fahrenheit.  Graphs have been re-labeled to match units on main page.

Quote
The Humidity should be stated as Relative Humidity and again on the graph as well together with % as units.
Generally and typically, relative humidity sensors are not so accurate to less than ±1%, within the typical operating band, and worse outside than band. So little point in showing fractional parts for % rh.
Did not like the graphing with whole units.  

Quote
On the main page, you have barometric pressure as metric, well sort of, it is hPa, not hpa, but not on the graph page. Generally, with barometric pressure in hPa, you only need to represent whole units. Check the resolution of the sensor being used as a guide.
Change Barometric Pressure units to inches of Mercury (inHg.).   Corresponding units on BP graph are inHg.   Graphing is for visualization of observer weather data; not intended for precise measurements.  Data only gets updated every fifthteen minutes; using few digits to left of decimal produced an undesirable graph IMHO.

Quote
For the rain, you should express it as mm per unit time, so for example, it should read 5mm/day, not 5 day/mm.
Rain measurement readings are taken for Day, Minute, and Five Minute interval.

Quote
With your latitude and longitude, is it north or south and east or west ?
I notice your elevation changes with updates, that's interesting. I imagine that should be fixed.
GPS Data is presented the same as it comes off the NEO m8n module.  Decimal coordinates may be used directly in "Google Maps"

Quote
The link you provide in post #8 does not work: ESP32 Server
And again in your post #12: Website for ESP32 project
Links in post #8 and # 12 have been corrected.

Appreciate the feedback rockwallaby.

Adding Heat Index and Dew Point to main page; still in development.  Using the the Glenn Taylor library for the BME280 Environment_Calculations.

ESP32 Project website


William



Techno500

Will soon be posting a new, version of "Rain_Gauge_Two_.zip."  ESP32, Open Source project. 

I am in the testing stage of my project.  Would like to see how it responds to visitors, before posting the code.   

Async Web Server Online   

Project is a conversion of "Rain_Gauge_Two.zip"; WiFi Client/ Server, to an Async Web Server using: 

https://github.com/me-no-dev/ESPAsyncWebServer.


William

Techno500

#20
Nov 14, 2019, 11:29 pm Last Edit: Nov 14, 2019, 11:40 pm by Techno500 Reason: Correction
11/14/2019, Version 2.3

Project has now been coded to use the AsyncWebServer library while retaining all but one feature of the earlier versions.  OTA will now be become a standalone sketch; if needed.  All editing to setup project on your network is done in small, short configuration file:  "variableInput.h," located in the Sketch folder.

Async Web Server:  Rain_Gauge_Two project

Project is Open Source.  I could not have completed this code without the help of others, commented sections of the code with reference to those that have helped with the project.    Special thanks to Pavel for his help and patience with my questions.


William

Techno500

#21
Nov 18, 2019, 07:07 am Last Edit: Nov 18, 2019, 07:08 am by Techno500
AsyncWebServer Library

Why should you care:

Using asynchronous network means that you can handle more than one connection at the same time
You are called once the request is ready and parsed

When you send the response, you are immediately ready to handle other connections while the server is taking care of sending the response in the background

Speed is OMG

Easy to use API, HTTP Basic and Digest MD5 Authentication (default), ChunkedResponse

Easily extendible to handle any type of content

Supports Continue 100

Async WebSocket plugin offering different locations without extra servers or ports

Async EventSource (Server-Sent Events) plugin to send events to the browser

URL Rewrite plugin for conditional and permanent url rewrites

ServeStatic plugin that supports cache, Last-Modified, default index and more

Simple template processing engine to handle templates

____________________________________________

Project supports all previous features except OTA firmware updates; which if needed can be a stand alone sketch using the example from:

AsyncElegantOTA

There are six files in "Rain_Gauge_Two.zip:" index1.h, index2.h, index3.h, index4, variableInput.h, and Rain_Gauge_Two.ino.  Unzip to folder on Desktop; double click "Rain_Gauge_Two.ino" after editing "variableInput.h" for you networking requirements/credentials.  All files are required.  Index files are "templates for web pages" and contain "Placeholders" referenced in sketched "processor" functions.

New  feature; we can now restart the sketch remotely!  To restart server; send a URL request of "publicIP:LISTEN_PORT/Restart"    example URL request:  "xx.xx.xx.xx:yyyy/Restart"

Online, Async Web Server version of "Rain_Gauge_Two" project

Note, there is a correction factor for Barometric Pressure in the "getWeatherData" function.  Correction factor is coded in the "getWeatherData" function; correction Factor Formula is:  Relative Pressure (in millibars) equals Absolute Pressure (BME280, in millibars) plus (elevation in meters divided by 8.3).

"Rain_Gauge_Two.zip" is in the above POST.

William

mortenx

it would be nice option to send all data also to a weather serve like Weathercloud
https://www.instructables.com/id/Arduino-Weathercloud-Weather-Station/

Techno500

mortenx

Sketch supports a dynamic web page on a Domain, hosted web server with the function "webInterface;" to use this function "dataCollector.php" needs to be uploaded to your web page files on the Domain server.  This file will create a Dynamic web page, once it has the updated Weather data.  Code "webInterface() in the loop, 15 minute routine will need to be uncommented.  

Perhaps this will inspire you to add the suggested additional feature.


Domain hosted web site

Adding some addition files that should have been included in the "Rain_Gauge_Two.zip."


William

Techno500

#24
Nov 19, 2019, 12:43 am Last Edit: Nov 25, 2019, 07:06 am by Techno500 Reason: Modified attachment
11/23/2019

Found SPIFFS was getting corrupted; I believe by writes to the log file, while Server was sending request.  Added a flag to give priority to logging to SPIFFS.  So far, responses have been good.

Added login and OTA support; see comments in "variableInput.h."

Additional files are included in the "Rain_Gauge_Two.zip."  Files for sending data to Domain hosted web page ("dataCollector.php"),  Schematic for optocoupler ("Rain Gauge 4N25 Circuit.jpg"), Schematic for beep function ("Sonalert circuit.png"), and a couple of read me files.

Project web site

William

Go Up