It is currently May 7th, 2024, 12:10 pm

Initial update of meters

Get help with creating, editing & fixing problems with skins
arminus
Posts: 3
Joined: April 28th, 2011, 12:53 pm

Initial update of meters

Post by arminus »

Hi,

I have a skin with a single WebParser measure. It retrieves a temperature value which I want to display in a line meter. It should update both the measure and the meter every 15 minutes. So I set [Rainmeter] Update to 900000.

The problem is, that it now takes 15 minutes until the meter is updated for the first time after either rainmeter start or a manual refresh. How can I get it to update the meter on these events right away ?

All the combinations I tried with lowering Update to 1000 and raising UpdateRate and/or UpdateDivider didn't help, i.e. the line meter is then always updated according to the Update interval, thus shifting out older values too fast.


thx,
Arminus
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: Initial update of meters

Post by JpsCrazy »

Could you post your code?

I think you could have !RainmeterRedraw as the finishaction for the regexp
arminus
Posts: 3
Joined: April 28th, 2011, 12:53 pm

Re: Initial update of meters

Post by arminus »

Could you post your code?
Here it is: (the FinishAction didn't help)

Code: Select all

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Author=arminus
AppVersion=1000000
Update=60000
; OnRefreshAction=!RainmeterUpdateMeasure ParseSensor1

[Metadata]
; Contains basic information of the skin.
Name=HomeMatic
Description=HomeMatic access through XML API
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[ParseSensor1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1
Url=http://192.168.0.200/config/xmlapi/statelist.cgi
RegExp="(?siU).*<datapoint name='BidCos-RF\.HEQ0110736:1\.TEMPERATURE'.*value='(.*\.\d)\d+' valuetype=.*<datapoint name='BidCos-RF.HEQ0110736:1.HUMIDITY'.*value='(.*)' valuetype=.*<datapoint name='minTempAussen'.*value='(.*\.\d)\d+' valuetype=.*"
FinishAction=!RainmeterRedraw

[MeasureTemperature]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[ParseSensor1]
StringIndex=1

[MeasureHumidity]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[ParseSensor1]
StringIndex=2

[MeasureMinTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[ParseSensor1]
StringIndex=3

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=CENTER
StringCase=UPPER
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=LEFT
; Meters using styleLeftText will be left-aligned.
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=RIGHT
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

[styleSeperator]
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterBackground]
Meter=IMAGE
ImageName=#SKINSPATH#\illustro\SHARED\HMBackground3LineGraph.png
; #SKINSPATH# is a global variable that stands for your skin path. It is
; usually Documents\Rainmeter\Skins.
X=0
Y=0

[meterTitle]
Meter=STRING
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=85
Y=12
W=150
H=18
Text="HomeMatic"

[meterTempLabel]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=40
W=150
H=14
Text="Temperature"

[meterTemperature]
Meter=STRING
MeterStyle=styleRightText
MeasureName=MeasureTemperature
X=160
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=150
H=14
Text="%1 ° C"
; %1 stands for the value of MeasureName (measureIP in this case).

[meterSeperator1]
Meter=IMAGE
MeterStyle=styleSeperator
X=10
Y=52
W=150
H=1

[MeterTempGraph]
Meter=Line 
MeasureName=MeasureTemperature
X=10
Y=60
W=150 
H=40
; SolidColor=#FontColor# 
LineColor=#colorText#

[meterMinTempLabel]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=110
W=150
H=14
Text="Min. Temp."

[meterMinTemp]
Meter=STRING
MeterStyle=styleRightText
MeasureName=MeasureMinTemp
X=160
Y=0r
W=150
H=14
Text="%1 ° C"
NumOfDecimals=1
AutoScale=1

[meterSeperator2]
Meter=IMAGE
MeterStyle=styleSeperator
X=10
Y=122
W=150
H=1

[minHumidityLabel]
Meter=STRING
MeterStyle=styleLeftText
X=10
Y=130
W=150
H=14
Text="Humidity"

[meterHumidity]
Meter=STRING
MeterStyle=styleRightText
MeasureName=MeasureHumidity
X=160
Y=0r
W=150
H=14
Text="%1 %"
NumOfDecimals=1
AutoScale=1

[meterSeperator3]
Meter=IMAGE
MeterStyle=styleSeperator
X=10
Y=142
W=150
H=1
In the log file, I see this though, so the webpage is actually accessed:

Code: Select all

DEBUG: (00:00:02.169) WebParser: Finished URL: http://192.168.0.200/config/xmlapi/statelist.cgi
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: Initial update of meters

Post by poiru »

Try:

Code: Select all

FinishAction=!RainmeterUpdate "#CURRENTCONFIG#"
on the main WebParser measure.
arminus
Posts: 3
Joined: April 28th, 2011, 12:53 pm

Re: Initial update of meters

Post by arminus »

Cool, that works ! Thanks a lot.