Weersverwachting buienradar.nl script

Forum over Homeseer scripts (DUTCH forum)

Moderators: TANE, Ruud

Re: Weersverwachting buienradar.nl script

Postby psmaaswinkel » Thu Feb 16, 2017 12:50 pm

I have noticed this problem also. It seems there are new icons used with buienradar. As soon as I have some spare time (within a week or two) I will try to address this issue.

Regards,

Peter
___________________________________________________________________
iEase Home Control
psmaaswinkel
Member
Member
 
Posts: 84
Joined: October 2010

Re: Weersverwachting buienradar.nl script

Postby pleaseask » Sun Feb 19, 2017 4:53 pm

problem solved:

first: buienradar has changed the icon file format from gif to png.
second: changed the location of the icon files.
third: added an extra row in the xml file.

In the xmlbuienradar.vb are some replace functions that aren't functioning anymore due to the changes.
And the vb file can't find an icon file for the "Actueel afbeelding" because buienradar has added an extra xml tag in the buienradar.xml file :-(

what you have to do...
Go to the file xmlbuienradar.vb in the folder scripts.
Create a copy of the file !!!
Open the file in notepad (or in visual studio)

browse to this section...

Dim Icon As String = node.ChildNodes.Item(15).InnerText
Icon = Icon.Replace("http://xml.buienradar.nl/icons/", "/images/buienradar/icon93x93/")
Icon = Icon.Replace("gif", "png")
SetDevice("Actueel afbeelding", "<img src='" & Icon & "'>")

and change it to:( see the difference)

Dim Icon As String = node.ChildNodes.Item(16).InnerText
Icon = Icon.Replace("https://www.buienradar.nl/resources/images/icons/weather/30x30/", "/images/buienradar/icon93x93/")
Icon = Icon.Replace("png", "png")
SetDevice("Actueel afbeelding", "<img src='" & Icon & "'>")

Then scroll down the next section:

Dim Icon As String = node.ChildNodes.Item(12).InnerText
Icon = Icon.Replace("http://xml.buienradar.nl/icons/", "/images/buienradar/icon93x93/")
Icon = Icon.Replace("gif", "png")
SetDevice("Dag+" & CurrentDay & " afbeelding", "<img src='" & Icon & "'>")

and change this part to:

Dim Icon As String = node.ChildNodes.Item(12).InnerText
Icon = Icon.Replace("https://www.buienradar.nl/resources/images/icons/weather/30x30/", "/images/buienradar/icon93x93/")
Icon = Icon.Replace("png", "png")
SetDevice("Dag+" & CurrentDay & " afbeelding", "<img src='" & Icon & "'>")


Save the file and rerun the import of the buienradar.xml.
The images should be fine now. :D
Homeseer 3 Pro on Windows 10 / Zwave

Edwin.
pleaseask
Member
Member
 
Posts: 79
Joined: May 2008
Location: Netherlands

Re: Weersverwachting buienradar.nl script

Postby John » Fri Feb 24, 2017 9:04 pm

Edwin,

Bedankt voor het delen van de fix.

---
John
John
Member
Member
 
Posts: 138
Joined: August 2010

Re: Weersverwachting buienradar.nl script

Postby Broes » Thu Mar 02, 2017 9:48 pm

+1 :D
Peter
HW: Arduino/Fritzbox/Oregon/RFXCom/Squeezebox/Z-wave
SW: HS3/Arduino/Buienradar/Jon00(several)/HSMetro/Netcam/P1/RFXCom/Squeezebox/Z-wave
Broes
Member
Member
 
Posts: 73
Joined: November 2009
Location: Netherlands

Re: Weersverwachting buienradar.nl script

Postby raymonvdm » Mon Mar 06, 2017 9:00 pm

Ik heb de fix ook geprobeerd maar ik heb nog veel plaatjes die niet werken. Daarnaast werkt ook het overzicht van de 5 dagen niet meer sinds 31-01-2017

Code: Select all

Error 1   Running script C:\Program Files\HomeSeer HS3\scripts\xmlbuienradar.vb :Exception has been thrown by the target of an invocation.De conversie van tekenreeks - naar type Double is ongeldig.



Deze file ontbreekt bijvoorbeeld/images/homeseer/5-x-5_trans_spacer.gif en deze staat hardcoded in het script.


- Inmiddels heb ik ontdekt dat de missende gif verplaatst is door een HomeSeer update zoals in een eerdere post van dit topic al is gemeld
- Blijkbaar kwam de 5 dagen voorspelling en de morgen voorspelling uit een Weatherunderground achtige pluggin
:D

- Blijkbaar kwam de 5 dagen voorspelling toch wel uit deze plugin want ik heb ineens weer een voorspelling voor morgen en de komende 5 dagen :roll:
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
raymonvdm
Senior Member
Senior Member
 
Posts: 1117
Joined: December 2011

Previous

Return to Homeseer Scripts Forum

Who is online

Users browsing this forum: Google [Bot] and 1 guest