0 votes
in ESPaper by (210 points)
edited by
**UPDATE**

On further investigation, no weather info is retrieved from OpenWeatherMap. The Serial monitor shows the following:

About to call OpenWeatherMap to fetch station's current data...
[HTTP] Requesting resource at http://api.openweathermap.org:80/data/2.5/weather?id=991415&appid=APIKey_Hidden&units=metric&lang=en
[HTTP] failed to connect to host
[HTTP] Requesting resource at http://api.openweathermap.org:80/data/2.5/forecast?id=991415&appid=APIKey_Hidden&units=metric&lang=en
[HTTP] failed to connect to host
I have hidden my API Key, but it is correct. The response from Openweathermap is Failed to connect to host. I suspect that something has changed on OpenWeathermaps side, but I don't know enough about coding to find and fix this. can anyone help ?

Gordon

Anyone else with 2.9" ESpaper not seeing the current temperature and weather icon displayed ? The forecast temperature and icons do show

Gordon
by (19.9k points)
We cannot reproduce this and no other customer has come forward reporting the same issue. The URLs above work just fine here (if I replace the key of course). So, it appears as if some component in your local network or with your ISP was at fault here.
What happens if you paste those URLs into a browser on your computer?
by (210 points)
Hi , the URL's work when pasted into my browser.

I decided to start over, uninstalling and reinstalling Arduino IDE. I have some success as now the forecast data is displayed but not the current weather.

In the serial monitor I can see that the first API call for the current weather fails but the second one for the forecast connects successfully

Loading config
Failed to open config file
State: 1

About to call OpenWeatherMap to fetch station's current data...
[HTTP] Requesting resource at http://api.openweathermap.org:80/data/2.5/weather?id=991415&appid=APIKey_Hidden&units=metric&lang=en
[HTTP] failed to connect to host
[HTTP] Requesting resource at http://api.openweathermap.org:80/data/2.5/forecast?id=991415&appid=APIKey_Hidden&units=metric&lang=en
[HTTP] connected, now GETting data
start document

Waiting for time

DST Rules Updated:
DST Start: Sun Mar 26 02:00:00 2023
DST End:   Sun Oct 29 02:00:00 2023

Current time: 1682460905
UTC offset: 7200

WiFi: 88%
Min temp: 17.809999, max temp: 26.290001
Writing buffer
full init
***********set register Start**********
***********set register  end**********
Going to sleep
by (19.9k points)
I guess there's no way around experimenting with and analysing the connectivity between the devices and the WiFi access point - assuming you use our stock firmware (i.e. we rule out networking bugs).
by (210 points)
Hi Marcel, I am using stock firmware from you. This started happening all of a sudden. What is strange for me is that the first API call for current conditions fails but the second call for the forecast is successful

I now found some info that openweathermap have changed their API and how also how you call for the information. Here it is from another forum


    OpenWeatherMap has changed their API pretty drastically since this was written. The only absolutely free version I can find from them reports data in three hour chunks for five days at a time. I do not see a way to get a "today and tomorrow" summary like this is expecting.

    Alternatively you can give them credit card information and if you go over 1,000 requests per day they charge you $0.15 in blocks of 100 requests allowed. This just requires a small modification to the URL.
.
I don't have the expertise to make the necessary changes
by (19.9k points)
Don't believe everything you find on the internet :)

See https://openweathermap.org/price. What we use is still free: "Current Weather" and "3-hour Forecast 5 days" (up to 60 calls/minute, 1000000 calls/month). We do have support for the One Call API in the library but our apps don't make use of it yet.

Besides, "failed to connect to host" means the device can't even connect to the OWM server i.e. it fails before it even tries to fetch data from their application. Hence, there is no way rate limiting, quotas or the like could be responsible for this behavior.

This still isn't reproducible here.

What version of our ESP8266 Weather Station library do you use? What version are the sketches?
by (210 points)
Thanks for the friendly warning/reminder about the internet.

Ignoring that and starting over. Made sure all libraries are the latest

Mini Grafx  1.2.6
ESP8266 WeatherStation 2.1.0
Json Streaming Parser 1.0.5
simpleDSTadjust  1.2.0

Then made sure that ESP8266 boards in the board manger was the latest at 3.1.2 This is where it became interesting . No data at all. checking the serial monitor I see that both API calls fail with the message "failed to connect to host"

I the tried version 3.1.2, 3.1.1 and 3.1.0 with the same results

Version 3.0.2 gives me forecast data and only the first API call fails as in my previous posts

Could this be  the problem ? What version of the ESP8266 boards should i be running ?
by (19.9k points)
Thanks, interesting observation. Maybe you're on to something.

In your initial email you stated that "both suddenly stopped updating". This to us was an indication that something with your WiFi setup, your ISP or OWM might have changed. We assumed the firmware on your devices hadn't changed.

We will try to reproduce this here with different ESP8266 Arduino Core versions.

Please log in or register to answer this question.

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.

https://thingpulse.com

...