Author Topic: Support for the "Leuven" Meteoalarm script  (Read 483 times)

0 Members and 1 Guest are viewing this topic.

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1397
    • My PWS at Leuven Belgium Europe
Support for the "Leuven" Meteoalarm script
« on: March 29, 2019, 04:36:11 AM »
Demo: https://www.weerstation-leuven.be/demowarningv3/demoWarning.php?lang=en
Download: https://leuven-template.eu/leuven_download2019.php?id=meteoalarm
Urgent temporary update: https://www.wxforum.net/index.php?topic=36482.msg376138#msg376138
Readme: The demo link has examples and full documentation about  settings and install
Known issues: link will be added when needed

Remarks:
To find the warnings for your region this  script "scrapes" the html page for your region from the meteoalarm website. As far as I know there is no other way (yet) to get the data as f.i. the RSS feeds are incomplete. There should be a better way but for now we are stuck doing it the "wrong" way.
Scraping can also result in multiple errors as  even a small change of the meteoalarm website-layout can disturb the scraping.  So when using this script make sure you can easily switch it on/off on your page.

Warning:
The settings are at the start of the script. The language translations are at the bottom. There is a big warning after the settings not to change the script itself. So if you are stupid enough to change the coding lines, do not post questions here why the script fails. Do a fresh download and only change those lines which should be changed.
Especially: DO NOT CHANGE THE URL to the meteoalarm web-site.  That one is correct. And yes, the English language is the correct language to use for scraping your regional page! 100% sure.

Support:
When you post questions about the scripts, please always include the URL (=correct link)  to the script on your website. That reduces the time for answering your questions.

Wim
« Last Edit: April 10, 2019, 08:08:34 AM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum
Support for the HWS-template for WD a.o.  http://wd34.weather-template.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1316
    • Texas Weather
Re: Support for the "Leuven" Meteoalarm script
« Reply #1 on: March 29, 2019, 12:24:26 PM »
Thank you WIm!

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1397
    • My PWS at Leuven Belgium Europe
Re: Support for the "Leuven" Meteoalarm script
« Reply #2 on: April 10, 2019, 08:03:21 AM »
There are today (2019-04-10) severe problems with the meteoalarm server.
Multiple  503 errors but the scripts catch them correctly.

But most of the time the php scripts are not executed but returned as html.
My meteoalarm script fails severely  :oops: on this unexpected garbage.

Attached a temporary fix,

Wim
« Last Edit: April 10, 2019, 08:05:34 AM by wvdkuil »
Support for Leuven-Template & Scripts  at this forum
Support for the HWS-template for WD a.o.  http://wd34.weather-template.com/
Script sponsors https://support.leuven-template.eu/userlistScripts.php
Template sponsors https://support.leuven-template.eu/userlist.php

 

anything