How to get weather on esp using API with key?

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#51 Post by cccp79 » 05 Jan 2025, 13:35

Ath wrote: 05 Jan 2025, 13:22
cccp79 wrote: 05 Jan 2025, 12:55 Apparently, I did not understand something from the instructions
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).
like this? if so, it doesn't help. (No more controllers are defined, just rules and dummy device
Attachments
3.png
3.png (38.46 KiB) Viewed 2001 times

User avatar
Ath
Normal user
Posts: 4116
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to get weather on esp using API with key?

#52 Post by Ath » 05 Jan 2025, 13:58

Not sure why you deleted the Controller. Isn't that supposed to be used to send the data to? A Controller is something totally different from a Remote Unit. You only had to reset the Remote Unit to 0.
To start with a clean slate, you can delete the Dummy Device, and the re-create it, without setting the Remote Unit field, just to be sure it is set up correctly.
To avoid resetting the data and possibly running into a loop, the Dummy device should NOT be named OpenMeteo, as that event is hard-coded for this weather service, you can name it OpenMeteoData f.e.

The rule to set the values to the Dummy device is IMHO somewhat inefficient (not sure why the original author wrote it that way :?)
An improved version could look like this:

Code: Select all

On OpenMeteo Do // Handle response from OpenMeteo event, don't create any task named 'OpenMeteo' to avoid running into an endless loop!
  TaskValueSet,OpenMeteoData,Temp,%eventvalue1% // Przypisz do Dummy Device (pole 1)
  TaskValueSet,OpenMeteoData,Hum,%eventvalue2% // Przypisz do Dummy Device (pole 2)
  TaskValueSet,OpenMeteoData,Baro,%eventvalue3% // Przypisz do Dummy Device (pole 3)
  TaskValueSetAndRun,OpenMeteoData,UV,%eventvalue4% // Set UV value AND send to all connected Controllers
  
  LogEntry,'Values : Temp=%eventvalue1% Hum=%eventvalue2% Baro=%eventvalue3% UV=%eventvalue4%'

Endon
By using the task- and value- names in the taskvalueset commands you can have the Dummy device in any task without having to update rules, or when moving to a different ESP that already has another sensor in task 1 ;)
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 4116
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to get weather on esp using API with key?

#53 Post by Ath » 05 Jan 2025, 14:04

cccp79 wrote: 05 Jan 2025, 12:55

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&current=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 
...
Hm, this won't start on boot, as there's an 'endon' missing from the rules, and the timer can be run more efficient.

Code: Select all

On System#Boot Do    
  LoopTimerSet,1,60     // Repeat this timer every 60 seconds
Endon

On Rules#Timer=1 Do
  sendtohttp api.open-meteo.com,80,"/v1/forecast?latitude=55.192375&longitude=37.786879&current=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 
/Ton (PayPal.me)

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#54 Post by cccp79 » 05 Jan 2025, 14:29

No. It's not work(

Code: Select all

On System#Boot Do    
  LoopTimerSet,1,60     // Repeat this timer every 60 seconds
Endon

On Rules#Timer=1 Do
  sendtohttp api.open-meteo.com,80,"/v1/forecast?latitude=55.192375&longitude=37.786879&current=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 
  TaskValueSet 1,Outdoor,Temp,%eventvalue1% 
  TaskValueSet 1,Outdoor,Hum,%eventvalue2% 
  TaskValueSet 1,Outdoor,Baro,%eventvalue3% 
  TaskValueSet 1,Outdoor,UV,%eventvalue4% 
  LogEntry,'Values : Temp=%eventvalue1% Hum=%eventvalue2% Baro=%eventvalue3% UV=%eventvalue4%'
Endon
Attachments
5.png
5.png (158.49 KiB) Viewed 1984 times
4.png
4.png (91.59 KiB) Viewed 1984 times

User avatar
chromo23
Normal user
Posts: 912
Joined: 10 Sep 2020, 16:02
Location: germany

Re: How to get weather on esp using API with key?

#55 Post by chromo23 » 05 Jan 2025, 14:56

