Weather Underground RegExp
Posted: July 11th, 2017, 4:15 pm
I'm a long time lurker and try to figure things out on my own but this error in the log file is beyond me to resolve.
Due to the intermittent problems with the weather.com data disappearing in my location I'm moving on to Weather Underground's API to a neighbors Personal Weather Station.
My actual weather skin is rather large so TestWuWeather is just an example to demonstrate the issue. If required I will pack up TestWuWeather including the icons, once I figure out how to do it.
The following appears in the log twice when the skin is loaded or refreshed.
Error: TestWuWeather\TestWuWeather.ini C:\Users\SCR\Documents\Rainmeter\Skins\TestWuWeather\@Resources\Images\WuWeatherIcons\.gif
After the initial loading of the .ini the skin works as expected, no additional errors on Update.
I have come to the conclusion, right or wrong, that it has to do with the way I have constructed the RegExp.
RegExp is difficult for me to say the least. Any help eliminating the errors would be appreciated.
Edited Code to make corrections per Free Raider
Due to the intermittent problems with the weather.com data disappearing in my location I'm moving on to Weather Underground's API to a neighbors Personal Weather Station.
My actual weather skin is rather large so TestWuWeather is just an example to demonstrate the issue. If required I will pack up TestWuWeather including the icons, once I figure out how to do it.
The following appears in the log twice when the skin is loaded or refreshed.
Error: TestWuWeather\TestWuWeather.ini C:\Users\SCR\Documents\Rainmeter\Skins\TestWuWeather\@Resources\Images\WuWeatherIcons\.gif
After the initial loading of the .ini the skin works as expected, no additional errors on Update.
I have come to the conclusion, right or wrong, that it has to do with the way I have constructed the RegExp.
RegExp is difficult for me to say the least. Any help eliminating the errors would be appreciated.
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
[Metadata]
Name=TestWuWeather
Author=SCR
Information=TestWuWeather - Powered by Weather Underground
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
[Variables]
FontName=Segoe UI
FontColor=168,168,168,220
;=============== WeatherUnderground API ID Required.
WuIdAPI=
;=============================
;========== Measures ==========
[WuParent]
Measure=Plugin
Plugin=WebParser
URL=http://api.wunderground.com/api/#WuIdAPI#/conditions/forecast/astronomy/q/pws:KNYCLIFT20.xml
RegExp=(?siU).*<observation_time>(.*)</observation_time>.*<icon>(.*)</icon>
ForceReload=1
FinishAction=[!EnableMeasureGroup WuWeatherTest][!UpdateMeasureGroup WuWeatherTest][!UpdateMeter *][!ReDraw]
[WuMeasureLastUpdate]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[WuParent]
StringIndex=1
Group=WuWeatherTest
Disabled=1
[WuMeasureCurrentIcon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[WuParent]
StringIndex=2
Group=WuWeatherTest
Disabled=1
;========== Meters ===========
[WuMeterLastUpdate]
Meter=String
MeasureName=WuMeasureLastUpdate
X=0
Y=0
FontFace=#FontName#
FontSize=9
FontColor=#FontColor#
StringAlign=Left
AntiAlias=1
Text=%1
[MeterCurrentIcon]
MeasureName=WuMeasureCurrentIcon
Meter=Image
ImageName=#@#Images\WuWeatherIcons\%1.gif
PreserveAspectRatio=1
AntiAlias=1
X=0
Y=20
W=46