How to get weather on esp using API with key?
Moderators: grovkillen, Stuntteam, TD-er
How to get weather on esp using API with key?
Hello everyone, is it possible to use Generic HTTP Advanced to get weather data using the API with a key, receive a json response and analyze its desired values on a dummy device? I forgot to say - this is an https request form "https://api.weather.........." . I guess it's possible, but I don't understand how and where to specify the API key? Then, to parse the json, I understand you need to use the MQTT import plugin? But I can't get a response from the server (404). Help me figure this out. Thank you.
Re: How to get weather on esp using API with key?
Please check out this pending pull request: #4856 where a code-change is suggested to also retrieve weather info from OpenWeatherMap (starting from this comment).
Currently, ESPEasy doesn't support this, mostly because the response from most webservers will be overloading the limited resources of specifically an ESP8266.
Currently, ESPEasy doesn't support this, mostly because the response from most webservers will be overloading the limited resources of specifically an ESP8266.
/Ton (PayPal.me)
Re: How to get weather on esp using API with key?
Ok, thanks for link. Can such a task be solved by self-creating a plugin based on arduino codes, just for my needs? I want to try, learn how to create simple plugins according to the instructions.
Re: How to get weather on esp using API with key?
Please note you cannot use HTTPS (with the S) in ESPEasy
Re: How to get weather on esp using API with key?
Hello everyone I found a weather service that responds to http (without S) requests. Please tell me, which plugin can I use to send and receive an api request? Or is it possible only with the help of rules and Dummy Device?
Re: How to get weather on esp using API with key?
In general, ESPEasy does not supply any content when addressing a HTTP service, either via GET, POST or PUT. The only exception is when addressing a Thingspeak server via SendToHTTP, and the FEATURE_THINGSPEAK_EVENT is included in the build (any build without LIMIT_BUILD_SIZE set, so not available in ESP8266 builds 1M, Collection, Climate, Display, Energy or NeoPixel). By default this feature is enabled in ESP32 builds.
How to use that Thingspeak feature is documented in a SendToHTTP Rules example.
Other webservices are currently not (actively) supported.
How to use that Thingspeak feature is documented in a SendToHTTP Rules example.
Other webservices are currently not (actively) supported.
/Ton (PayPal.me)
Re: How to get weather on esp using API with key?
Besides Thingspeak i also added a OpenWeatherMap and Open-Meteo support. I recommend Open-Meteo because it doesn’t require an API key. Both services support HTTP and are free to a certain extent.
I can support you with prebuilt binaries or you can use the branch of my fork to compile it yourself since it is not officially included into ESPEasy…
Re: How to get weather on esp using API with key?
Maybe we should try to make this support more structural, so it's usable for everyone, except in the LIMIT_BUILD_SIZE builds for size reasons as it is already for Thingspeak support.chromo23 wrote: ↑27 Dec 2024, 19:06 Besides Thingspeak i also added a OpenWeatherMap and Open-Meteo support. I recommend Open-Meteo because it doesn’t require an API key. Both services support HTTP and are free to a certain extent.
I can support you with prebuilt binaries or you can use the branch of my fork to compile it yourself since it is not officially included into ESPEasy…
Please make a PR with your additional work

/Ton (PayPal.me)
Re: How to get weather on esp using API with key?
Like @chromo23, I also need to receive data from weather services without having physical sensors. You can tell me, I can't figure it out. Where can I find either a binary with support for the services that @chromo23 made, or what is the name of the plugin and where can I find it? thank you in advance.
Re: How to get weather on esp using API with key?
Alternatively, can enable this service. weatherapi.comchromo23 wrote: ↑27 Dec 2024, 19:06Besides Thingspeak i also added a OpenWeatherMap and Open-Meteo support. I recommend Open-Meteo because it doesn’t require an API key. Both services support HTTP and are free to a certain extent.
I can support you with prebuilt binaries or you can use the branch of my fork to compile it yourself since it is not officially included into ESPEasy…
Re: How to get weather on esp using API with key?
I will do but it has to wait until next year.