cccp79 wrote: 05 Jan 2025, 09:31 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.
Where did you compile this from? It seems to be an older version of openmeteo-reply. The latest one works as described in the post.
If you still want to use the older version (personally I wouldn't because all the data is combined into one event string. the new version splits this into current, hourly and daily) your rule block has to look like this:

Code: Select all

On OpenMeteoReply Do // Handle response from OpenMeteo event, don't create any task named 'OpenMeteo' to avoid running into an endless loop!
  TaskValueSet,OpenMeteoData,Temp,%eventvalue1% // Przypisz do Dummy Device (pole 1)
  TaskValueSet,OpenMeteoData,Hum,%eventvalue2% // Przypisz do Dummy Device (pole 2)
  TaskValueSet,OpenMeteoData,Baro,%eventvalue3% // Przypisz do Dummy Device (pole 3)
  TaskValueSetAndRun,OpenMeteoData,UV,%eventvalue4% // Set UV value AND send to all connected Controllers
  
  LogEntry,'Values : Temp=%eventvalue1% Hum=%eventvalue2% Baro=%eventvalue3% UV=%eventvalue4%'

Endon
cccp79 wrote: 05 Jan 2025, 12:55 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)
Using an esp8266 or esp8285 should also work, check the log for stability. I have added a warning if the reply message gets too long, as this can lead to instability on your device.
Last edited by chromo23 on 05 Jan 2025, 14:57, edited 1 time in total.

User avatar
Ath
Normal user
Posts: 4116
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to get weather on esp using API with key?

#56 Post by Ath » 05 Jan 2025, 14:56

Ah, you have to handle the event OpenMeteo#current:

Code: Select all

On OpenMeteo#current Do 
  TaskValueSet 1,Outdoor,Temp,%eventvalue1% 
  TaskValueSet 1,Outdoor,Hum,%eventvalue2% 
  TaskValueSet 1,Outdoor,Baro,%eventvalue3% 
  TaskValueSet 1,Outdoor,UV,%eventvalue4% 
  LogEntry,'Values : Temp=%eventvalue1% Hum=%eventvalue2% Baro=%eventvalue3% UV=%eventvalue4%'
Endon
Edit: This is tested using latest Github PR code ;)
/Ton (PayPal.me)

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#57 Post by cccp79 » 05 Jan 2025, 15:16

