Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "connection to weather data failed #288

Open
n7qnm opened this issue Apr 22, 2024 · 20 comments
Open

Getting "connection to weather data failed #288

n7qnm opened this issue Apr 22, 2024 · 20 comments

Comments

@n7qnm
Copy link

n7qnm commented Apr 22, 2024

I have 4 scrollers, one for each US TimeZone - About a week ago, they all started showing "Connection for Weather Data Failed". If I connect to them and refresh data, the data will show for some period of time; but then start failing again. Wondering if I'm rate-limiting on OpenWeather, of if they've changed their T&Cs

@Qrome
Copy link
Owner

Qrome commented Apr 22, 2024

That is a good question. I run a few as well but have only seen this if I am working on it and do a constant reboot. They limit the number of calls in a period of time. Maybe increase the time between refresh?

@Barkingmad15
Copy link

I'm suffering this too, in the UK. I logged into Openweather & noticed they longer showed the city name where I am! I changed it to one 2 miles away & it worked for a short period & then started the error again. I have tried a new API key, refreshing the data at different times, I even reflashed the whole device but have the same issue. If I log onto the web portal screen it shows the weather data fine. If I go into the settings & click on save, it works once only & then back to the error. I can't even disable the weather, or I'd do that! I mostly wanted it for time & temperature but of course the temperature is always wrong. Be very interested if there is a fix to this.

@n7qnm
Copy link
Author

n7qnm commented Apr 30, 2024 via email

@Qrome
Copy link
Owner

Qrome commented Apr 30, 2024

I will take a look at it when I get time.

@Barkingmad15
Copy link

Thank you that would be very much appreciated

@Qrome
Copy link
Owner

Qrome commented Apr 30, 2024

I am having a hard time replicating this issue. Would it be possible for you to capture the Serial Monitor Log for the weather request when it fails? I would like to see if we can get the HTTP response code or if it is just a connection issue. If the response code is 400 level -- like 429 -- you might be hitting your request limit. I have 5 running all the time and never hit my limit.

I am wondering if they are treating different countries or regions differently. I am in the US.

@n7qnm
Copy link
Author

n7qnm commented Apr 30, 2024 via email

@n7qnm
Copy link
Author

n7qnm commented Apr 30, 2024 via email

@Qrome
Copy link
Owner

Qrome commented Apr 30, 2024

I also am running 5 units and do not see this issue. I am curious what do you have your minutes between refresh set to? It defaults to 15 minutes? Maybe you should try reducing that if you have changed it.

@n7qnm
Copy link
Author

n7qnm commented May 1, 2024 via email

@Barkingmad15
Copy link

I took have tried multiple settings for refresh times & all after an initial successful first run default back to connection error. Oddly though the correct info shows in the web portal. I'm not good at coding, despite trying to learn, but would it be easy to change provider?

@Qrome
Copy link
Owner

Qrome commented May 1, 2024

Please use the serial monitor and capture the error and post it here.

@Barkingmad15
Copy link

Sorry for the delay. I hope this is what you need, I'm not great with Arduino IDE 😬 It doesn't have the news API inserted as I don't need that feature, but I have had it in the past with the same results.

connection for time data failed

Time update unsuccessful!
Getting News Data for reuters
Please provide an API key for the News.
Version: 3.03

Getting Weather Data
GET /data/2.5/group?id=2633521&units=metric&cnt=1&APPID=7be6a0488c696b9746226468bdeb89e4 HTTP/1.1
connection for weather data failed

Updating Time...
News Data for
Getting Time Data for 50.8145,-0.3713
GET /v2.1/get-time-zone?key=9JYVVJFGU80O&format=json&by=position&lat=50.8145&lng=-0.3713 HTTP/1.1
connection for time data failed

Time update unsuccessful!
Getting News Data for reuters
Please provide an API key for the News.
Version: 3.03

Displays: 8
Signal Strength (RSSI): 58%

@Qrome
Copy link
Owner

Qrome commented May 4, 2024

So, looking at the code and where that message is created, it is a connection issue to the endpoint -- not making it to the end point. It is also interesting to note that the TimeDB call -- yet a different API call is also failing to make a connection even though the GET request looks correct. I am not able to replicate this. Can you check and make sure your device is not getting dumped from the DHCP -- or check how long the device can keep the IP. I don't think this is a coding issue but appears to be a connection issue. I am not able to replicate it.

@Barkingmad15
Copy link

I will try to look through the router logs tomorrow, but the IP shouldn't be an issue as I assigned a static one just to avoid those kinds of issues.

@Barkingmad15
Copy link

Spent a fair bit of time today, going through router settings & there is no issue there, I was making sure it's not isolated or blocked which it isn't. There does not seem to be any connection issues on the router end. The odd thing is, if I manually click refresh the data, it retrieves the weather info but not the time. If I leave it to auto update it fails after the intial connection. Anyway, spent way too much time on this. Thank-you for the design & the help but I think i'll just recylce it down to another project now :)

@Qrome
Copy link
Owner

Qrome commented May 6, 2024

@Barkingmad15 -- thanks for the comments, sorry it isn't working for you. I reached out to a few buddies that are also running it, and none of us are seeing the issues you mentioned. Good luck with your new hardware adventure.

@Qrome Qrome closed this as completed May 6, 2024
@Qrome
Copy link
Owner

Qrome commented May 7, 2024

@n7qnm - I will open this again as requested, but honestly, only 2 people have had this connection issue. It does not appear to be wide spread as I have confirmed with others using it as my self. PLEASE provide useful information. The logs reported by Barkingmad show that he was having connection issues to both the TimeDB api as well as the weather. The connection failed on making a HTTP connection on port 80. This does not appear to be a coding issue.

Please provide logs from your Serial Monitor -- other guessing does not help.

Please confirm that your DHCP server is not expiring the IP addresses of the devices.
Make sure you have not over loaded your API key or that other people are not using it.

@Qrome Qrome reopened this May 7, 2024
@n7qnm
Copy link
Author

n7qnm commented May 8, 2024 via email

@n7qnm
Copy link
Author

n7qnm commented May 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants