From af3e250f76117fd0ba721b033c0dac8134127a84 Mon Sep 17 00:00:00 2001 From: Ewowi Date: Fri, 23 Sep 2022 17:40:41 +0200 Subject: [PATCH] Weather usermod: wait on connection, check location, apikey, json filter - add isConnected - checks on location and apiKey - add arduinoJson filter to reduce size --- .../usermod_v2_weather/usermod_v2_weather.h | 83 ++++++++++++++++--- 1 file changed, 73 insertions(+), 10 deletions(-) diff --git a/usermods/usermod_v2_weather/usermod_v2_weather.h b/usermods/usermod_v2_weather/usermod_v2_weather.h index 67bf36d1..7afe23f3 100644 --- a/usermods/usermod_v2_weather/usermod_v2_weather.h +++ b/usermods/usermod_v2_weather/usermod_v2_weather.h @@ -1,3 +1,6 @@ +// Weather usermod by ewowi. Next to the weather functionality, this usermod is also a proof of concept +// to work with data obtained from the internet. + #pragma once #include "wled.h" @@ -144,6 +147,7 @@ class WeatherUsermod : public Usermod { unsigned long lastTime = 0; //will be used to download new forecast every hour char errorMessage[100] = ""; + bool isConnected = false; //only call openweathermap if connected public: @@ -152,12 +156,18 @@ class WeatherUsermod : public Usermod { } void connected() { + isConnected = true; } void loop() { - //execute only if effect pushes it or every hour - if (usermods_pushLoop > millis() - 1000 && (lastTime == 0 || millis() - lastTime > 3600 * 1000)) { + // return if no location or no api key (reset lastTume to force loop) + if (fabs(latitude) < 0.00001 && fabs(latitude) < 0.00001) {strcpy(errorMessage, PSTR("No location")); lastTime = 0; return;} + if (strcmp(apiKey.c_str(), "") == 0) {strcpy(errorMessage, PSTR("No api key")); lastTime = 0; return;} + + //execute only if connected, effect pushes it or every hour + if (isConnected && usermods_pushLoop > millis() - 1000 && (lastTime == 0 || millis() - lastTime > 3600 * 1000)) { lastTime = millis(); + strcpy(errorMessage, ""); //clear possible previous errors WiFiClient client; @@ -170,17 +180,26 @@ class WeatherUsermod : public Usermod { httpGet(client, url, errorMessage); if (strcmp(errorMessage, "") == 0) { - // Allocate the JSON document - // Use arduinojson.org/v6/assistant to compute the capacity. - // const size_t capacity = JSON_OBJECT_SIZE(3) + JSON_ARRAY_SIZE(2) + 60; - PSRAMDynamicJsonDocument weatherDoc(24000); //in practive about 20.000 + + // https://arduinojson.org/v6/how-to/deserialize-a-very-large-document/ + StaticJsonDocument<256> filter; //in practive about 128 + filter["list"][0]["dt"] = true; + filter["list"][0]["main"]["temp"] = true; + filter["city"]["name"] = true; + filter["city"]["country"] = true; + PSRAMDynamicJsonDocument weatherDoc(4096); //in practive about 2673 // Parse JSON object - DeserializationError error = deserializeJson(weatherDoc, client); + DeserializationError error = deserializeJson(weatherDoc, client, DeserializationOption::Filter(filter)); + #ifdef WEATHER_DEBUG + Serial.printf("filter %u / %u%% (%u %u %u)\n", (unsigned int)filter.memoryUsage(), 100 * filter.memoryUsage() / filter.capacity(), (unsigned int)filter.size(), filter.overflowed(), (unsigned int)filter.nesting()); + Serial.printf("weatherDoc %u / %u%% (%u %u %u)\n", (unsigned int)weatherDoc.memoryUsage(), 100 * weatherDoc.memoryUsage() / weatherDoc.capacity(), (unsigned int)weatherDoc.size(), weatherDoc.overflowed(), (unsigned int)weatherDoc.nesting()); + serializeJson(filter, Serial); + Serial.println(); + serializeJson(weatherDoc, Serial); + Serial.println(); + #endif if (error) { - #ifdef WEATHER_DEBUG - Serial.printf("weatherDoc %u / %u%% (%u %u %u)\n", (unsigned int)weatherDoc.memoryUsage(), 100 * weatherDoc.memoryUsage() / weatherDoc.capacity(), (unsigned int)weatherDoc.size(), weatherDoc.overflowed(), (unsigned int)weatherDoc.nesting()); - #endif strcat(errorMessage, PSTR("deserializeJson() failed: ")); strcat(errorMessage, error.c_str()); } @@ -330,3 +349,47 @@ class WeatherUsermod : public Usermod { // strings to reduce flash memory usage (used more than twice) const char WeatherUsermod::_name[] PROGMEM = "WeatherUserMod"; + +// example openweathermap data +// {"cod":"200","message":0,"cnt":40,"list":[ +// {"dt":1663945200,"main":{"temp":18.05,"feels_like":17.79,"temp_min":17.64,"temp_max":18.05,"pressure":1014,"sea_level":1014,"grnd_level":1013,"humidity":72,"temp_kf":0.41},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":4.32,"deg":238,"gust":5.6},"visibility":10000,"pop":0.48,"rain":{"3h":0.15},"sys":{"pod":"d"},"dt_txt":"2022-09-23 15:00:00"}, +// {"dt":1663956000,"main":{"temp":16.86,"feels_like":16.59,"temp_min":16.16,"temp_max":16.86,"pressure":1014,"sea_level":1014,"grnd_level":1013,"humidity":76,"temp_kf":0.7},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":5.02,"deg":232,"gust":6.1},"visibility":10000,"pop":0.51,"rain":{"3h":0.33},"sys":{"pod":"n"},"dt_txt":"2022-09-23 18:00:00"}, +// {"dt":1663966800,"main":{"temp":15.66,"feels_like":15.47,"temp_min":15.66,"temp_max":15.66,"pressure":1013,"sea_level":1013,"grnd_level":1013,"humidity":84,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":5.51,"deg":243,"gust":7.66},"visibility":10000,"pop":0.92,"rain":{"3h":0.86},"sys":{"pod":"n"},"dt_txt":"2022-09-23 21:00:00"}, +// {"dt":1663977600,"main":{"temp":15.31,"feels_like":15.14,"temp_min":15.31,"temp_max":15.31,"pressure":1012,"sea_level":1012,"grnd_level":1012,"humidity":86,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":5.65,"deg":243,"gust":8.67},"visibility":10000,"pop":0.96,"rain":{"3h":2.48},"sys":{"pod":"n"},"dt_txt":"2022-09-24 00:00:00"}, +// {"dt":1663988400,"main":{"temp":14.86,"feels_like":14.7,"temp_min":14.86,"temp_max":14.86,"pressure":1011,"sea_level":1011,"grnd_level":1011,"humidity":88,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":6.3,"deg":238,"gust":8.78},"visibility":10000,"pop":0.94,"rain":{"3h":1.63},"sys":{"pod":"n"},"dt_txt":"2022-09-24 03:00:00"}, +// {"dt":1663999200,"main":{"temp":14.65,"feels_like":14.49,"temp_min":14.65,"temp_max":14.65,"pressure":1011,"sea_level":1011,"grnd_level":1011,"humidity":89,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":4.36,"deg":238,"gust":6.28},"visibility":10000,"pop":1,"rain":{"3h":2.17},"sys":{"pod":"d"},"dt_txt":"2022-09-24 06:00:00"}, +// {"dt":1664010000,"main":{"temp":14.41,"feels_like":14.31,"temp_min":14.41,"temp_max":14.41,"pressure":1012,"sea_level":1012,"grnd_level":1011,"humidity":92,"temp_kf":0},"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":3.03,"deg":198,"gust":5.32},"visibility":10000,"pop":0.88,"rain":{"3h":3.34},"sys":{"pod":"d"},"dt_txt":"2022-09-24 09:00:00"}, +// {"dt":1664020800,"main":{"temp":14.72,"feels_like":14.57,"temp_min":14.72,"temp_max":14.72,"pressure":1013,"sea_level":1013,"grnd_level":1012,"humidity":89,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":1.66,"deg":157,"gust":2.76},"visibility":10000,"pop":0.87,"rain":{"3h":1.4},"sys":{"pod":"d"},"dt_txt":"2022-09-24 12:00:00"}, +// {"dt":1664031600,"main":{"temp":14.61,"feels_like":14.45,"temp_min":14.61,"temp_max":14.61,"pressure":1013,"sea_level":1013,"grnd_level":1012,"humidity":89,"temp_kf":0},"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":4.64,"deg":30,"gust":6.18},"visibility":10000,"pop":0.76,"rain":{"3h":3.51},"sys":{"pod":"d"},"dt_txt":"2022-09-24 15:00:00"}, +// {"dt":1664042400,"main":{"temp":14.33,"feels_like":14.17,"temp_min":14.33,"temp_max":14.33,"pressure":1014,"sea_level":1014,"grnd_level":1013,"humidity":90,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":7.37,"deg":46,"gust":9.91},"visibility":10000,"pop":0.81,"rain":{"3h":2.46},"sys":{"pod":"n"},"dt_txt":"2022-09-24 18:00:00"}, +// {"dt":1664053200,"main":{"temp":13.81,"feels_like":13.47,"temp_min":13.81,"temp_max":13.81,"pressure":1015,"sea_level":1015,"grnd_level":1015,"humidity":85,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":5.62,"deg":53,"gust":9.48},"visibility":10000,"pop":0.53,"rain":{"3h":2.09},"sys":{"pod":"n"},"dt_txt":"2022-09-24 21:00:00"}, +// {"dt":1664064000,"main":{"temp":13.69,"feels_like":13.26,"temp_min":13.69,"temp_max":13.69,"pressure":1016,"sea_level":1016,"grnd_level":1015,"humidity":82,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":4.31,"deg":48,"gust":8.01},"visibility":10000,"pop":0.53,"rain":{"3h":0.23},"sys":{"pod":"n"},"dt_txt":"2022-09-25 00:00:00"}, +// {"dt":1664074800,"main":{"temp":13.68,"feels_like":13.14,"temp_min":13.68,"temp_max":13.68,"pressure":1016,"sea_level":1016,"grnd_level":1015,"humidity":78,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":4.7,"deg":45,"gust":7.58},"visibility":10000,"pop":0.69,"rain":{"3h":0.45},"sys":{"pod":"n"},"dt_txt":"2022-09-25 03:00:00"}, +// {"dt":1664085600,"main":{"temp":12.96,"feels_like":12.4,"temp_min":12.96,"temp_max":12.96,"pressure":1016,"sea_level":1016,"grnd_level":1015,"humidity":80,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":4.29,"deg":54,"gust":7.3},"visibility":10000,"pop":0.77,"rain":{"3h":2.4},"sys":{"pod":"d"},"dt_txt":"2022-09-25 06:00:00"}, +// {"dt":1664096400,"main":{"temp":14.14,"feels_like":13.44,"temp_min":14.14,"temp_max":14.14,"pressure":1017,"sea_level":1017,"grnd_level":1016,"humidity":70,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":77},"wind":{"speed":3.09,"deg":72,"gust":4.35},"visibility":10000,"pop":0.54,"rain":{"3h":0.34},"sys":{"pod":"d"},"dt_txt":"2022-09-25 09:00:00"}, +// {"dt":1664107200,"main":{"temp":16.15,"feels_like":15.15,"temp_min":16.15,"temp_max":16.15,"pressure":1016,"sea_level":1016,"grnd_level":1015,"humidity":51,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":{"all":47},"wind":{"speed":3.47,"deg":4,"gust":3.49},"visibility":10000,"pop":0.36,"sys":{"pod":"d"},"dt_txt":"2022-09-25 12:00:00"}, +// {"dt":1664118000,"main":{"temp":15.56,"feels_like":14.56,"temp_min":15.56,"temp_max":15.56,"pressure":1015,"sea_level":1015,"grnd_level":1014,"humidity":53,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":{"all":35},"wind":{"speed":3.39,"deg":357,"gust":2.98},"visibility":10000,"pop":0,"sys":{"pod":"d"},"dt_txt":"2022-09-25 15:00:00"}, +// {"dt":1664128800,"main":{"temp":13.95,"feels_like":12.94,"temp_min":13.95,"temp_max":13.95,"pressure":1014,"sea_level":1014,"grnd_level":1013,"humidity":59,"temp_kf":0},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02n"}],"clouds":{"all":21},"wind":{"speed":1.8,"deg":346,"gust":2.3},"visibility":10000,"pop":0,"sys":{"pod":"n"},"dt_txt":"2022-09-25 18:00:00"}, +// {"dt":1664139600,"main":{"temp":13.57,"feels_like":12.63,"temp_min":13.57,"temp_max":13.57,"pressure":1013,"sea_level":1013,"grnd_level":1012,"humidity":63,"temp_kf":0},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":82},"wind":{"speed":2.6,"deg":267,"gust":3.43},"visibility":10000,"pop":0,"sys":{"pod":"n"},"dt_txt":"2022-09-25 21:00:00"}, +// {"dt":1664150400,"main":{"temp":13.93,"feels_like":13.02,"temp_min":13.93,"temp_max":13.93,"pressure":1011,"sea_level":1011,"grnd_level":1010,"humidity":63,"temp_kf":0},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":91},"wind":{"speed":4.77,"deg":236,"gust":7.03},"visibility":10000,"pop":0,"sys":{"pod":"n"},"dt_txt":"2022-09-26 00:00:00"}, +// {"dt":1664161200,"main":{"temp":14.53,"feels_like":13.79,"temp_min":14.53,"temp_max":14.53,"pressure":1007,"sea_level":1007,"grnd_level":1006,"humidity":67,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":7.51,"deg":234,"gust":10.73},"visibility":10000,"pop":0.2,"rain":{"3h":0.13},"sys":{"pod":"n"},"dt_txt":"2022-09-26 03:00:00"}, +// {"dt":1664172000,"main":{"temp":14.62,"feels_like":13.73,"temp_min":14.62,"temp_max":14.62,"pressure":1004,"sea_level":1004,"grnd_level":1003,"humidity":61,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":10.16,"deg":236,"gust":13.08},"visibility":10000,"pop":0.2,"rain":{"3h":0.15},"sys":{"pod":"d"},"dt_txt":"2022-09-26 06:00:00"}, +// {"dt":1664182800,"main":{"temp":14.24,"feels_like":13.68,"temp_min":14.24,"temp_max":14.24,"pressure":1002,"sea_level":1002,"grnd_level":1001,"humidity":75,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":10.43,"deg":232,"gust":13.98},"visibility":10000,"pop":0.41,"rain":{"3h":0.29},"sys":{"pod":"d"},"dt_txt":"2022-09-26 09:00:00"}, +// {"dt":1664193600,"main":{"temp":13.58,"feels_like":13.29,"temp_min":13.58,"temp_max":13.58,"pressure":999,"sea_level":999,"grnd_level":998,"humidity":88,"temp_kf":0},"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":7.48,"deg":252,"gust":10.89},"visibility":7736,"pop":0.9,"rain":{"3h":3.95},"sys":{"pod":"d"},"dt_txt":"2022-09-26 12:00:00"}, +// {"dt":1664204400,"main":{"temp":13.65,"feels_like":13.11,"temp_min":13.65,"temp_max":13.65,"pressure":998,"sea_level":998,"grnd_level":998,"humidity":78,"temp_kf":0},"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":4.63,"deg":288,"gust":6.33},"visibility":10000,"pop":0.93,"rain":{"3h":4.13},"sys":{"pod":"d"},"dt_txt":"2022-09-26 15:00:00"}, +// {"dt":1664215200,"main":{"temp":12.79,"feels_like":12.11,"temp_min":12.79,"temp_max":12.79,"pressure":999,"sea_level":999,"grnd_level":998,"humidity":76,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":84},"wind":{"speed":7.52,"deg":334,"gust":9.93},"visibility":10000,"pop":1,"rain":{"3h":1.18},"sys":{"pod":"n"},"dt_txt":"2022-09-26 18:00:00"}, +// {"dt":1664226000,"main":{"temp":12.75,"feels_like":11.88,"temp_min":12.75,"temp_max":12.75,"pressure":1000,"sea_level":1000,"grnd_level":999,"humidity":69,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":81},"wind":{"speed":8.6,"deg":330,"gust":10.65},"visibility":10000,"pop":0.95,"rain":{"3h":0.94},"sys":{"pod":"n"},"dt_txt":"2022-09-26 21:00:00"}, +// {"dt":1664236800,"main":{"temp":12.4,"feels_like":11.45,"temp_min":12.4,"temp_max":12.4,"pressure":1000,"sea_level":1000,"grnd_level":999,"humidity":67,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":90},"wind":{"speed":7.24,"deg":313,"gust":9.58},"visibility":10000,"pop":0.95,"rain":{"3h":0.66},"sys":{"pod":"n"},"dt_txt":"2022-09-27 00:00:00"}, +// {"dt":1664247600,"main":{"temp":12.05,"feels_like":11.19,"temp_min":12.05,"temp_max":12.05,"pressure":1000,"sea_level":1000,"grnd_level":999,"humidity":72,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":100},"wind":{"speed":7.56,"deg":310,"gust":9.89},"visibility":10000,"pop":1,"rain":{"3h":1.31},"sys":{"pod":"n"},"dt_txt":"2022-09-27 03:00:00"}, +// {"dt":1664258400,"main":{"temp":12.03,"feels_like":11.01,"temp_min":12.03,"temp_max":12.03,"pressure":999,"sea_level":999,"grnd_level":999,"humidity":66,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":9.24,"deg":284,"gust":11.35},"visibility":10000,"pop":1,"rain":{"3h":1.58},"sys":{"pod":"d"},"dt_txt":"2022-09-27 06:00:00"}, +// {"dt":1664269200,"main":{"temp":12.3,"feels_like":11.31,"temp_min":12.3,"temp_max":12.3,"pressure":999,"sea_level":999,"grnd_level":999,"humidity":66,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":70},"wind":{"speed":9.89,"deg":272,"gust":11.4},"visibility":10000,"pop":0.51,"rain":{"3h":0.38},"sys":{"pod":"d"},"dt_txt":"2022-09-27 09:00:00"}, +// {"dt":1664280000,"main":{"temp":12.97,"feels_like":12.12,"temp_min":12.97,"temp_max":12.97,"pressure":998,"sea_level":998,"grnd_level":997,"humidity":69,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":84},"wind":{"speed":9.12,"deg":263,"gust":12.4},"visibility":10000,"pop":0.95,"rain":{"3h":1.08},"sys":{"pod":"d"},"dt_txt":"2022-09-27 12:00:00"}, +// {"dt":1664290800,"main":{"temp":13.1,"feels_like":12.32,"temp_min":13.1,"temp_max":13.1,"pressure":996,"sea_level":996,"grnd_level":995,"humidity":71,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":10.39,"deg":274,"gust":12.96},"visibility":10000,"pop":1,"rain":{"3h":1.97},"sys":{"pod":"d"},"dt_txt":"2022-09-27 15:00:00"}, +// {"dt":1664301600,"main":{"temp":12.72,"feels_like":11.82,"temp_min":12.72,"temp_max":12.72,"pressure":996,"sea_level":996,"grnd_level":995,"humidity":68,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":99},"wind":{"speed":8.59,"deg":291,"gust":11.52},"visibility":10000,"pop":1,"rain":{"3h":1.59},"sys":{"pod":"n"},"dt_txt":"2022-09-27 18:00:00"}, +// {"dt":1664312400,"main":{"temp":12.27,"feels_like":11.41,"temp_min":12.27,"temp_max":12.27,"pressure":995,"sea_level":995,"grnd_level":995,"humidity":71,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":98},"wind":{"speed":8.22,"deg":279,"gust":10.74},"visibility":10000,"pop":0.89,"rain":{"3h":1.06},"sys":{"pod":"n"},"dt_txt":"2022-09-27 21:00:00"}, +// {"dt":1664323200,"main":{"temp":12.22,"feels_like":11.4,"temp_min":12.22,"temp_max":12.22,"pressure":994,"sea_level":994,"grnd_level":993,"humidity":73,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":92},"wind":{"speed":8.28,"deg":277,"gust":11.01},"visibility":10000,"pop":1,"rain":{"3h":1.02},"sys":{"pod":"n"},"dt_txt":"2022-09-28 00:00:00"}, +// {"dt":1664334000,"main":{"temp":12.36,"feels_like":11.48,"temp_min":12.36,"temp_max":12.36,"pressure":993,"sea_level":993,"grnd_level":992,"humidity":70,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10n"}],"clouds":{"all":87},"wind":{"speed":8.64,"deg":276,"gust":11.11},"visibility":10000,"pop":0.92,"rain":{"3h":0.64},"sys":{"pod":"n"},"dt_txt":"2022-09-28 03:00:00"}, +// {"dt":1664344800,"main":{"temp":12.54,"feels_like":11.63,"temp_min":12.54,"temp_max":12.54,"pressure":993,"sea_level":993,"grnd_level":992,"humidity":68,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":93},"wind":{"speed":8.94,"deg":282,"gust":11.02},"visibility":10000,"pop":0.88,"rain":{"3h":0.62},"sys":{"pod":"d"},"dt_txt":"2022-09-28 06:00:00"}, +// {"dt":1664355600,"main":{"temp":12.76,"feels_like":11.95,"temp_min":12.76,"temp_max":12.76,"pressure":993,"sea_level":993,"grnd_level":992,"humidity":71,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":10.07,"deg":281,"gust":12.33},"visibility":10000,"pop":0.75,"rain":{"3h":1.12},"sys":{"pod":"d"},"dt_txt":"2022-09-28 09:00:00"}, +// {"dt":1664366400,"main":{"temp":13.41,"feels_like":12.66,"temp_min":13.41,"temp_max":13.41,"pressure":994,"sea_level":994,"grnd_level":993,"humidity":71,"temp_kf":0},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":100},"wind":{"speed":10.01,"deg":297,"gust":12.82},"visibility":9744,"pop":0.95,"rain":{"3h":2.77},"sys":{"pod":"d"},"dt_txt":"2022-09-28 12:00:00"} +// ],"city":{"id":2747373,"name":"The Hague","coord":{"lat":52.08,"lon":4.28},"country":"NL","population":474292,"timezone":7200,"sunrise":1663911010,"sunset":1663954830}} \ No newline at end of file