access to the Open-Meteo resource is broken((

Code: Select all

87302: EVENT: Rules#Timer=1,3
187311: ACT : sendtohttp api.open-meteo.com,80,'/v1/forecast?latitude=55.192375&longitude=37.786879¤t=temperature_2m,relative_hu
191374: EVENT: http#api.open-meteo.com=-1

User avatar
Ath
Normal user
Posts: 4116
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to get weather on esp using API with key?

#58 Post by Ath » 05 Jan 2025, 15:34

Ah, I got the same response just now, but I assumed it was me requesting from a yet unknown location. Probably they are taking a coffee break or something similar.
/Ton (PayPal.me)

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#59 Post by cccp79 » 05 Jan 2025, 15:40

Ath wrote: 05 Jan 2025, 15:34 Ah, I got the same response just now, but I assumed it was me requesting from a yet unknown location. Probably they are taking a coffee break or something similar.
They work strangely, I had the same thing two days ago and I decided that this was some kind of bug. Today, the requests went away all day before this time (It's a pity I didn't have time to try to achieve results (Tell me where to get the latest PR code from Git - I'm completely confused(

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#60 Post by cccp79 » 05 Jan 2025, 15:53

....Hallelujah!!! Works! Thanks a lot!!! So I have an update code?

Code: Select all

On System#Boot Do    
  LoopTimerSet,1,60     // Repeat this timer every 60 seconds
Endon

On Rules#Timer=1 Do
  sendtohttp api.open-meteo.com,80,"/v1/forecast?latitude=55.192375&longitude=37.786879&current=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 OpenMeteoReply Do // Handle response from OpenMeteo event, don't create any task named 'OpenMeteo' to avoid running into an endless loop!
  TaskValueSet,OpenMeteoData,Temp,%eventvalue1% // Przypisz do Dummy Device (pole 1)
  TaskValueSet,OpenMeteoData,Hum,%eventvalue2% // Przypisz do Dummy Device (pole 2)
  TaskValueSet,OpenMeteoData,Baro,%eventvalue3% // Przypisz do Dummy Device (pole 3)
  TaskValueSetAndRun,OpenMeteoData,UV,%eventvalue4% // Set UV value AND send to all connected Controllers
  
  LogEntry,'Values : Temp=%eventvalue1% Hum=%eventvalue2% Baro=%eventvalue3% UV=%eventvalue4%'

Endon
Attachments
6.png
6.png (28.99 KiB) Viewed 1945 times

User avatar
Ath
Normal user
Posts: 4116
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to get weather on esp using API with key?

#61 Post by Ath » 05 Jan 2025, 16:34

cccp79 wrote: 05 Jan 2025, 15:53 ....Hallelujah!!! Works! Thanks a lot!!! So I have an update code?

Code: Select all

On OpenMeteoReply Do // Handle response from OpenMeteo event, don't create any task named 'OpenMeteo' to avoid running into an endless loop!
Ah, you're still running the older version, as Chromo23 already expected. Not sure if a newer build was already available that uses the new event names (OpenMeteo#current, OpenMeteo#hourly and OpenMeteo#daily).
(I built mine from latest Github source)
/Ton (PayPal.me)

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#62 Post by cccp79 » 05 Jan 2025, 16:47

Ath wrote: 05 Jan 2025, 16:34
cccp79 wrote: 05 Jan 2025, 15:53 ....Hallelujah!!! Works! Thanks a lot!!! So I have an update code?

Code: Select all

On OpenMeteoReply Do // Handle response from OpenMeteo event, don't create any task named 'OpenMeteo' to avoid running into an endless loop!
Ah, you're still running the older version, as Chromo23 already expected. Not sure if a newer build was already available that uses the new event names (OpenMeteo#current, OpenMeteo#hourly and OpenMeteo#daily).
(I built mine from latest Github source)
Could you please share a link to latest Github source? I don't know Github well (

User avatar
Ath
Normal user
Posts: 4116
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to get weather on esp using API with key?

#63 Post by Ath » 05 Jan 2025, 16:53

cccp79 wrote: 05 Jan 2025, 16:47 Could you please share a link to latest Github source? I don't know Github well (
https://github.com/letscontrolit/ESPEasy/pull/5207
/Ton (PayPal.me)

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#64 Post by cccp79 » 05 Jan 2025, 16:57

Ath wrote: 05 Jan 2025, 16:53
cccp79 wrote: 05 Jan 2025, 16:47 Could you please share a link to latest Github source? I don't know Github well (
https://github.com/letscontrolit/ESPEasy/pull/5207
Thanks!!!

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#65 Post by cccp79 » 05 Jan 2025, 20:47

@chromo23
easyfetch & openmeteo is coolest things. Many thanks!
One sensor, one device and 8 sensors data))) Wow)))
Attachments
8.jpg
8.jpg (194.66 KiB) Viewed 1874 times
7.png
7.png (112.61 KiB) Viewed 1878 times

User avatar
chromo23
Normal user
Posts: 912
Joined: 10 Sep 2020, 16:02
Location: germany

Re: How to get weather on esp using API with key?

#66 Post by chromo23 » 05 Jan 2025, 20:53

cccp79 wrote: 05 Jan 2025, 20:47
@chromo23
easyfetch & openmeteo is coolest things. Many thanks!
One sensor, one device and 8 sensors data))) Wow)))
Thanks. I am glad to hear that it worked. :)

User avatar
chromo23
Normal user
Posts: 912
Joined: 10 Sep 2020, 16:02
Location: germany

Re: How to get weather on esp using API with key?

#67 Post by chromo23 » 05 Jan 2025, 21:14

Here a little "rules hack" to grep all the OpenMeteo reply's with one rules block:

Code: Select all

On OpenMeteo* Do
  If {ord:%eventpar%} = 99 // the ordinal/integer value of the first character of current is 99
    LogEntry,'%eventpar% 1: %eventvalue1% 2: %eventvalue2% 3: %eventvalue3%'
  Elseif  {ord:%eventpar%} = 104 // the ordinal/integer value of the first character of hourly is 104
    LogEntry,'%eventpar% 1: %eventvalue1% 2: %eventvalue2% 3: %eventvalue3%'
  Elseif  {ord:%eventpar%} = 100 // the ordinal/integer value of the first character of daily is 100
    LogEntry,'%eventpar% 1: %eventvalue1% 2: %eventvalue2% 3: %eventvalue3%'
  Endif
