Author Topic: Saratoga World template gets alerts from meteoalarm.org...  (Read 421 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8617
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Whew, for European Saratoga template users, it's taken a while since the old get-meteoalarm-warning-inc.php script stopped getting data from the (now defunct) meteoalarm.eu site.  Thanks to Wim van der kuil for giving permission to adapt his pwsdashboard.com code to use meteoalarm.org data (which is the current, operational site for EUMETNET-METEOalarm).

get-meteoalarm-warning-inc.php V3.00 - 12-May-2022 is now on the distribution (in Base-World.zip)

Get the update via the update tool with a query of Base-World, *-plugin, 12-May-2022

Note: the update includes a revised Settings.php, but you don't have to install it .. you can add the one new $SITE entry to your current Settings.php easily.  The other files in ./ajax-images/*.svg, wxadvisory.php and get-meteoalarm-warning-inc.php should be uploaded to your site (no config needed there).

Go to https://saratoga-weather.org/meteoalarm-map/ to find the needed EMMA_IDs for your location and how to configure it in Settings.php

Thanks again to Wim!

Enjoy!
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline zmarfak

  • Contributor
  • ***
  • Posts: 114
    • Matar
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #1 on: May 13, 2022, 03:35:05 AM »
Thank you Ken for the update, and thank you Wim for giving Ken the permission to adapt your file.
 =D>
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8617
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #2 on: May 18, 2022, 06:09:09 PM »
Just released V3.10 with a major update.. a summary display of alerts for the homepage with links to the alerts display details on wxadvisory.php page.

3 files updated:  get-meteoalarm-warning-inc.php V3.10, wxindex.php V1.01, and wxadvisory.php V1.02

You also need to add to Settings.php:
Code: [Select]
$SITE['useMeteoalarm'] = true; to have the full function enabled.

get-meteoalarm-warning-inc.php now only directly prints HTML comments about the operation of the script when included.
The ./cache/meteoalarm-details.html and ./cache/meteoalarm-summary.html files are maintained by the script and used by wxadvisory.php and wxindex.php respectively.

I'll be putting up more docs about the changes shortly and reenabling the detailed script page again.

Enjoy!
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline zmarfak

  • Contributor
  • ***
  • Posts: 114
    • Matar
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #3 on: May 19, 2022, 03:24:13 AM »
Thanks Ken for all the effort you put in this.
I get mixed feelings when I look at the screen , see attachment
Is this meteoalarm.org that gives this strange info ?

last edit :
https://www.meteo.be/en/weather/warnings/overview-belgium gives an overview on the official meteo of Belgium
« Last Edit: May 19, 2022, 03:37:11 AM by zmarfak »
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8617
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #4 on: May 19, 2022, 10:31:08 AM »
Each National Weather Service seems to have slightly different reporting of events to meteoalarm.org.  The 'Green' (No Special Awareness) alert isn't something I'd seen from the new feed before -- Meteoalarm.org cites only 3 color warnings: yellow, orange and red for increasing severity of the event.  By rights, you have 3 'Green' named events and one 'Yellow' event.

I'll look at the JSON return for Belgium and see if I can fix the issue to display 'Green' when cited.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline CrondallWeather

  • Crondall Weather
  • Member
  • *
  • Posts: 13
  • Still a classic - like so many of us....
    • Crondall Weather
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #5 on: May 19, 2022, 10:35:28 AM »
Ken / Wim,

Thanks ever so much for getting these warning scripts up and running again.

Made all the changes and everything seems fine.

May I ask if a further refinement is possible (unless it's me missing a setting) - could the actual area names appear as well as the EMMA_ID codes?

For example for me I'm showing UK116, UK115 and UK114 as not having any current alerts, which is helpful, but would be easier on the eye is actually said "London & South East England", "South West England", East of England rather than the codes?

Thanks again

Neil

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8617
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #6 on: May 19, 2022, 11:32:17 AM »
Ok, I looked through the code, and Wim had assigned level 1 (Green) to Level 2 (Yellow) alerts.  I've now enabled a $minAlertLevel/$SITE['EUminLevel'] to control that display .. the default is 2 (Yellow) so 'Green' alerts won't be displayed.

Try the attached V3.11 script.
« Last Edit: May 19, 2022, 03:18:39 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8617
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #7 on: May 19, 2022, 11:39:05 AM »
Ken / Wim,

Thanks ever so much for getting these warning scripts up and running again.

Made all the changes and everything seems fine.

May I ask if a further refinement is possible (unless it's me missing a setting) - could the actual area names appear as well as the EMMA_ID codes?

For example for me I'm showing UK116, UK115 and UK114 as not having any current alerts, which is helpful, but would be easier on the eye is actually said "London & South East England", "South West England", East of England rather than the codes?

Thanks again

Neil
Hi Neil,

Adding the names to the EMMA_IDs would (at present) mean a giant (14Mb) JSON file be used geocodes.json which has all the info about a specific EMMA_ID including the coordinate lat/long pairs for the polygon for the area.  That massive file is what is used by the meteoalarm-map script to show the areas.

I'll look at creating a lesser sized file to do what you ask.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8617
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #8 on: May 19, 2022, 03:20:07 PM »
Ok.. found a way to do the display.  Now uses meteoalarm-codenames.json file for lookup of EMMA_ID => name of area

Try the attached.. upload both files enclosed.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ConligWX

  • Forecaster
  • *****
  • Posts: 781
  • #conligwx
    • conligwx.org
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #9 on: May 19, 2022, 04:10:18 PM »
Thanks for the update Ken, nice work.

just a query is it possible if the summary on the index page says:

No current alerts for:  xxxxxx

that the background is green for "all clear" and when a warning is given it is then Yellow, orange or red backgrounds?  I know the old script wim used done exactly that.
Regards Simon
Davis Vantage Pro2 Plus (6162UK) Daytime FARS WeatherLink Live AirLink PurpleAir PA-II-SD CumulusMX


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8617
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #10 on: May 19, 2022, 04:21:47 PM »
If you mean like the attached, then yes.. I've made the change and will put in the distribution.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8617
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #11 on: May 19, 2022, 05:20:59 PM »
Done.. now on the distribution channel available at the update tool with a query of 19-May-2022, Base-World, *-Plugin
« Last Edit: May 19, 2022, 05:38:30 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline zmarfak

  • Contributor
  • ***
  • Posts: 114
    • Matar
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #12 on: May 19, 2022, 05:49:59 PM »
Hi Ken,
installed the new version.
No problems so far.
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline CrondallWeather

  • Crondall Weather
  • Member
  • *
  • Posts: 13
  • Still a classic - like so many of us....
    • Crondall Weather
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #13 on: May 20, 2022, 06:15:50 AM »
Thanks ever so much Ken - updates are working great.

Really appreciated

 :grin: =D>

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1918
    • My PWS at Leuven Belgium Europe
Re: Saratoga World template gets alerts from meteoalarm.org...
« Reply #14 on: May 20, 2022, 06:22:36 AM »
Thanks for the update Ken, nice work.

just a query is it possible if the summary on the index page says:

No current alerts for:  xxxxxx

that the background is green for "all clear" and when a warning is given it is then Yellow, orange or red backgrounds?  I know the old script wim used done exactly that.

BE AWARE that there is no "GREEN" situation anymore as in the old definitions.
One should think that there is no problem outside their house when we show GREEN-messages or colours.
Therefor meteoalarm and most of the local country organisations dropped all usage of green levels or green colours.
Better use a white background and text like "no warnings active" or "no warnings found"
Please remember, "If it is a hobby for both of us, it should be fun for both of us also"
Support for Leuven-Template & Scripts  at this forum via https://support.leuven-template.eu/
Support for the PWS_Dashboard  pwsdashboard.com

If I helped you building and enhancing your website, feel free to donate at https://paypal.me/pwsdashboard.