• WxCenter OpenWeatherMap.org error

    From Vague@VERT/VAGUEBBS to Codefenix@VERT/CONCHAOS on Mon May 5 23:42:50 2025
    Hi again, Codefenix.

    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

    SBBS terminal has this:
    Node 1 <Vague> !JavaScript E:\sbbs\xtrn\wxcenter\wxcenter.js line 342: TypeError: wxObj[period] is undefined

    wxcenter.js line 342 is this:
    wxObj[period].temp,

    Any thoughts on what could be causing this?

    ---
    þ Synchronet þ Vague BBS - vague.ddns.net
  • From MRO@VERT/BBSESINF to Vague on Tue May 6 00:49:56 2025
    Re: WxCenter OpenWeatherMap.org error
    By: Vague to Codefenix@VERT/CONCHAOS on Mon May 05 2025 11:42 pm

    Hi again, Codefenix.

    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

    SBBS terminal has this:
    Node 1 <Vague> !JavaScript E:\sbbs\xtrn\wxcenter\wxcenter.js line 342: TypeError: wxObj[period] is undefined


    i recommmend you put in a feature you use multiple keys.
    i had to do that with my irc weather bot.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From Codefenix@VERT/CONCHAOS to Vague on Tue May 6 08:33:34 2025
    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 ]=-
  • From Vague@VERT/VAGUEBBS to Codefenix on Tue May 6 20:05:22 2025
    What's up, Codefenix.

    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)

    No luck. Change it to 3.0 and still got the error. Which is super annoying because they even state on their site:
    "Please note, that One Call API 3.0 is included in the "One Call by Call" subscription only. This separate subscription includes 1,000 calls/day for free and allows you to pay only for the number of API calls made to this product. Please note, that you do not need to subscribe to any other OpenWeather subscription plans to get access to the One Call API 3.0."

    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. :/

    Fair enough. I think I'm about to abandon the OWM portion of this.

    Thanks for the input, and have a good one.

    ---
    þ Synchronet þ Vague BBS - vague.ddns.net
  • From nelgin@VERT/EOTLBBS to Vague on Wed May 7 02:11:07 2025
    Re: WxCenter OpenWeatherMap.org error
    By: Vague to Codefenix on Tue May 06 2025 20:05:22

    No luck. Change it to 3.0 and still got the error. Which is super annoying because they even state on their site:
    "Please note, that One Call API 3.0 is included in the "One Call by Call" subscription only. This separate subscription includes 1,000 calls/day for free and allows you to pay only for the number of API calls made to this product. Please note, that you do not need to subscribe to any other OpenWeather subscription plans to get access to the One Call API 3.0."

    You missed the bit about "Please note that the subscription requires your bank card details".

    You're not going to get to 1000 requests in a day.

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
  • From Vague@VERT/VAGUEBBS to nelgin on Wed May 7 10:43:27 2025
    You're not going to get to 1000 requests in a day.

    You make a good point.

    ---
    þ Synchronet þ Vague BBS - vague.ddns.net
  • From MRO@VERT/BBSESINF to nelgin on Wed May 7 19:19:39 2025
    Re: WxCenter OpenWeatherMap.org error
    By: nelgin to Vague on Wed May 07 2025 02:11 am

    You missed the bit about "Please note that the subscription requires your bank card details".

    You're not going to get to 1000 requests in a day.

    you've never been in an irc channel with a bunch of old men who check the weather too much.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::