Endon

TD-er
Core team member
Posts: 9508
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to get weather on esp using API with key?

#68 Post by TD-er » 05 Jan 2025, 21:21

Just for your information, there is an ESP32-C3 with exactly the same form factor as the ESP-01S you are using there.
That one does have 4M flash, and thus is much easier to update.
Or you can simply replace the flash chip on that ESP-01S board with some 4M version.

User avatar
chromo23
Normal user
Posts: 912
Joined: 10 Sep 2020, 16:02
Location: germany

Re: How to get weather on esp using API with key?

#69 Post by chromo23 » 05 Jan 2025, 21:27

kniazio wrote: 05 Jan 2025, 09:58 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
kniazio wrote: 04 Jan 2025, 22:56 Will there be the same compilation for esp32c6 someday?
Can you tell me exactly what you need?
ESP8266 and/or ESP32C6? Both the same plugins?
Please list which ones you need?

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#70 Post by cccp79 » 05 Jan 2025, 22:02

TD-er wrote: 05 Jan 2025, 21:21 Just for your information, there is an ESP32-C3 with exactly the same form factor as the ESP-01S you are using there.
That one does have 4M flash, and thus is much easier to update.
Or you can simply replace the flash chip on that ESP-01S board with some 4M version.
Yes. of course I know these form factors. And I've already changed the memory to ESP-01(S). However, I want to test the old devices for simple and not so simple tasks with 1M on board.
I don't know much about memory usage, can you tell me if there is enough memory for such tasks or not?
managed to compile such an assembly. But I'm not sure if I did everything right(
Attachments
14.png
14.png (59.98 KiB) Viewed 1848 times
13.png
13.png (59.09 KiB) Viewed 1848 times
12.png
12.png (45.54 KiB) Viewed 1848 times
11.png
11.png (70.76 KiB) Viewed 1848 times

TD-er
Core team member
Posts: 9508
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to get weather on esp using API with key?

#71 Post by TD-er » 05 Jan 2025, 22:10

Problem with 1M flash is that you really need to strip out anything you don't need and you also have a much smaller file system.
If you want to store the EasyFetch files and maybe some extras, you can easily run into issues where saving settings may fail at some point due to file system fragmentation.

Also you cannot perform OTA updates on 1M builds so you need to take out the module each time you want to update it.
Replacing the flash chip for a 4MB version, makes this a lot easier.

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#72 Post by cccp79 » 05 Jan 2025, 22:13

TD-er wrote: 05 Jan 2025, 22:10 Problem with 1M flash is that you really need to strip out anything you don't need and you also have a much smaller file system.
If you want to store the EasyFetch files and maybe some extras, you can easily run into issues where saving settings may fail at some point due to file system fragmentation.

Also you cannot perform OTA updates on 1M builds so you need to take out the module each time you want to update it.
Replacing the flash chip for a 4MB version, makes this a lot easier.
Thank you. Everything is accessible and understandable. I want to test the ultimate strength.
4M flash - not soldered)
Attachments
16.jpg
16.jpg (282.36 KiB) Viewed 1836 times

TD-er
Core team member
Posts: 9508
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to get weather on esp using API with key?

#73 Post by TD-er » 05 Jan 2025, 22:59

Make sure to flash a 4M1M build after soldering the 4M flash module to it.

And you can backup the current settings if you like.
They should be compatible. (when shared between ESP8266/ESP8285, not ESP8266 vs. ESP32)

kniazio
Normal user
Posts: 101
Joined: 12 Jun 2016, 11:12

Re: How to get weather on esp using API with key?

#74 Post by kniazio » 06 Jan 2025, 06:55

