Skip to content

Commit

Permalink
Merge pull request #58 from JHershey69/updates
Browse files Browse the repository at this point in the history
4.0.1 update
  • Loading branch information
JHershey69 authored Aug 19, 2024
2 parents 3bd6893 + c711cc2 commit ef814c6
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 42 deletions.
40 changes: 5 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenWeatherOneCall v4.0.0 ![IMAGE OF LIGHTNING](https://github.com/JHershey69/OpenWeatherOneCall/blob/master/images/lightning.jpg)
# OpenWeatherOneCall v4.0.1 ![IMAGE OF LIGHTNING](https://github.com/JHershey69/OpenWeatherOneCall/blob/master/images/lightning.jpg)
## This is for ESP32 only

##This is an upgrade for OpenWeatherMap API 3.0 and Air Pollution API 2.5
Expand All @@ -14,6 +14,7 @@ and you will continue to get all of the features of this library.
<br>
Please install these additional libraries (as needed)

- [ESP32Time] for time functions
- [WiFiTri Library](https://www.github.com/jhershey69/WiFiTri) for WiFi Triangulation
-- A [GOOGLE API KEY](https://developers.google.com/maps/documentation/javascript/get-api-key) is required for WiFiTri
<hr>
Expand All @@ -23,40 +24,9 @@ For ***Dark Sky*** users migrating to a new system please refer to the Variables

*Please make sure you read the [**User Manual**](https://github.com/JHershey69/OpenWeatherOneCall/blob/master/docs/OpenWeatherOneCall%20Manual%20v3.0.4.pdf) as v3.0.3 had many changes and new information*

v3.0.0 has a **Legacy Mode** to maintain ease of use for previous versions
<br>**v3.0.2**
<br>--fixed a couple of things so I could release the same thng with a new number
<br>**v3.0.3**
<br>--added HUMAN READABLE date and time formats, see manual and variable sheet.
<br>--Date formats now selectable MM/DD/YY, DD/MM/YY. Time available in 24 or 12 Hour format.
<br>--Remove dependancies on all external libraries. Only ArduinoJson v6+ is required now.
<br>**v3.0.4**
<br>--added HUMAN READABLE sunrise and sunset for CURRENT, see manual and variable sheet.
<br>--added snowVolume and rainVolume, see variables sheet, returned in mm or in based on units
<br>**v3.0.5**
<br>--minor bug fix with language selection.
<br>**v3.1.0**
<br>--added Air Quality information (see addendum).
<br>**v3.1.1**
<br>--minor bug fix to historical rain and snow.
<br>**v3.1.2**
<br>--minor bug fix to library files.
<br>**v3.1.3, v3.1.4**
<br>--minor bug fix to historical rain and snow.
<br>**v3.1.5**
<br>--Multiple Alerts update (see added docs).
<br>**v3.1.6**
<br>--Multiple Alerts memory fix.
<br>**v3.1.7, 3.1.8**
<br>--Fixed missing code.
<br>**v3.1.9**
<br>--Minor fix to clear old alerts.
<br>**v3.3.0**
<br>--Minor fix to update API change.
<br>**v3.3.2**
<br>--Minor fix to update API change for Air Quality.
<br>**v3.3.3**
<br>--Minor fix to update API change for Air Quality and Example scripts.
<br>**v4.0.0**
<br>--MAJOR REWRITE with addition options and variable SEE DOCUMENTATION. Some features deprecated no longer supported.
<br>**v4.0.1**
<br>--ADDED ISO 8601 Human Readable format to Date Time Format.


Binary file added docs/OpenWeatherOneCall_Manual_4-0-1.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,22 @@ int myEXCLUDES = 0; //<-----0 Excludes is default
int myUNITS = IMPERIAL; //<-----METRIC, IMPERIAL, KELVIN (IMPERIAL is default)

//Date Time Format
int myDTF = 1; //1 M/D/Y 24H
// 2 D/M/Y 24H
// 3 M/D/Y 12H
// 4 D/M/Y 12H

int myDTF = 1; /*
1 M/D/Y 24H
2 D/M/Y 24H
3 M/D/Y 12H
4 D/M/Y 12H
5/6 TIME ONLY 24H
7/8 TIME ONLY 12H
9 DAY SHORTNAME
10 M/D/Y ONLY,
11 D/M/Y ONLY
ISO8601 options:
12 YYYY-MM-DD ONLY,
13 THH:MM:SS ONLY
14 YYYY-MM-DDTHH:MM:SSY 24H
*/
//************************************************************************

//for debugging loop counting
Expand Down
5 changes: 5 additions & 0 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"owner": "bblanchon",
"name": "ArduinoJson",
"version": "^7.0.0"
},
{
"owner": "fbiego",
"name": "ESP32Time",
"version": "^2.0.0"
}
],
"repository":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ category=other
url=https://github.com/JHershey69/OpenWeatherOneCall
architectures=esp32
includes=OpenWeatherOneCall.h
depends=ArduinoJson
depends=ArduinoJson, ESP32Time
17 changes: 17 additions & 0 deletions src/DateTimeConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ void dateTimeConversion(long _epoch, char *_buffer, int _format)
9 DAY SHORTNAME
10 M/D/Y ONLY
11 D/M/Y ONLY
ISO8601 options
12 YYYY-MM-DD ONLY
13 THH:MM:SS ONLY
14 YYYY-MM-DDTHH:MM:SS
*/

// NTP Server
Expand Down Expand Up @@ -82,6 +87,18 @@ void dateTimeConversion(long _epoch, char *_buffer, int _format)
// D/M/Y 24H
strftime(_buffer,20,"%d/%m/%Y",ptm);
break;
case 12:
// ISO 8601 YYYY-MM-DD
strftime(_buffer,20,"%F",ptm);
break;
case 13:
// ISO8601 THH:MM:SS
strftime(_buffer,20,"T%T",ptm);
break;
case 14:
// ISO8601 YYYY-MM-DDTHH:MM:SS
strftime(_buffer,20,"%FT%T",ptm);
break;
default:
// M/D/Y 24H
strftime(_buffer,20,"%m/%d/%Y",ptm);
Expand Down
2 changes: 1 addition & 1 deletion src/OpenWeatherOneCall.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
OpenWeatherOneCall.cpp v4.0.0
OpenWeatherOneCall.cpp v4.0.1
Updated for ArduinoJSON v7 on Aug 1, 2024
copyright 2020/2024 - Jessica Hershey
www.github.com/JHershey69
Expand Down

0 comments on commit ef814c6

Please sign in to comment.