www.homeseer.com    
 

Go Back   HomeSeer Message Board > Developer Support > Scripts & Plug-Ins:Development and Libraries > Script & Plug-In Library Discussion

Script & Plug-In Library Discussion This forum is for discussing scripts that are posted in the Script Library. To keep the Script Libray as neat as possible, replies are not permitted in that forum. Please post questions, comments, scripts in process, etc. to this forum.

Reply
 
Thread Tools Display Modes
  #1  
Old January 15th, 2013, 04:26 AM
Pierre's Avatar
Pierre Pierre is offline
Seer Master
 
Join Date: Jan 2001
Location: Strasbourg FRANCE
Posts: 534
European wheather alarm

Discussion for European wheather alarm originaly at http://board.homeseer.com/showthread...716#post920716

This vbs script from 2010 just has been updated to for HS3

European wheather alarm:
This is just a parsing script for european weather alarm .
http://www.meteoalarm.eu
It will check for weather alerts and update two devices.

Languages : en, fr, de, nl, no (ask author for other language support if needed).
If you want the setup page to be in your language, send me a translation and it will be included. (available for en, fr, nl)

Please feel free to post any thoughts or comments on this script.

Latest update is after this post
Unzip the .zip file in your homeseer directory, check the meteoalarm.doc help-file.
Attached Files
File Type: zip meteoalarm_2_2 .zip (18.9 KB, 11 views)
File Type: zip meteoalarm3_02.zip (20.5 KB, 9 views)
__________________
Visit zee e-maison : http://www.e-maison.com

Last edited by Pierre; February 17th, 2015 at 07:10 AM.
Reply With Quote
  #2  
Old January 15th, 2013, 04:42 PM
Fischi Fischi is offline
Seer Master
 
Join Date: Oct 2012
Location: Germany
Posts: 515
Hi Pierre,
thanks for this great script,
Can you change your meteo script for German language ?

Best regards,
Fischi
Reply With Quote
  #3  
Old January 15th, 2013, 06:06 PM
Pierre's Avatar
Pierre Pierre is offline
Seer Master
 
Join Date: Jan 2001
Location: Strasbourg FRANCE
Posts: 534
Fischi,

Have a look at the version I just updated.
Be sure sure to set lang = "de" in the user's setup at the beginning of the script.
Schüss
Reply With Quote
  #4  
Old January 15th, 2013, 06:50 PM
eole's Avatar
eole eole is offline
Seer Deluxe
 
Join Date: Sep 2006
Location: France
Posts: 167
Hi Pierre,
Thanks again for your sharing.
I'm using your txt script for a long time now.
I've just tried the vb one but have a problem.
I've change 3 lines according to my config :
device1="W80" 'device for today
device2="W81" 'device for tomorow
area="FR055"
But the alarm reported isn't good (Pas de vigilance particulière). In the log I can see "Jaune" so the script "see" this alarm and the real alarm today and tomorrow are "Jaune".

When I come back to the txt version, it's ok.
Could you have a look ? I've perhaps missed something.
Thanks.
Yves
__________________
HS 3.0.0.318 Pro virtualized
Plugins & Scripts : APCUPSD, BLBackup, BLLan, Device History, HSTouch, IPX800, IRTrans, NetCam, PHLocation, ProgTV, Reveils, RFXCOM, SNCF, UltraCID3, Z-Wave, 1-Wire, WhoIs, EasyTrigger, RaspberryIO
HW : HPN54L with Esxi 5.5,
RFXCom LAN, IRTrans LAN+USB, USBModem, Oregon Scientific Sensors, 1-Wire, IPX800, Z-Wave devices
Reply With Quote
  #5  
Old January 15th, 2013, 06:58 PM
Fischi Fischi is offline
Seer Master
 
Join Date: Oct 2012
Location: Germany
Posts: 515
Hi, Pierre,
It isn't enough only to change to "de".
There comes an error message in HS log.
What do I also have to change ?

Regards, Fischi
Reply With Quote
  #6  
Old January 15th, 2013, 07:08 PM
Pierre's Avatar
Pierre Pierre is offline
Seer Master
 
Join Date: Jan 2001
Location: Strasbourg FRANCE
Posts: 534
Yves,