Hello. The firmware for Wemos works perfectly. It turned out that I have several 2432s028r displays. They work with EspEasy on the 20241221 Display 4M firmware [ESP8266,ESP32,ESP32-S2/S3/C3] with the Display - TFT ILI934x/ILI948x display selection.
I kindly ask you to compile for these displays. I really want it.
Regards.
Ps.
This display is ideal for building a weather station using https://open-meteo.com/en/docs.
It has a very good integrated display that works perfectly with EspEasy
All you need is FIRMWARE @chromo23 :) for this display.
Here are the settings:
Attachments
spi2.jpg
spi2.jpg (26.81 KiB) Viewed 1677 times
spi1.jpg
spi1.jpg (18.71 KiB) Viewed 1677 times
spi.jpg
spi.jpg (45.57 KiB) Viewed 1677 times
PXL_20250106_065415350.jpg
PXL_20250106_065415350.jpg (198 KiB) Viewed 1677 times
PXL_20250106_053639971.jpg
PXL_20250106_053639971.jpg (209.99 KiB) Viewed 1677 times

TD-er
Core team member
Posts: 9508
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to get weather on esp using API with key?

#75 Post by TD-er » 06 Jan 2025, 08:28

Ohh that's a nice font!

Do you have a link to that 3D printed enclosure?

kniazio
Normal user
Posts: 101
Joined: 12 Jun 2016, 11:12

Re: How to get weather on esp using API with key?

#76 Post by kniazio » 06 Jan 2025, 08:37

TD-er wrote: 06 Jan 2025, 08:28 Ohh that's a nice font!

Do you have a link to that 3D printed enclosure?
There are tons of them on Thingverse
https://www.thingiverse.com/search?q=2432s028r&page=1

Please make firmware for this display with jsonparser.

kniazio
Normal user
Posts: 101
Joined: 12 Jun 2016, 11:12

Re: How to get weather on esp using API with key?

#77 Post by kniazio » 06 Jan 2025, 10:07

TD-er wrote: 06 Jan 2025, 08:28 Ohh that's a nice font!

Do you have a link to that 3D printed enclosure?
What happened in new versions with Mqtt Import?
The Apply Filters option is missing which works for me in the older version. How can I use mqtt import when I want to retrieve data by IDX?
Attachments
mqtt_old.PNG
mqtt_old.PNG (53.04 KiB) Viewed 1644 times
mqtt_new.png
mqtt_new.png (10.61 KiB) Viewed 1644 times

TD-er
Core team member
Posts: 9508
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to get weather on esp using API with key?

#78 Post by TD-er » 06 Jan 2025, 10:21

Might be that some features were turned off to make it all fit, but I guess Ton is the one who can answer the reasons about this change. (however he is occupied with his daytime job right now)

kniazio
Normal user
Posts: 101
Joined: 12 Jun 2016, 11:12

Re: How to get weather on esp using API with key?

#79 Post by kniazio » 06 Jan 2025, 11:53

TD-er wrote: 06 Jan 2025, 10:21 Might be that some features were turned off to make it all fit, but I guess Ton is the one who can answer the reasons about this change. (however he is occupied with his daytime job right now)
It's a bit strange because in all descriptions there is an option Apply Filter in Generic - MQTT Import
In my case there is only Apply mappings:

TD-er
Core team member
Posts: 9508
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to get weather on esp using API with key?

#80 Post by TD-er » 06 Jan 2025, 11:59

Like I said, Ton has been maintaining that plugin for the last few years, so if there have been any changes or built-choices, he is the one to know best.

