Re: WxCenter OpenWeatherMap.org error
By: Vague to Codefenix@VERT/CONCHAOS on Mon May 05 2025 11:42 pm
WxCenter is working great, so I got an API for openweathermaps. I tested it and got this:
Enter city name / zip code (e.g.: Largo, FL, USA): Managua, NI Retrieving location data for MANAGUA, NI...done! Finding forecast office for 12.1544,-86.2738... Contacting OpenWeatherMap.org for 12.1544,-86.2738...!JavaScript wxcenter.js line 342: TypeError: 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 ]=-