No UK weather warnings from MeteoAlarm

UK seems to have started using polygons instead of geocodes. . . :slightly_frowning_face:

feeds.meteoalarm.org/api/v1/warnings/feeds-united-kingdom

I have switched from wrnWarningEU-CAP.php to wrnWarningUK.php (which gives times in UTC).

Yes it seems so.

Hi,

There seems to be a new problem.
The data from other countries that also use polygons is interpreted correctly.

The test program Check for updates shows correct data for f.i. Sweden (SE) and others.
But the UK data confuses the script resulting in invalid data.

I will dig into this shortly.
What lat/lon are you using in easyweather_setup for your station?

Regards,
Wim

Saratoga template not showing uk warnings either

I was going to ask whether that script worked. . .

lat 55.8983, lon -3.2077

I used to use these geocodes:

and in wrnWarningUK.php I use area ‘dg’

Saratoga script get-meteoalarm-warning-inc.php is basically the same as wrnWarningEU-CAP.php, I’ve sent Ken a PM.

I wonder why meteoalarm waited till we needed the alarms to make this change to my mind there was nothing wrong with the geo codes
At least the uk met office alerts till works on

And that just uses nw in the area code
The island weather and alerts are not included in the met office system or meteoalarm so have to use closest to the island for my website

Yes, I’m using that now with area ‘dg’. But “valid” times are in UTC, not BST.

Only till next weekend when the clocks go back

If polygons use my stations lat and long I will never get an alert so would need to hard code a location in say Cumbria in the script to get an alert nearest to me

That’s true :laughing:

Interestingly, you are “included” in the warning area at UK weather warnings - Met Office – presumably because it includes Northern Ireland.

@bitsostring and @hcorrin

I am not clairvoyant.
Please post the station latitude/longitude and Alarm-Areas you specified in your easyweather-settings.

Then I can test why the scripts do not work

Regards,
Wim

I did: No UK weather warnings from MeteoAlarm - #4 by bitsostring

OK, the meteoalarm scripts 2023-11-30 work , I get for

                  $lat = (float) '55.8983'; #'63.7925349';   55.85535,-4.397259
                  $lon = (float) '-3.2077'; #'4.34';

and the area codes from the map

           $alarm_area = 'UK249,UK224,UK253,UK252,UK292,UK344,UK249,UK245,UK282,UK321,UK314';

2 (two) weather warnings.

wrnWarningEU.php (171) include =>meteoalarm-centroids.php
wrnWarningEU-CAP2.php (35) loaded  =>wrnWarningEU-CAP2.php|02|2023-12-04|
wrnWarningEU-CAP2.php (134) To check: UK
wrnWarningEU-CAP2.php (142) try to load  =>https://feeds.meteoalarm.org/api/v1/warnings/feeds-united-kingdom
wrnWarningEU-CAP2.php (530) UK_warnings: CURL OK for https://feeds.meteoalarm.org/api/v1/warnings/feeds-united-kingdom time spent: 0.2181 seconds
wrnWarningEU-CAP2.php (155) warning data loaded OK UK_warnings
wrnWarningEU-CAP2.php (170) Size feeds-united-kingdom json =23.3 kb  array_size=63.85 kb time used: 0.0002 seconds
wrnWarningEU-CAP2.php (256) warnings: 6 used areas/language: 2 other areas/languages: 3 future: 0 to-old: 1 Errors - no-array: 0 missing: 0 no_area: 5 alert_plgn: 5 checked polygons: 5
wrnWarningEU-CAP2.php (259) Checked if alerts available for UK_warnings: time used: 0.0101 seconds
wrnWarningEU.php(210) Polygons saved =2
wrnWarningEU.php(213) polygon lookups united-kingdom => 5 |  $answrs=1
_test.php (24): Max memory used: 2 mb(2097152 bytes). Duration: 0.23597 seconds. PHP_version: 8.2.0

I checked your version of the scripts. Seems you are using the pre-polygon versions.

I mailed a zip,

Succes with testing,

Wim

Thanks, Wim

Problem is that “Central, Tayside and Fife” (ta) is not my area, which is “SW Scotland, Lothian [&] Borders” (dg). I did use a couple of its geocode areas, for completeness, but they are not important.

Of course I am, because I didn’t need polygons before, and because wrnWarningEurope.zip is still labelled “Test version” on the update page.

I’m fed up with MeteoAlarm messing us around (not your fault, Wim!).

But when only using the latitude longitude, it should work also as long as the lat/lon is inside the polygons.

I will test later today.

Wim

I see that the new wrnWarningEU.php in the zip has:

#                      Select script to use here
#
$scrpt_EU = 'wrnWarningEU-RSS2.php';  // old fashioned feed     # 2024-11-24
$scrpt_EU = 'wrnWarningEU-ATOM2.php'; // last resort data       # 2024-11-24
$scrpt_EU = 'wrnWarningEU-CAP2.php';  // latest version         # 2024-11-24 
$xtr_lat_lon = array();

The zip includes wrnWarningEU-CAP2.php but not …EU-RSS2.php or …EU-ATOM2.php

Do I need them? They were not included in the donationware test download from the update page, either.

No.
One only needs a working version, and maybe a backup.
The selection for CAP/ATOM or RSS is in the main . EU script
Better to stick to one version which works OK.

Most tested is the CAP version.
The RSS version seems to work OK also.
Not all test-locations show correct data for the ATOM version.

Succes, Wim

I mailed the complete set of test versions.

1 Like

Does this mean that all the Uk have now gone over to polygons?

In answer to “showing wrong area” Wim wrote:

Got the polygon scripts working, thanks.

As per your screenshot, the heading is always “Central, Tayside & Fife” and includes the area that comes first in the list in easyweather: you have UK249, I have UK224.

I tried deleting UK224 (in RSS area ‘ta’) from my list of geocodes in easyweather so that UK245 (in area ‘dg’) would be first. That didn’t work: I still get the heading “Central, Tayside & Fife (UK245)” instead of the “SW Scotland, Lothian Borders (UK245)” that it should be.

I even tried using UK249 alone (Edinburgh, in area SW Scotland, Lothian Borders) and it still came up “Central, Tayside & Fife (UK249)”.

Maybe it’s because the polygon covers a number of areas:

"areaDesc": "Central, Tayside & Fife | Grampian | Highlands & Eilean Siar | North East England | North West England | Northern Ireland | Orkney & Shetland | Strathclyde | SW Scotland, Lothian Borders | Wales"