With "all descriptions" I assume you mean the docs: https://espeasy.readthedocs.io/en/lates ... #p037-page
Ton is very keen on also updating the docs when making changes, so that should be in sync with the current implementation.
Still if there are features left out of some builds (though I don't know why it should on a "normal ESP32" build), then there might be features documented which you cannot see in your setup.
But like I said, Ton can tell you all about it.

Also your screenshot shows it is a build of 2022, so Ton may have renamed some labels/texts in the last 2 years...

kniazio
Normal user
Posts: 101
Joined: 12 Jun 2016, 11:12

Re: How to get weather on esp using API with key?

#81 Post by kniazio » 06 Jan 2025, 12:32

TD-er wrote: 06 Jan 2025, 11:59 Like I said, Ton has been maintaining that plugin for the last few years, so if there have been any changes or built-choices, he is the one to know best.

With "all descriptions" I assume you mean the docs: https://espeasy.readthedocs.io/en/lates ... #p037-page
Ton is very keen on also updating the docs when making changes, so that should be in sync with the current implementation.
Still if there are features left out of some builds (though I don't know why it should on a "normal ESP32" build), then there might be features documented which you cannot see in your setup.
But like I said, Ton can tell you all about it.

Also your screenshot shows it is a build of 2022, so Ton may have renamed some labels/texts in the last 2 years...
There is no such user as Ton. Enter the exact name of his nickname

TD-er
Core team member
Posts: 9508
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to get weather on esp using API with key?

#82 Post by TD-er » 06 Jan 2025, 12:59

Ath at the forum here.
And tonhuisman at GitHub.

Since I do speak him daily via Signal, I just out of habbit wrote down his first name.

kniazio
Normal user
Posts: 101
Joined: 12 Jun 2016, 11:12

Re: How to get weather on esp using API with key?

#83 Post by kniazio » 06 Jan 2025, 19:10

Will jsonparser be added to all builds someday?

This is a very useful feature

Respect to @chromo23

User avatar
chromo23
Normal user
Posts: 912
Joined: 10 Sep 2020, 16:02
Location: germany

Re: How to get weather on esp using API with key?

#84 Post by chromo23 » 06 Jan 2025, 20:35

kniazio wrote: 06 Jan 2025, 19:10 Respect to @chromo23
Actually respect to Ath and TD-er. I only contribute every now and then, but these two people maintain and keep improving ESPEasy every day. So big thanks and kudos to them! My work is just like adding a shelf here and there in an already very well equipped apartment :)

kniazio
Normal user
Posts: 101
Joined: 12 Jun 2016, 11:12

Re: How to get weather on esp using API with key?

#85 Post by kniazio » 07 Jan 2025, 05:52

chromo23 wrote: 06 Jan 2025, 20:35
kniazio wrote: 06 Jan 2025, 19:10 Respect to @chromo23
Actually respect to Ath and TD-er. I only contribute every now and then, but these two people maintain and keep improving ESPEasy every day. So big thanks and kudos to them! My work is just like adding a shelf here and there in an already very well equipped apartment :)
So big thanks to the whole team. I asked if jsonparser will be added to all EspEasy builds in the future. I think it's a great feature for ESP.

TD-er
Core team member
Posts: 9508
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to get weather on esp using API with key?

#86 Post by TD-er » 07 Jan 2025, 10:04

Just as a general statement about new features;

- ESP8266 does have a 'feature freeze' in the sense that any new plugin or feature will not be included in the standard builds. You may be able to use it in a 'custom' build unless specifically excluded. (e.g. "Touch" is a feature not available on ESP8266 and only on some ESP32 variants and SSL will simply not work on ESP8266 due to RAM limitations)
- If a feature or plugin is not included in a specific build (e.g. "collection", "climate", "display", etc.) due to size restrictions, then it will likely not be added to those builds in the future.
- Builds for nodes with 8M or 16M flash, we have the "max" builds, which will contain "everything".

N.B. I am working on a 2-stage update option, which does free up enough space on 4M ESP32 boards so we can make "MAX" builds for all. (at least considering the build size of the current "max" builds)

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#87 Post by cccp79 » 09 Jan 2025, 14:55

Can you tell me if I'm doing this right? To compile the build for 1M with openmeteo. I'm only making changes to the Custom file.h and select the default environment in platformio.ini, then click build?

User avatar
Ath
Normal user
Posts: 4116
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to get weather on esp using API with key?

#88 Post by Ath » 09 Jan 2025, 15:01

When building a Custom.h build, you must choose the desired hardware (ESP8266 1M, not ESP8266 4M1M in your case) with also Custom in the name.
/Ton (PayPal.me)

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#89 Post by cccp79 » 09 Jan 2025, 15:13

