It is currently March 29th, 2024, 12:33 am

RESOLVED: Webparser skin not updating

Get help with creating, editing & fixing problems with skins
DigitalEssence
Posts: 27
Joined: January 29th, 2016, 6:43 pm

RESOLVED: Webparser skin not updating

Post by DigitalEssence »

Hi,

I am working on a skin that reads a Wunderground weather station xml via their API but I can't get it to update unless I refresh the skin.

Currently I have stripped it back to as little as possible while I test and pointed it to a local .xml file so I don't blast through my API calls:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Variables]
Degree = C


[WeatherForecast]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=file://C:\Users\USERNAME\Documents\Rainmeter\Skins\SimplyNova\Wunderground\wunderground.xml

RegExp=(?siU)<observation_time>(.*)</observation_time>.*<temp_#Degree#>(.*)</temp_#Degree#>

; MEASURES

[GetCurrentTime]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[WeatherForecast]
StringIndex=1


[GetCurrentTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[WeatherForecast]
StringIndex=2


;METERS
[DisplayUpdateTime]
MeasureName=GetCurrentTime
Meter=STRING
X=120
Y=30
FontColor=#FontColor#
StringStyle=NORMAL
FontSize=10
FontFace=#Font#
Antialias=1

[meterTemp]
Meter=STRING
MeterStyle=styleLeftText
X=0
Y=60
Text=Temp:
FontColor=#FontColor#
StringStyle=NORMAL
FontSize=10
FontFace=#Font#
Antialias=1

[DisplayTemp]
MeasureName=GetCurrentTemp
Meter=STRING
X=120
Y=60
FontColor=#FontColor#
StringStyle=NORMAL
FontSize=10
FontFace=#Font#
Antialias=1
Postfix="°"
This will parse the file when I load the skin but doesn't update after that.

The only way I can get it to update is if I add the following. This refreshes the skin and reads the url again updating the values.

Code: Select all

[CalcAutoRefresh]
Measure=CALC
Formula=Counter % 7
IfAboveAction=!RainmeterRefresh
IfAboveValue=5
I was under the impression from the docs at: https://docs.rainmeter.net/manual/plugins/webparser/ that it should update every 1000 milliseconds as per the Update value in the [rainmeter] section and doesn't require the AutoRefresh of the skin to make it work.

As usual. Since posting this I have found that the webparser needs UpdateRate=x to update the values.

Seems I have resolved my issue.

Thanks.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: RESOLVED: Webparser skin not updating

Post by balala »

DigitalEssence wrote:As usual. Since posting this I have found that the webparser needs UpdateRate=x to update the values.
No, it doesn't absolutely need an UpdateRate option. If not added, the default UpdateRate is used, which is 600. This means with the usual Update=1000 (set in the [Rainmeter] section) one update per 10 minutes. Details: https://docs.rainmeter.net/tips/update-guide/
DigitalEssence
Posts: 27
Joined: January 29th, 2016, 6:43 pm

Re: RESOLVED: Webparser skin not updating

Post by DigitalEssence »

balala wrote:No, it doesn't absolutely need an UpdateRate option. If not added, the default UpdateRate is used, which is 600. This means with the usual Update=1000 (set in the [Rainmeter] section) one update per 10 minutes. Details: https://docs.rainmeter.net/tips/update-guide/
Ah, I need to remove this and then see if it is changing every 10 minutes. Maybe I missed it thinking it should be updating more often.

And as always, thanks for your reply balala. Appreciated.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: RESOLVED: Webparser skin not updating

Post by balala »

DigitalEssence wrote:Ah, I need to remove this and then see if it is changing every 10 minutes. Maybe I missed it thinking it should be updating more often.
Not changing, updating. Are not the same.
And how often can it be updated depends on many things, but usually doesn't really worth to update more often then the default 10 minutes. As I said, usually...