• Resolved Paul Hartman

    (@paul-hartman)


    I changed from Accuweather to OpenWeatherMap V3. I obtained an API key for “One Call API 3.0”. It has been over 12 hours since I added the API key to wp-forecast and I still receive the failure notice. Does it take longer than 12 hours for the API key to be activated? Do I need to sign up for the paid version? I ran the connection check and it looks like everything works.

    I tried Open-Meteo and I get the same failure notice, and the connection check also works.

    Is there something else I should look for?

    Checking for Weatherprovider OpenWeatherMap
    Checking default transport
    Test was successfull.
    Fetched 108 Bytes in 0 seconds.
    Checking fsockopen transport
    Test was successfull.
    Fetched 108 Bytes in 1 seconds.
    Checking exthttp transport
    Test was successfull.
    Fetched 108 Bytes in 0 seconds.
    Checking streams transport
    Test was successfull.
    Fetched 108 Bytes in 0 seconds.
    Checking curl transport
    Test was successfull.
    Fetched 108 Bytes in 0 seconds.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author tuxlog

    (@tuxlog)

    Hello Paul,

    can you please give some more infos about your setup. How is the latitude and longitude set or even better a screenshot of your settings but the api key blured. To me this behaviour is typical if the plugin is blocked by a security setting, but lets have a look at the settings first.

    Thread Starter Paul Hartman

    (@paul-hartman)

    I didn’t have latitude & longitude set — just zip code. I guess you need that for OpenWeatherMap. I added those and the error message changed. Looks like I have to sign up for a paid plan, the basic free plan doesn’t work. I was eventually going to do that anyway in case we went over 1000 calls in a day. I think it may take a few hours for the API to be active with the new plan, I am still getting an error message but hopefully it’ll start working soon.

    Here are current settings. Thank you for help!

    https://www.dropbox.com/scl/fi/jxdt54vzj0dhhwxbn4r2c/wp-forecast-settings.jpg?rlkey=yqpsztmn388uitgyuhs8kp6ds&dl=0

    Thread Starter Paul Hartman

    (@paul-hartman)

    Update: My other site that uses wp-forecast is now working. It had latitude & longitude already set correctly. I don’t know why the other site (lakeroland.org) had those empty!

    https://www.pawpoint.org/

    Scroll down — we are just using Sunrise/Sunset. Those are the open/close times for the park.

    Thread Starter Paul Hartman

    (@paul-hartman)

    And one more update: The first site is working. Thanks!

    https://www.lakeroland.org/

    Thread Starter Paul Hartman

    (@paul-hartman)

    Sorry to keep replying to myself…

    Question: Is there a way to show Sunset time using AM/PM 12-hour clock rather than 24-hour clock?

    Plugin Author tuxlog

    (@tuxlog)

    Hi Paul,

    thank you for the details. Good to hear it is working now. Currently there is no way to switch sunrise/sunset format from the admin dialog. I will think about changing the format to the format used with the WordPress site. If you want to change manually you can edit func-openweathermap.php and change lines 135 and 140 from

    $w['sunrise'] = $sr->format( 'H:i' ); to $w['sunrise'] = $sr->format( 'h:i A' );

    and

    $w['sunset'] = $ss->format( 'H:i' ); to $w['sunset'] = $ss->format( 'h:i A' );

    This should do the trick.

    Thread Starter Paul Hartman

    (@paul-hartman)

    I edited the PHP file, but it didn’t change the display.

        // sunset sunrise.
        $sr = new DateTime();
        $sr->setTimezone( $mtz );
        $sr->setTimestamp( $weather_array['daily']['0']['sunrise'] );
        $w['sunrise'] = $sr->format( 'h:i A' );
    
        $ss = new DateTime();
        $ss->setTimezone( $mtz );
        $ss->setTimestamp( $weather_array['daily']['0']['sunset'] );
        $w['sunset'] = $ss->format( 'h:i A' );

    https://www.lakeroland.org/
    https://www.pawpoint.org/

    (Scroll down to “Park Hours”.) Do I have to wait for the weather data to be refreshed?

    Thread Starter Paul Hartman

    (@paul-hartman)

    It’s working now. I just had to be patient and wait for it to refresh. Thank you for all your help!

    Plugin Author tuxlog

    (@tuxlog)

    Great to hear everything is fine now. I will change the format of sunrise and sunset to use the time format from the site with the next release. So you do not have to edit manually in the future.

    Thread Starter Paul Hartman

    (@paul-hartman)

    Excellent, thank you. I sent a donation. Great support!

    Plugin Author tuxlog

    (@tuxlog)

    Thank you for the donation Paul.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Failure notice from provider: No OpenWeathermap data available.’ is closed to new replies.