Ath wrote: 09 Jan 2025, 15:01 When building a Custom.h build, you must choose the desired hardware (ESP8266 1M, not ESP8266 4M1M in your case) with also Custom in the name.
Yes I know and do it.
Could you help me build with openmeteo and json a binary for 1M with the plugins and controllers selected here. My build is successful, but I can't see the network, I can't find the initial espeasy network. I do not know why(
Attachments
Custom (1).rar
(8.95 KiB) Downloaded 11 times

User avatar
Ath
Normal user
Posts: 4116
Joined: 10 Jun 2018, 12:06
Location: NL

Re: How to get weather on esp using API with key?

#90 Post by Ath » 09 Jan 2025, 21:17

You could set up your network credentials in the Custom.h file (better not share that version here), but you'll have to clear the entire flash before flashing that build, to have it use the Custom.h defaults. The ESP should use DHCP by default. If you have a serial connection available, you can use the Monitor item (2 items below the Build menu-item in VSCode) to get the serial log and terminal. When selecting that log window, you can type commands (no echo until you press Enter), and use the command ip to have the ip-address it got from DHCP, revealed.

If adding your WiFi credentials in Custom.h doesn't work as intended, you can also use these commands to set up WiFi:

Code: Select all

wifikey,<your-AP-name>
wifipass,<your-super-secret-wifi-password>
save
After you issue the save command, the settings will be saved, and the wifi connection retried.
NB: You can't use backspace to correct any typos... just type the command correct, or retry if you make a typo ;)

AFAICS, you have all the other settings as expected, including the Thingspeak, Open-meteo and JSON parsing features.
/Ton (PayPal.me)

User avatar
chromo23
Normal user
Posts: 912
Joined: 10 Sep 2020, 16:02
Location: germany

Re: How to get weather on esp using API with key?

#91 Post by chromo23 » 10 Jan 2025, 14:43

cccp79 wrote: 09 Jan 2025, 15:13 Could you help me build with openmeteo and json a binary
kniazio wrote: 06 Jan 2025, 06:55 I kindly ask you to compile for these displays.

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#92 Post by cccp79 » 10 Jan 2025, 15:51

chromo23 wrote: 10 Jan 2025, 14:43
cccp79 wrote: 09 Jan 2025, 15:13 Could you help me build with openmeteo and json a binary
ESP_Easy_mega_20250110_custom_274_ESP8266_1M.bin.zip
kniazio wrote: 06 Jan 2025, 06:55 I kindly ask you to compile for these displays.
ESP_Easy_mega_20250110_collection_A_ESP32_4M316k.bin.zip
I will try later. many thanks!

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#93 Post by cccp79 » 10 Jan 2025, 15:53

The problem actually came out of nothing. After I got the weather, I decided to give it to a friend. And couldn't reconnect the esp to another network (WIFI scan didn't give results(

kniazio
Normal user
Posts: 101
Joined: 12 Jun 2016, 11:12

Re: How to get weather on esp using API with key?

#94 Post by kniazio » 10 Jan 2025, 17:32

Many, many thanks!

cccp79
Normal user
Posts: 25
Joined: 06 Nov 2023, 10:24
Location: RU

Re: How to get weather on esp using API with key?

#95 Post by cccp79 » 10 Jan 2025, 17:56

chromo23 wrote: 10 Jan 2025, 14:43
cccp79 wrote: 09 Jan 2025, 15:13 Could you help me build with openmeteo and json a binary
ESP_Easy_mega_20250110_custom_274_ESP8266_1M.bin.zip
kniazio wrote: 06 Jan 2025, 06:55 I kindly ask you to compile for these displays.
ESP_Easy_mega_20250110_collection_A_ESP32_4M316k.bin.zip
do not up AP mode((
the same thing happened when I compiled it myself from the current sourcecode(


serial port output

Code: Select all

╜пМхeсИcN╚♥xт%Vaвe!МИЖН(ДaИг00:01:11.466 : (25360) Info   : WD   : Uptime 1  ConnectFailures 0 FreeMem 25496 WiFiStatus: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
00:01:20.225 : (25440) Info   : WIFI : Disconnected! Reason: '(1) Unspecified'
00:01:20.427 : (25440) Info   : WIFI : Disconnected! Reason: '(1) Unspecified'
00:01:20.529 : (25472) Info   : Reset WiFi.
00:01:22.816 : (25376) Info   : WIFI : Set WiFi to OFF
00:01:23.033 : (25536) Info   : WIFI : Set WiFi to STA
00:01:41.459 : (25200) Info   : WD   : Uptime 2  ConnectFailures 0 FreeMem 25336 WiFiStatus: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED
00:02:11.463 : (25200) Info   : WD   : Uptime 2  ConnectFailures 0 FreeMem 25336 WiFiStatus: WL_IDLE_STATUS 0 ESPeasy internal wifi status: DISCONNECTED

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest