OpenWeather (DarkSky replacement) needs version 3.0 support

OW discarded the “old” 2.5 version of getting data which we used when testing openweather.

You now need an “paid for” 3.0 version’ Which, for normal websites, is also free as it has a large free allowance .

Check your openweather dashboard and select the proper 3.0 setup.


You then have to change line 38 in WS_Dark_Openweather.php|01|2023-09-09| from

$owm_version    = '2.5';

to

$owm_version    = '3.0';

Wim

Currently OpenWeather is mailing their users to update from the free API-2.5 to the paid for API-3.0

Please check your version of the script if you still use version 2.5
I scanned a few websites and there are some users with PHP 500 errors with the OpenWeather load script.

PWS_load_files.php (502) Darksky_______: time spent: 0.0105 - 
PROBLEM => http_code: 500, no valid data https://xxxxxxn.nl/PWS_Dark_Openweather.php?lang=nl-nl

From their mail:

One Call API 2.5 to One Call API 3.0 migration guide
https://openweathermap.org/one-call-transfer


The latest version of the pwsWD script → PWS_Dashboard 2012_lts updates

Succes,
Wim

I changed it and I still have the same problem:

Darksky file not read
http://pogodaslesin.vxm.pl/pogoda/fct_darksky_popup_daily.php?lang=pl&script=fct_block.php&theme=dark&lang=pl&units=metric

alternative DS data provider you are using: OpenWeatherMap.

I have nop idea what is hapening at your site.
There are multiple changes in the script.
I downloaded it again, just to be sure. First lines correct version are

<?php $scrpt_vrsn_dt  = 'PWS_Dark_Openweather.php|01|2023-09-09|';      # version: 2023-09-09 beta replacement for darksky users
#                                                                       # date          improvement
#                                                                       # ------------- ----------------------------------------------                                                                    
#-----------------------------------------------                        # 2024-05-09    removed unit error for US users
#         PWS-Dashboard - Updates and support by 
#     Wim van der Kuil https://pwsdashboard.com/
#-----------------------------------------------
#       display source of script if requested so
#-----------------------------------------------
if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {

Your version . . . ogoda/PWS_Dark_Openweather.php?sce=view

<?php $scrpt_vrsn_dt  = 'PWS_Dark_Openweather.php|01|2023-09-09|';  # new beta replacement for darksky users
#
header('Content-type: application/json; charset=UTF-8');
#-----------------------------------------------
#         PWS-Dashboard - Updates and support by 
#     Wim van der Kuil https://pwsdashboard.com/
#-----------------------------------------------
#       display source of script if requested so
#-----------------------------------------------
if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {

Your version is 5 lines shorter and has at least a dozen changes.
Please reload from PWS_Dashboard 2012_lts updates the zip dated
2024-05-09 Free download: PWS_Dark_Openweather.php.zip
Unzip and upload to your website.


Check if you entered the correct API-key as the data returned is empty.
I can not test any further as all keys are secret and can not be accessed or checked from the outside world.

Succes,
Wim

I changed the file and there is no difference. Or do I need to add API key to the
PWS_Dark_Openweather.php file?


Should I generate a new API-key? Was the old one supposed to be expired?

Your 2.5 API-key is not valid for 3.0
You need to generate a new API key for the 3.0 version to work.

Thank you. Indeed, I had to subscribe the One Call API 3.0 and now it works.