Subj : WxCenter OpenWeatherMap.org error
To : Vague
From : Codefenix
Date : Tue May 06 2025 08:33 am
Re: WxCenter OpenWeatherMap.org error
By: Vague to Codefenix@VERT/CONCHAOS on Mon May 05 2025 11:42 pm
Va> WxCenter is working great, so I got an API for openweathermaps. I tested
Va> it and got this:
Va> Enter city name / zip code (e.g.: Largo, FL, USA): Managua, NI Retrieving
Va> location data for MANAGUA, NI...done! Finding forecast office for
Va> 12.1544,-86.2738... Contacting OpenWeatherMap.org for
Va> 12.1544,-86.2738...!JavaScript wxcenter.js line 342: TypeError:
Va> wxObj[period] is undefined
You're probably still pointed to the One Call API 2.5, which was phased out last year. You may be able to simply update the URL to point to 3.0 instead of 2.5.
Find the const value for OWM_API_URL:
https://api.openweathermap.org/data/2.5/onecall .... (snipped)
Anyone who was previously using the 2.5 would have to also update their OWM
subscription in order to move to 3.0, but if your API key is new, then you *may* be able to change "2.5" to "3.0" and have it work just fine.
I sorta lost interest in APIs after the One Call shake up last year, but recently started reworking WxCenter to use Open-Meteo as the alternate API instead of OpenWeatherMap. It works, but I'm hesitant on whether I'll re-release the changes, since APIs can be unpredictable and I don't want to continue chasing down replacements when one breaks. :/
|15 � � � codefenix � � � ConstructiveChaos BBS � � � � �
|08 � � � (https/telnet/ssh)://conchaos.synchro.net � � �
|07
...When a man brings his wife flowers for no reason - there's a reason.
---
� Synchronet � -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-