If you look at the www.meteoalarm.eu page for a location in France with a Yellow alert, you will see there is no danger associated for yellow alert.
I suggest you just set the parameters to alert_level = 3 to be noticed only for orange and red alerts, since the 2-Yellow alert is useless in France.
Belgian, German and Dutch countries are using the yellow alert, but I guess it will be useless anyway to be noticed for these, as they happen very oftenly.
Domotiquement
Pierre
Reply With Quote
  #7  
Old January 15th, 2013, 07:08 PM
Fischi Fischi is offline
Seer Master
 
Join Date: Oct 2012
Location: Germany
Posts: 515
Great thanks, Pierre,
now it runs perfect !

Best regards, Fischi
Reply With Quote
  #8  
Old January 16th, 2013, 04:10 AM
eole's Avatar
eole eole is offline
Seer Deluxe
 
Join Date: Sep 2006
Location: France
Posts: 167
Quote:
Originally Posted by Pierre View Post
I suggest you just set the parameters to alert_level = 3 to be noticed only for orange and red alerts, since the 2-Yellow alert is useless in France.
Thanks a lot Pierre,
As I need/like to know when it's different from green, I've set alert_level = 2 and now it's works great.
Best Regards
Yves
Reply With Quote
  #9  
Old January 16th, 2013, 05:06 AM
Pierre's Avatar
Pierre Pierre is offline
Seer Master
 
Join Date: Jan 2001
Location: Strasbourg FRANCE
Posts: 534
I just saw today that more than one warning could be present for the same day, (as there is a red+orange warning today in the south of France).
The script has been updated to take care of this situation.
The device string will now show both alerts and the device value is updated to the top value.
Reply With Quote
  #10  
Old January 16th, 2013, 11:37 AM
jfla jfla is offline
Seer Deluxe
 
Join Date: Apr 2004
Location: ROUEN, France
Posts: 162
Hi, Pierre

Thanks for this script, my old script (from touteladomotique) don(t run correctly since MeteoFrance has changed there web pages...


In the south of France (FR091) we have 3 alertes .....
Avalanches
Crues
Pluies

Jean-francois
Reply With Quote
  #11  
Old January 16th, 2013, 01:08 PM
Pierre's Avatar
Pierre Pierre is offline
Seer Master
 
Join Date: Jan 2001
Location: Strasbourg FRANCE
Posts: 534
Jfla,
Have a look at the last release, it will handle up to 4 alerts
Reply With Quote
  #12  
Old January 16th, 2013, 02:49 PM
ESSCHENK's Avatar
ESSCHENK ESSCHENK is offline
Seer Deluxe
 
Join Date: Apr 2008
Location: DELFT HOLLAND
Posts: 238
Hello Pierre,

I have installed your script, but I can get it to work.
I think I do something wrong.

This is the url
http://www.meteoalarm.eu/ne_NL/0/0/N...d-Holland.html

This is what I see in my log

16-01-13 19:36:47 meteoalarm.vb Morgen: Danger: Sneeuw/IJzel/Bevriezing
16-01-13 19:36:47 meteoalarm.vb Morgen: Niveau: Geel
16-01-13 19:36:46 meteoalarm.vb Vandaag: Danger: Mist
16-01-13 19:36:46 meteoalarm.vb Vandaag: Niveau: Geel


This is what i see on my device,s


Geen speciale alertheid vereist Weer Weer Vandaag T35 Status Only Today 19:36:46


Geen speciale alertheid vereist Weer Weer Morgen T36 Status Only Today 19:36:47



This is the script

'**********user setup starts here **********************
'url for meteoalarm
alert_url = "http://www.meteoalarm.eu/"
' no alarm will be set for level under alert_level (in france level 2-Yellow is useless) Green=1 Yellow=2 Orange=3 Red=4
alert_level = 2
'language to be used, set to "fr" for french, "en" for english, "nl" for nl ---> ask author for any other language
lang = "nl"
'devices that will be updated, these devices have to be created in HS before running the script
device1 = "t35" 'device for today
device2 = "t36" 'device for tomorrow


'AREA CODE. YOU CAN FIND IT IN THE URL THAT SHOWS WHEN SELECTING YOUR AREA IN http://www.meteoalarm.eu
area = "NL009" 'NL, Zuid-Holland

area="NL009"
'area="NO018"
'area ="IT018"
'area ="HR002"
'area ="ES036"
'area ="DE010"

'set the debug_level to 1 to have entries in the HS log, 0 for no logging
debug_level = 1

'**********user setup stops here **********************


Maybe you can give a hint


Thanks in advanced

Ed
Reply With Quote
  #13  
Old January 16th, 2013, 03:21 PM
Fischi Fischi is offline
Seer Master
 
Join Date: Oct 2012
Location: Germany
Posts: 515
Hi, Ed,
I had the same issue and i found a solution :

'AREA CODE. YOU CAN FIND IT IN THE URL THAT SHOWS WHEN SELECTING YOUR AREA IN http://www.meteoalarm.eu
area = "NL009" 'NL, Zuid-Holland

area="NL009" change this line to 'area="NL009" (see the ' before the word area)

