Page 2 of 2

Re: Weersverwachting buienradar.nl script

Posted: Thu Feb 16, 2017 1:50 pm
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

Re: Weersverwachting buienradar.nl script

Posted: Sun Feb 19, 2017 5:53 pm
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

Re: Weersverwachting buienradar.nl script

Posted: Fri Feb 24, 2017 10:04 pm
by John
Edwin,

Bedankt voor het delen van de fix.

---
John

Re: Weersverwachting buienradar.nl script

Posted: Thu Mar 02, 2017 10:48 pm
by Broes
+1 :D

Re: Weersverwachting buienradar.nl script

Posted: Mon Mar 06, 2017 10:00 pm
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: