No UK weather warnings from MeteoAlarm

I presume so. . . :slightly_frowning_face:

Hi Wim
for ref these sites are in my Saratoga template
No current alerts for: “Lancashire (UK273); Merseyside (UK279); Greater Manchester (UK259); Derbyshire (UK237); Cumbria (UK233); Isle of Anglesey (UK268); County Down (UK229)”.

my station latitude and longitude below is for Ballaugh Isle of Man
$lat = (float) ‘54.3133’; $lon = (float) ‘-4.5439’;

Isle of Man Home Weather Station (wd version)
is the site i have with eu meteo set with UK233
the other
Isle of Man Home Weather Station (WDapi version)
uses uk metoffice with nw

The Saratoga get-meteoalarm-warning-inc.php script does not currently support polygon-only returns from the meteoalarm feeds… it only supports alerts with embedded EMMA_ID or NUTS[2|3] codes. I’m working on an update…, but for now NO UK or SE alerts will show.

2 Likes

That site should work with the updates I sent you yesterday by mail.
This screenshot is from my in-home Mac with your lat/lon and UK233 settings.

Succes,
Wim

Visit https://pwsdashboard.be/pwsWD/list_warn_keys.php and select UK

Current meteoalarm UK warnings

country code type expires polygon area-description
UK UK_Central, Tayside & F polygon 2024-10-21 60.861,-0.5603 Central, Tayside & Fife - Grampian - Highlands & Eilean Siar - North East England - North West England - Orkney & Shetland - Strathclyde - SW Scotland, Lothian Borders
UK UK_East Midlands - East polygon 2024-10-18 52.7695,0.0055 East Midlands - East of England - London & South East England - South West England - West Midlands
UK UK_Highlands & Eilean S polygon 2024-10-21 58.9387,-5.4272 Highlands & Eilean Siar - Strathclyde
UK UK_Northern Ireland polygon 2024-10-20 55.2447,-6.1249 Northern Ireland
UK UK_South West England - polygon 2024-10-20 52.0187,-4.411 South West England - Wales

Only the first part of the polygon is shown.

The complete test file with all “current” warnings used to generate that table. The file ↔ table can be up to 8-12 hours different compared to the latest meteoalarm file.

@ALL UK PWS_Dasboard users

Please post here before downloading (use your private token) the “test” version from the recent updates page

I still need extra tests as there are only a few users who use the “polygon” version of the EU-warning scripts and every country seems to use slightly different formatting.

So first post here

  1. the link to your website
  2. The latitude and longitude for your easyweather settings
  3. The area-code(s) as used in your easyweather settings

I will test if the scripts work with those settings.

If it works you can download the updated scripts and please test those very carefully. Make screenshots if it seems incorrect.


For users without a download token, please switch to the UK version of the scripts in your easyweather settings.

Succes,
Wim

Limited what I can do with iPad so cannot ftp to host but have got the files on this http://ballaugh.no-ip.biz:59202/pwsWD1/index.php to test with UK233 in or should I have my lat/lon in there
The box where the alert symbol should be is blank I assume this because the alerts for the UK have expired
I will upload the files to my host this evening once I have the laptop up and running to do ftp
$lat = (float) ‘54.3133’; $lon = (float) ‘-4.5439’;

Sadly, something went wrong.

You do not have to modify the scripts.

  1. They should detect if there are warnings based on your easyweather settings.
  2. The box should always have a text such as “Have a good day”

The new meteoalarm scripts failed and the alert box script generated an error.

Warning: Undefined variable $wrnStrings in /volume1/web/pwsWD1/advisory_c_small.php on line 93


EDIT 09:16 UTC
My test system still shows the same warning.
I tested and something must have gone wrong by uploading the scripts to your wewbserver.


Currently, as we are testing, the old warnings are also shown for an extra 24 hours.
Line 56 in wrnWarningEU-CAP2.php|02|2023-12-04| now reads

$test = 1243600; // use old warnings for test
If the scripts work OK you can set that value to 0.
$test = 0; // use old warnings for test

Thanks,
Wim

As I suspected, the area shown in the warning comes from the first area in the “areaDesc” field. So when I put Edinburgh UK249 alone in my list of geocodes I still get “Central, Tayside & Fife” instead of “SW Scotland, Lothian Borders”.

I will have to change to the UK script, which brings its own different problems.

Please note that all my dashboard warning problems come from the UK Met Office, not from Wim’s scripts!

ok i got the laptop running redownload the updated file and uploaded to both test pwsWD1’s
Isle of Man Home Weather Station main test (wd version)
and
Isle of Man Home Weather Station local test (wd version)
both initally came up blank and the module test gave the error
then put 1243600 in place of 0 on line 56 which is how they are currently set and got the warnings will change back to 0 later

I agree.
I will add a setting for default description of your area.
In your case f.i. “Lothian”

And add code to scan the list of areas and display either the azrea description which contains the default or otherwise the 1 area description.

We could use the easyweather field which is now used to enter UK249 for that.
or better the field below that one, it is used for Canada only as they need two items.

Will do some testing,

Wim

Attached an adepted version;
Easyweather settings should look like:

           $alarm_area = 'UK249';
             $province = 'Lothian';

Result:

I think we should add, after the “province” text, something like “and other regions”
But we can not put the whole text as that can be very , very long.

Please test,

Wim
wrnWarningEU-CAP2.php.zip (9.8 KB)

1 Like

ok have updated the file in both links in my previous post also put Cumbria in the canada line for area UK233 in my case

1 Like

Thanks, Wim.

EDIT: works fine, many thanks!

I presume that I don’t need all the other geocodes because they are probably included in the same polygon as UK249? And anyone interested enough can go to the info icon at the end of the title line.

Exactly, one should use one old code just to have it when they decide to start using the geocodes again.

All UK warnings need to be scanned if the stations location (lat/lon) is inside the polygon area(s0 for the warning.

What a waste of computer time for the calculations and the extra bandwidth as a polygon-text string is about 100-1000 times larges as a few area-codes.

Regards,
Wim

1 Like

So now the alerts are out of date the advisory box is blank and the module test shows the error in line 93 as mentioned in earlier posts which I assume is stopping the have a nice day message

Yes, sadly there are different test versions of those scripts.
wrnWarningEU.php.zip (5.3 KB)

Please test this version.

Wim

My alarms worked fine on test yesterday, and I get a forecast in the advisory block today, but using module_test on the advisory block I get an error message:

Warning : file_put_contents(./_my_settings/wrnAlarmGeoCodes.arr): Failed to open stream: Permission denied in /var/www/weather/htdocs/pws/wrnWarningEU.php on line 207

which is

file_put_contents  ('./_my_settings/wrnAlarmGeoCodes.arr', serialize ($use_areas));

I think the write permissions for the folder _my_settings/ are too restrictive.
Probably it is not allowed to add a file.
One can update a file, otherwise easyweather could not work.


In a next version this week I will move that file to the jsondata/ folder but I have to check and test the scripts

Thanks for the message, others could also run into this.

Wim

Changed permissions temporarily and now I have a blank advisory block and the same error message as @hcorrin. I’ll try the latest download of wrnWarningEU.php

EDIT

  1. OK, installed the latest version of wrnWarningEU.php
  2. Tested warnings using 2 * 24 * 3600, all OK
  3. File wrnAlarmGeoCodes.arr saved to …/_my_settings/
  4. Turned off test, got a forecast back

Looks like it is working :slightly_smiling_face:

1 Like