'area="NO018"
'area ="IT018"
'area ="HR002"
'area ="ES036"
'area ="DE010"

'set the debug_level to 1 to have entries in the HS log, 0 for no logging
debug_level = 1

'**********user setup stops here **********************

I hope this will help you.

Regards, Fischi
Reply With Quote
  #14  
Old January 16th, 2013, 06:02 PM
Pierre's Avatar
Pierre Pierre is offline
Seer Master
 
Join Date: Jan 2001
Location: Strasbourg FRANCE
Posts: 534
Hi Ed,

It seems I could improve my dutch, there was a typo in the coulours ...
See the last version and enjoy this great weather we have in Europe this week.
(Good weather for testing .....)
Reply With Quote
  #15  
Old January 20th, 2013, 06:25 AM
ESSCHENK's Avatar
ESSCHENK ESSCHENK is offline
Seer Deluxe
 
Join Date: Apr 2008
Location: DELFT HOLLAND
Posts: 238
Hello, Pierre/Fischi

Sorry for the late reaction
Thanks for the solution everything is working now.
Its great weather to test haha

Ed
Reply With Quote
  #16  
Old January 20th, 2013, 07:54 AM
Gogs's Avatar
Gogs Gogs is offline
OverSeer
 
Join Date: Apr 2003
Location: Kirkliston, Scotland, GB
Posts: 4,624
Great little script, thanks.

Just installed it and it works straight out the box.
__________________

A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro
Reply With Quote
  #17  
Old January 20th, 2013, 12:32 PM
eole's Avatar
eole eole is offline
Seer Deluxe
 
Join Date: Sep 2006
Location: France
Posts: 167
Feature request

Hi Pierre,
This script works like charm. Thanks a lot.
Could it be possible to separate the danger in another device ? One device for "vigilance", one for "danger"
I would like to show the danger separately in HSTouch.
Reply With Quote
  #18  
Old January 20th, 2013, 04:08 PM
Pierre's Avatar
Pierre Pierre is offline
Seer Master
 
Join Date: Jan 2001
Location: Strasbourg FRANCE
Posts: 534
New update

See the first post for a new update.
ver2.01 :
- Stores settings in an .ini file, should be setup using a config page
- Retrieves also the description of the danger if available ( de,gb and nl, not for fr).
Be sure to unzip each file in the good directory, then have a look at the .doc file for instructions.
Reply With Quote
  #19  
Old January 20th, 2013, 04:11 PM
Pierre's Avatar
Pierre Pierre is offline
Seer Master
 
Join Date: Jan 2001
Location: Strasbourg FRANCE
Posts: 534
eole,

This could be made in a future version.
What would you like to have in your device string when there are several alerts for the same day ?
Reply With Quote
  #20  
Old January 20th, 2013, 05:21 PM
eole's Avatar
eole eole is offline
Seer Deluxe
 
Join Date: Sep 2006
Location: France
Posts: 167
Hi Pierre,

I've just tried your ver2.01 : the config is nice.
One little problem : when I click on "Soumettre la requête" in the asp page, the redirection is false : it tried to join 192.168.0.12 (your HS server ?)

What I would like is :
- one device for the color ; only the color without "Niveau de vigilance" : "Pas de vigilance particulière", "Jaune", "Orange", "Rouge"
- one device for the alerts : all different alerts separated with a "," is what I prefer : "Neige, verglas"
It will need 4 devices.
Not sure it's easy for you and that it corresponds to the needs of other users.

Thanks.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 09:28 AM.


Copyright HomeSeer Technologies, LLC