You have unfortunately also wait until next year for a binary. If you know how to build you own, you can find it here: https://github.com/chromoxdor/ESPEasy/t ... ther-event
Make sure to do a custom build with #define FEATURE_OMETEO_EVENT included in custom.h
Can you explain what makes this better than Open-Meteo?
The advantages of Open-Meteo are no API key and the only limit for the free version is the restriction to 10000 calls per day.
Open-Meteo also provides a nice website to "click together" you url depending on your needs (https://open-meteo.com/en/docs)
Re: How to get weather on esp using API with key?
This is the workaround I use to get weather data
I have a router with openwrt installed, on which I have scheduled this command every 10':
then on the ESP module 192.168.1.100 I have this rule that writes the values in 2 Dummy Device Quad
I have a router with openwrt installed, on which I have scheduled this command every 10':
Code: Select all
curl -q http://192.168.1.100/control?cmd=AsyncEvent,setOpenMeteo=$(curl 'api.open-meteo.com/v1/forecast?latitude=45.6789&longitude=9.8765¤t=temperature_2m,precipitation,rain,precipitation_probability,snowfall,weather_code,cloud_cover,wind_speed_10m,wind_gusts_10m&timezone=auto&forecast_days=1' -s | jq -c '[.current | .temperature_2m,.precipitation,.rain,.precipitation_probability,.snowfall,.weather_code,.cloud_cover,.wind_speed_10m,.wind_gusts_10m]' | tr -d '[]')
Code: Select all
on setOpenMeteo do
TaskValueSet 1,1,%eventvalue1%
TaskValueSet 1,2,%eventvalue2%
TaskValueSet 1,3,%eventvalue3%
TaskValueSet 1,4,%eventvalue4%
TaskValueSet 2,1,%eventvalue6%
TaskValueSet 2,2,%eventvalue7%
TaskValueSet 2,3,%eventvalue8%
TaskValueSet 2,4,%eventvalue9%
Endon
Re: How to get weather on esp using API with key?
You can now download a binary here for testing: https://github.com/letscontrolit/ESPEas ... 2590203835cccp79 wrote: ↑28 Dec 2024, 13:43 Like @chromo23, I also need to receive data from weather services without having physical sensors. You can tell me, I can't figure it out. Where can I find either a binary with support for the services that @chromo23 made, or what is the name of the plugin and where can I find it? thank you in advance.
Edit: I totally forgot, that I disabled by default and it is only available for custom build where you have to enable it with "#define FEATURE_OPENMETEO_EVENT 1" when this is merged with ESPEasy. But write here what binary you need and i can build you one for testing.
Short description from the code:
Generate an event with the response of an open-meteo request.
No need for an api key and it is free (daily requests are limited to 10,000 in the free version).
Visit the URL (https://open-meteo.com/en/docs) and build your personal URL by selecting the location and values you want to receive.
Supported variable kinds are current, hourly, daily!
In rules you can grep the reply by the kind of weather variables with “On OpenMeteo# Do …”.
e.g. “On OpenMeteo#current Do …”.
Note: hourly and daily results are arrays which can become very long.
Best to make separate calls, especially for hourly results.
Short how-to:
1. visit https://open-meteo.com/en/docs
2. select in the side menu your topic (e.g. Weather Forecast, Marine Forcast, Air Quality)
3. click together what you need and scroll down to the API Response section where you find this: (if you click on the "Open in new tab" you´ll get a preview with the data)
4. copy everything after "open-meteo.com"
5. use the copied part of the url with sendtohttp. example:`sendtohttp api.open-meteo.com,80,"/v1/forecast?..."` (make sure to use the quotes!)
Example:
Command:
Code: Select all
sendtohttp api.open-meteo.com,80,"/v1/forecast?latitude=52.5244&longitude=13.4105¤t=temperature_2m,relative_humidity_2m&daily=temperature_2m_max,temperature_2m_min,uv_index_max&timezone=Europe%2FLondon&forecast_days=3"
Code: Select all
2580494: EVENT: OpenMeteo#current=4.3,76
2580503: EVENT: OpenMeteo#daily=7.5,2.4,1.2,1.5,-1.0,-1.1,1.00,0.95,0.70
"temperature_2m_max" can be accessed with %eventvalue1% - %eventvalue3%, "temperature_2m_min" with %eventvalue4% - %eventvalue6% and "uv_index_max" with %eventvalue7% - %eventvalue9%
Last edited by chromo23 on 03 Jan 2025, 09:54, edited 1 time in total.
Re: How to get weather on esp using API with key?
Should this work for esp32c6 as well? It doesn't work for me. Which version for esp32c6 should I choose from the above page?You can now download a binary here for testing: https://github.com/letscontrolit/ESPEas ... 2590203835
Re: How to get weather on esp using API with key?
Ohh sorry. That was not very smart of me.

The feature is only available in custom builds where you have to enable it by:
Code: Select all
#define FEATURE_OPENMETEO_EVENT 1
Re: How to get weather on esp using API with key?
Actually, I need to use this function to get data from the inverter from the url:chromo23 wrote: ↑03 Jan 2025, 09:49Ohh sorry. That was not very smart of me.![]()
The feature is only available in custom builds where you have to enable it by:But i can build you a binary. What do you need?Code: Select all
#define FEATURE_OPENMETEO_EVENT 1
192.168.1.199/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System
I need to do this on esp32c6
If possible.
If it is not possible, I would like a file for reading weather data.
Re: How to get weather on esp using API with key?
The openmeteo-event is tailored to parse the JSON response of open-meteo.com
To parse the data of your inverter a new parser needs to be written.
Can you post the response of "192.168.1.199/solar_api/v1/GetInverterRealtimeData.cgi"
If it is not that complicated i could try to write one for you.
The normal_ESP32c6_4M316k... ?
Re: How to get weather on esp using API with key?
Yes, it is SeeedStudio 4MB. I will send the data from the inverter response later when I get back from workchromo23 wrote: ↑03 Jan 2025, 11:16The openmeteo-event is tailored to parse the JSON response of open-meteo.com
To parse the data of your inverter a new parser needs to be written.
Can you post the response of "192.168.1.199/solar_api/v1/GetInverterRealtimeData.cgi"
If it is not that complicated i could try to write one for you.
The normal_ESP32c6_4M316k... ?
Re: How to get weather on esp using API with key?
Inverter inquiry:
Code: Select all
http://192.168.1.199/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System
Code: Select all
{
"Body" : {
"Data" : {
"DAY_ENERGY" : {
"Unit" : "Wh",
"Values" : {
"1" : 119
}
},
"PAC" : {
"Unit" : "W",
"Values" : {
"1" : 36
}
},
"TOTAL_ENERGY" : {
"Unit" : "Wh",
"Values" : {
"1" : 23161700
}
},
"YEAR_ENERGY" : {
"Unit" : "Wh",
"Values" : {
"1" : 10309
}
}
}
},
"Head" : {
"RequestArguments" : {
"DeviceClass" : "Inverter",
"Scope" : "System"
},
"Status" : {
"Code" : 0,
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2025-01-03T12:03:38+01:00"
}
}
Last edited by kniazio on 03 Jan 2025, 12:05, edited 1 time in total.
Re: How to get weather on esp using API with key?
Looks a lot like the Victron plugin we recently added.
Only that is fetching data from serial.
Only that is fetching data from serial.
Re: How to get weather on esp using API with key?
Re: How to get weather on esp using API with key?
i´ll take a look at it.. it is simple enough

There are too many ESP32 around

Re: How to get weather on esp using API with key?
Thank you. I would be very grateful
Re: How to get weather on esp using API with key?
And more are coming, P4, H2, C5, C61... not certain they will all be supported by ESPEasy soon, but probably, one day...

/Ton (PayPal.me)
Re: How to get weather on esp using API with key?
Well C5 and C61 are not available yet, not even in test silicon (at least not to me yet...)
H2 and P4 are on my desk already, but I'm not sure if we will ever support the H2 as it does not have WiFi, only Zigbee/Thread.
Its only plus might be the low(er) power so it doesn't make sense to add Ethernet to it as it is then absolutely no low-power anymore.
The P4 also doesn't have WiFi, but it does have quite a lot other nice new features.
No idea when the final silicon will be available for the P4 as the one I have is a beta-version with known silicon bugs.
H2 and P4 are on my desk already, but I'm not sure if we will ever support the H2 as it does not have WiFi, only Zigbee/Thread.
Its only plus might be the low(er) power so it doesn't make sense to add Ethernet to it as it is then absolutely no low-power anymore.
The P4 also doesn't have WiFi, but it does have quite a lot other nice new features.
No idea when the final silicon will be available for the P4 as the one I have is a beta-version with known silicon bugs.
Re: How to get weather on esp using API with key?
Can you test the builds? It checks if the URL ends with "GetInverterRealtimeData.cgi?Scope=System" Output should be something like:
Code: Select all
627408: Inverter: Day Energy: 119, PAC: 36, Total Energy: 23161700, Year Energy: 10309
627777: EVENT: InverterReply=119,36,23161700,10309
Code: Select all
On InverterReply Do
LogEntry,'Day Energy: %eventvalue1% Wh'
Endon
Re: How to get weather on esp using API with key?
chromo23 wrote: ↑03 Jan 2025, 17:23Can you test the builds? It checks if the URL ends with "GetInverterRealtimeData.cgi?Scope=System"
c6_4M_ometeo_inverter.zip
Output should be something like:
You catch it with:Code: Select all
627408: Inverter: Day Energy: 119, PAC: 36, Total Energy: 23161700, Year Energy: 10309 627777: EVENT: InverterReply=119,36,23161700,10309
Code: Select all
On InverterReply Do LogEntry,'Day Energy: %eventvalue1% Wh' Endon
Code: Select all
SendToHTTP 192.168.1.199,80,"/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System"
>SendToHTTP 192.168.1.199,80,"/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System"
00:06:42.133 : (305024) Info : Inverter: Day Energy: 172, PAC: 0, Total Energy: 23161700, Year Energy: 10361
Re: How to get weather on esp using API with key?
For now it looks like this:
Rules:
Thanks to: @chromo23
Rules:
Code: Select all
on System#Boot do
timerSet,1,60 // Ustaw timer na 60 sekund
endon
on Rules#Timer=1 do
SendToHTTP 192.168.1.199,80,"/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System"
timerSet,1,60 // Kolejny odczyt za 60 sekund
endon
on InverterReply do
let,1,%eventvalue1% // Przypisz pierwszą wartość (DAY_ENERGY)
let,2,%eventvalue2% // Przypisz drugą wartość (PAC)
let,3,%eventvalue3% // Przypisz trzecią wartość (TOTAL_ENERGY)
let,4,%eventvalue4% // Przypisz czwartą wartość (YEAR_ENERGY)
taskvalueset,1,1,[VAR#1] // Przypisz do Dummy Device (pole 1)
taskvalueset,1,2,[VAR#2] // Przypisz do Dummy Device (pole 2)
taskvalueset,1,3,[VAR#3] // Przypisz do Dummy Device (pole 3)
taskvalueset,1,4,[VAR#4] // Przypisz do Dummy Device (pole 4)
logEntry,Dane falownika: DAY_ENERGY=[VAR#1] PAC=[VAR#2] TOTAL_ENERGY=[VAR#3] YEAR_ENERGY=[VAR#4]
endon
- Attachments
-
- inverter.jpg (160.91 KiB) Viewed 7979 times
Re: How to get weather on esp using API with key?
Variant2:
Rules:
Rules:
Code: Select all
on System#Boot do
timerSet,1,60 // Ustaw timer na 60 sekund
endon
on Rules#Timer=1 do
SendToHTTP 192.168.1.199,80,"/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System"
timerSet,1,60 // Kolejny odczyt za 60 sekund
endon
on InverterReply do
let,1,%eventvalue1% // DAY_ENERGY (Wh)
let,2,%eventvalue2% // PAC (W)
let,3,%eventvalue3% // TOTAL_ENERGY (Wh)
let,4,%eventvalue4% // YEAR_ENERGY (Wh)
// Przelicz wartości na kWh
let,5,[VAR#1]/1000 // DAY_ENERGY (kWh)
let,6,[VAR#3]/1000 // TOTAL_ENERGY (kWh)
let,7,[VAR#4]/1000 // YEAR_ENERGY (kWh)
logEntry,Dzień (kWh)=[VAR#5] Całość (kWh)=[VAR#6] Rok (kWh)=[VAR#7]
// Zapisz wartości do urządzenia Dummy Device (opcjonalne)
taskvalueset,1,1,[VAR#5] // DAY_ENERGY (kWh)
taskvalueset,1,2,[VAR#2] // PAC (W)
taskvalueset,1,3,[VAR#6] // TOTAL_ENERGY (kWh)
taskvalueset,1,4,[VAR#7] // YEAR_ENERGY (kWh)
endon
- Attachments
-
- inverter2.jpg (159.25 KiB) Viewed 7973 times
Re: How to get weather on esp using API with key?
Fronius Inverter url-s
- Attachments
-
- fronius.rar
- (596 Bytes) Downloaded 75 times
Re: How to get weather on esp using API with key?
I knew this would come so a made the parser more universal.

How-to:
1. add either #json or ?json to the end of the URL (either will always work) to tell ESPEasy that the response is in Json format.
example: SendToHTTP 192.168.1.199,80,"/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System?json"
2. create a file called json.keys and add the keys you want the values from (each key in an extra line):
example:
Code: Select all
Body.Data.DAY_ENERGY.Value
Body.Data.PAC.Value
4. grep the data with "On JsonReply Do"
EXTRAS:
1. grouping or separate calls with different URLs.
- add a number to #json or ?json e.g.: SendToHTTP 192.168.1.199,80,"/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System?json1"
- add the number + ":" to the key you want to group:
example:
Code: Select all
1:Body.Data.DAY_ENERGY.Value
2:Body.Data.PAC.Value
This way you can call more than one URL or put an array in a separate response, as the amount of eventvalues would probably be too long.
Rule example using %eventpar% to only have one rules block:
Code: Select all
On JsonReply* Do
If %eventpar% = 1
LogEntry,'%eventpar% 1: %eventvalue1% 2: %eventvalue2% 3: %eventvalue3%'
Elseif %eventpar% = 2
LogEntry,'%eventpar% 1: %eventvalue1% 2: %eventvalue2% 3: %eventvalue3%'
Endif
Endon
EDIT: When using groups in the key file but not adding a number at the end of the URL ALL keys will be parsed!
As requested per PM from @kniazio here the binary and a demo key file:
Re: How to get weather on esp using API with key?
I forgot to add the OpenMeteo event.
If you have already downloaded the file, please download it again.
Re: How to get weather on esp using API with key?
The values are read but:
In the previous file if the parameter value was "0" it was displayed in the log (PAC example)
Now if the value is "0" it is not displayed in the log which causes the value in DummyDevice to shift
This is how it is currently:
This is how it was in the previous version:
Unless I don't understand something
serial_log:
It says that it successfully read 4 keys and the response is only 3. Because one of the keys is "0" (PAC)
PAC is the instantaneous value of the inverter power and at night it is "0". And not only at night.
In the previous file if the parameter value was "0" it was displayed in the log (PAC example)
Now if the value is "0" it is not displayed in the log which causes the value in DummyDevice to shift
This is how it is currently:
Code: Select all
1536764: EVENT: http#192.168.1.199=200
1536769: EVENT: JsonReply=5360,23162302,10898
Code: Select all
1536764: EVENT: http#192.168.1.199=200
1536769: EVENT: InverterReply=5360,0,23162302,10898
serial_log:
Code: Select all
00:35:48.228 : (13408) Info : Successfully processed 4 out of 4 keys
00:35:48.233 : (17080) Info : ACT : timerSet,1,60
00:35:48.240 : (17176) Info : EVENT: http#192.168.1.199=200
00:35:48.245 : (17224) Info : EVENT: JsonReply=5360,23162302,10898
PAC is the instantaneous value of the inverter power and at night it is "0". And not only at night.
Re: How to get weather on esp using API with key?
What does the output looks like in your browser when PAC is 0?
Re: How to get weather on esp using API with key?
Code: Select all
{
"Body" : {
"Data" : {
"DAY_ENERGY" : {
"Unit" : "Wh",
"Values" : {
"1" : 536
}
},
"PAC" : {
"Unit" : "W",
"Values" : {
"1" : 0
}
},
"TOTAL_ENERGY" : {
"Unit" : "Wh",
"Values" : {
"1" : 23162302
}
},
"YEAR_ENERGY" : {
"Unit" : "Wh",
"Values" : {
"1" : 10898
}
}
}
},
"Head" : {
"RequestArguments" : {
"DeviceClass" : "Inverter",
"Scope" : "System"
},
"Status" : {
"Code" : 0,
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2025-01-04T21:27:56+01:00"
}
}
- Attachments
-
- fronius2.jpg (21.08 KiB) Viewed 7772 times
Last edited by kniazio on 04 Jan 2025, 22:14, edited 1 time in total.
Re: How to get weather on esp using API with key?
A lot has changed since then. The only thing i can imagine it, that the key in the keyfile is not right. I´ll investigate...
Re: How to get weather on esp using API with key?
Code: Select all
Body.Data.DAY_ENERGY.Values.1
Body.Data.PAC.Values.1
Body.Data.TOTAL_ENERGY.Values.1
Body.Data.YEAR_ENERGY.Values.1
Re: How to get weather on esp using API with key?
I found it... need to update the code...kniazio wrote: ↑04 Jan 2025, 22:17Code: Select all
Body.Data.DAY_ENERGY.Values.1 Body.Data.PAC.Values.1 Body.Data.TOTAL_ENERGY.Values.1 Body.Data.YEAR_ENERGY.Values.1
Re: How to get weather on esp using API with key?
I think you need to make an ESP32-C6 build...
/Ton (PayPal.me)
Re: How to get weather on esp using API with key?
There where things happening in the background...

Re: How to get weather on esp using API with key?
You are great. Everything is working as it should now.
Will there be the same compilation for esp32c6 someday?
- Attachments
-
- fronius3.jpg (21.97 KiB) Viewed 7746 times
Re: How to get weather on esp using API with key?
Hi! Can you show me what a controller looks like in the web interface with "#define FEATURE_OPENMETEO_EVENT 1" enabled? I'm just trying to compile the firmware in PIO for my board and I don't understand what the end result should look like yet.chromo23 wrote: ↑02 Jan 2025, 21:45You can now download a binary here for testing: https://github.com/letscontrolit/ESPEas ... 2590203835cccp79 wrote: ↑28 Dec 2024, 13:43 Like @chromo23, I also need to receive data from weather services without having physical sensors. You can tell me, I can't figure it out. Where can I find either a binary with support for the services that @chromo23 made, or what is the name of the plugin and where can I find it? thank you in advance.
Edit: I totally forgot, that I disabled by default and it is only available for custom build where you have to enable it with "#define FEATURE_OPENMETEO_EVENT 1" when this is merged with ESPEasy. But write here what binary you need and i can build you one for testing.
Short description from the code:
Generate an event with the response of an open-meteo request.
No need for an api key and it is free (daily requests are limited to 10,000 in the free version).
Visit the URL (https://open-meteo.com/en/docs) and build your personal URL by selecting the location and values you want to receive.
Supported variable kinds are current, hourly, daily!
In rules you can grep the reply by the kind of weather variables with “On OpenMeteo# Do …”.
e.g. “On OpenMeteo#current Do …”.
Note: hourly and daily results are arrays which can become very long.
Best to make separate calls, especially for hourly results.
Short how-to:
1. visit https://open-meteo.com/en/docs
2. select in the side menu your topic (e.g. Weather Forecast, Marine Forcast, Air Quality)
3. click together what you need and scroll down to the API Response section where you find this:
openM.png
(if you click on the "Open in new tab" you´ll get a preview with the data)
4. copy everything after "open-meteo.com"
5. use the copied part of the url with sendtohttp. example:`sendtohttp api.open-meteo.com,80,"/v1/forecast?..."` (make sure to use the quotes!)
Example:
Command:Response:Code: Select all
sendtohttp api.open-meteo.com,80,"/v1/forecast?latitude=52.5244&longitude=13.4105¤t=temperature_2m,relative_humidity_2m&daily=temperature_2m_max,temperature_2m_min,uv_index_max&timezone=Europe%2FLondon&forecast_days=3"
As 'forecast_days' is set to 3, we have three values for each daily variable. As these are combined, we have nine event values.Code: Select all
2580494: EVENT: OpenMeteo#current=4.3,76 2580503: EVENT: OpenMeteo#daily=7.5,2.4,1.2,1.5,-1.0,-1.1,1.00,0.95,0.70
"temperature_2m_max" can be accessed with %eventvalue1% - %eventvalue3%, "temperature_2m_min" with %eventvalue4% - %eventvalue6% and "uv_index_max" with %eventvalue7% - %eventvalue9%
Re: How to get weather on esp using API with key?
You're probably going to yell at me.
I didn't expect to have so much data.
They won't fit on the SSD1306 display.
I'd like to display the data on the ILI934x/ILI948x TFT display but it's not on the list in my Wemos D1 Mini
I am very sorry for the confusion
Here are my data:
I didn't expect to have so much data.
They won't fit on the SSD1306 display.
I'd like to display the data on the ILI934x/ILI948x TFT display but it's not on the list in my Wemos D1 Mini
I am very sorry for the confusion
Here are my data:
- Attachments
-
- fronius4.jpg (51.79 KiB) Viewed 7663 times
Re: How to get weather on esp using API with key?
Apparently, I did not understand something from the instructions (for some reason, I initially thought that this task was solved in the form of a plugin). I'm getting a response from OpenMeteo. But now I can't send the data to Dummy. Please help me. * I know that such API requests are for ESP32, but I managed to compile custom firmware for ESP-01S and now I want to try whether it will work or not. Don't swear too much)
Code: Select all
367384: ACT : sendtohttp api.open-meteo.com,80,'/v1/forecast?latitude=55.192375&longitude=37.786879¤t=temperature_2m,relative_hu
367548: EVENT: http#api.open-meteo.com=200
367552: EVENT: OpenMeteoReply=-4.3,82,-9.0,0.00,0.00,0.00,3,99,985.1,3.08,234
Code: Select all
On System#Boot do
timerSet,1,60
On Rules#Timer=1 do
timerSet,1,60
sendtohttp api.open-meteo.com,80,"/v1/forecast?latitude=55.192375&longitude=37.786879¤t=temperature_2m,relative_humidity_2m,apparent_temperature,precipitation,rain,snowfall,weather_code,cloud_cover,surface_pressure,wind_speed_10m,wind_direction_10m&wind_speed_unit=ms&timezone=Europe%2FMoscow&forecast_days=1"
Endon
On OpenMeteo do
let,1,%eventvalue1%
let,2,%eventvalue2%
let,3,%eventvalue3%
let,4,%eventvalue4%
taskvalueset,1,1,[VAR#1] // Przypisz do Dummy Device (pole 1)
taskvalueset,1,2,[VAR#2] // Przypisz do Dummy Device (pole 2)
taskvalueset,1,3,[VAR#3] // Przypisz do Dummy Device (pole 3)
taskvalueset,1,4,[VAR#4]
LogEntry,'Values : Temp=[VAR#1] Hum=[VAR#2] Baro=[VAR#3] UV=[VAR#4]'
Endon
- Attachments
-
- 2.png (43.28 KiB) Viewed 7637 times
-
- 1.png (39.74 KiB) Viewed 7637 times
Re: How to get weather on esp using API with key?
That plugin (P095) has to be enabled separately.
A major difference between P036 (OledFramed) and other display plugins is that P036 has a paging feature, that can alternate all available lines in groups (pages), so all data can be viewed. And also a scrolling feature for when lines are too long to fit in the display width.
Depending on font size and rotation, quite some data can fit on a TFT display, but the font can be really small

/Ton (PayPal.me)
Re: How to get weather on esp using API with key?
Not sure why you have your Dummy device connected to a remote unit (1)? Quite sure you didn't do that on purpose, as then the values will be transmitted from that unit if it's available in the P2P network. Set that option to 0 to have it work locally (as it was by default).
/Ton (PayPal.me)
Who is online
Users browsing this forum: No registered users and 3 guests