Weersverwachting buienradar.nl script

Forum over Homeseer scripts (DUTCH forum)

Moderators: TANE, Ruud

psmaaswinkel
Member
Member
Posts: 88
Joined: Wed Oct 27, 2010 8:36 pm

Re: Weersverwachting buienradar.nl script

Post by psmaaswinkel »

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
pleaseask
Member
Member
Posts: 84
Joined: Fri May 23, 2008 9:33 pm
Location: Netherlands

Re: Weersverwachting buienradar.nl script

Post by pleaseask »

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/ima ... her/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/ima ... her/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.
John
Member
Member
Posts: 145
Joined: Mon Aug 02, 2010 5:00 pm

Re: Weersverwachting buienradar.nl script

Post by John »

Edwin,

Bedankt voor het delen van de fix.

---
John
Broes
Member
Member
Posts: 74
Joined: Tue Nov 10, 2009 11:38 pm
Location: Netherlands

Re: Weersverwachting buienradar.nl script

Post by Broes »

+1 :D
Peter
HW: Arduino/Fritzbox/Oregon/RFXCom/Squeezebox/Z-wave
SW: HS3/Arduino/Buienradar/Jon00(several)/HSMetro/Netcam/P1/RFXCom/Squeezebox/Z-wave
raymonvdm
Senior Member
Senior Member
Posts: 1153
Joined: Sun Dec 18, 2011 1:23 am

Re: Weersverwachting buienradar.nl script

Post by raymonvdm »

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
Post Reply

Return to “Homeseer Scripts Forum”