Page 1 of 1
METEOalarm warnings
Posted: Fri 29 Dec 2023 8:59 pm
by Mapantz
Hi
I installed the METEOalarm script, and got it working. We're under a yellow, so it shows just fine
I did test with a UK code that doesn't currently have a warning, just to check, but I got "Name not available for Name not available for"
https://warehamwx.co.uk/wxadvisory.php
Have I missed out on a setting somewhere?
Re: METEOalarm warnings
Posted: Fri 29 Dec 2023 9:21 pm
by saratogaWX
Maybe not a setting, but a file?
Make sure you have the current meteoalarm-geocode-aliases.php and meteoalarm-codenames.json files in the same directory as get-meteoalarm-warning-inc.php script.
They're available at
https://github.com/ktrue/Meteoalarm-warning
What was the code you tried that returned "undefined name"?
BTW.. the current version of the script does not handle countries that have switched to polygon-only alerts (ones that no longer include EMMA_IDs in the alerts). I'll have an update (thanks to Wim van der Kuil/PWSdashboard) later in the month of January, 2024.
Re: METEOalarm warnings
Posted: Fri 29 Dec 2023 9:30 pm
by Mapantz
I tried UK215
I have the latest geocode and codename files in the correct file.
I get that undefined name on any county that isn't under a warning.
Re: METEOalarm warnings
Posted: Sat 30 Dec 2023 1:00 am
by saratogaWX
You seem to have the scripts in the ./wxadvisory/ subdirectory. In get-meteoalarm-warning-inc.php you have
Code: Select all
$alarm_area = 'UK239'; # leave unset-- the $SITE['EUwarnings'] will configure it.
$cacheFileDir = './wxadvisory/';
unless you have a ./wxadvisory/wxadvisory/ drectory, you probably should use
Code: Select all
$alarm_area = 'UK239'; # leave unset-- the $SITE['EUwarnings'] will configure it.
$cacheFileDir = './';
instead to store the pages in the same directory.
Re: METEOalarm warnings
Posted: Sat 30 Dec 2023 1:36 am
by Mapantz
All the pages are in the same directory: /wxadvisory/
I wanted it like that, so that all files are kept tidy. There are no errors in regards to file paths.
In any case, using ./ still gives the same "Name not available for Name not available for"
Re: METEOalarm warnings
Posted: Sat 30 Dec 2023 4:19 pm
by Mapantz
Fixed it!
Re: METEOalarm warnings
Posted: Sat 30 Dec 2023 4:21 pm
by saratogaWX
Excellent! What was the final fix you used?
Re: METEOalarm warnings
Posted: Sat 30 Dec 2023 4:45 pm
by Mapantz
I should've worded it different.. no bugs to fix, I just set it so that the cache files are in their own directory and the php and json files are in the root directory with my advisory page.
I didn't want the cache files to be in the root directory and so I was overthinking it.
Apologies Ken.
Thanks for a great script though!
Re: METEOalarm warnings
Posted: Sat 30 Dec 2023 4:56 pm
by saratogaWX
The thanks really go to Wim van der Kuil for his script which he graciously allowed me to adapt for the Saratoga templates. He and I have had a great mutual code sharing for years now. He did the heavy lifting and continues to monitor the somewhat quirky meteoalarm.org data feeds.
The major change coming up is that some countries are adopting alerting by polygon coordinates only and so some major code changes are in progress to support both EMMA_ID and polygon alerting.
Have a Happy, healthy, and prosperous New Year!