How to get weather on esp using API with key?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
cccp79
New user
Posts: 2
Joined: 06 Nov 2023, 10:24

How to get weather on esp using API with key?

#1 Post by cccp79 » 06 Nov 2023, 11:02

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.

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

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

#2 Post by Ath » 06 Nov 2023, 11:32

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.
/Ton (PayPal.me)

cccp79
New user
Posts: 2
Joined: 06 Nov 2023, 10:24

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

#3 Post by cccp79 » 06 Nov 2023, 11:50

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.

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

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

#4 Post by TD-er » 22 Nov 2023, 13:19

Please note you cannot use HTTPS (with the S) in ESPEasy

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests