itskamel wrote: ↑August 10th, 2020, 1:05 pm
this is what i have so far, both are working showing temps. but not sure if i have done it correctly.
And you'll never know if you don't try the suggested advice.
Working example:
Code: Select all
[Variables]
BoxWidth=150
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
;rack temp below
[MeasureTempCapture]
Measure=WebParser
URL=http://192.168.1.35
RegExp=(?siU)<span class="dht-labels">Temperature</span>.*<span id="temperature">(.*)</span>.*<sup class="units">(.*)</sup>.*<span class="dht-labels">Humidity</span>.*<span id="humidity">(.*)</span>.*<sup class="units">(.*)</sup>
DynamicVariables=1
UpdateRate=600
[MeasureTemp]
Measure=WebParser
URL=[MeasureTempCapture]
StringIndex=1
[MeasureTempUnit]
Measure=WebParser
URL=[MeasureTempCapture]
StringIndex=2
DecodeCharacterReference=1
[MeasureHumidity]
Measure=WebParser
URL=[MeasureTempCapture]
StringIndex=3
[MeasureHumidityUnit]
Measure=WebParser
URL=[MeasureTempCapture]
StringIndex=4
[MeterBox]
X=0
Y=0
Meter=Shape
Shape=Rectangle 0.5,0.5,150,32 | StrokeWidth 1 | Stroke Color 255,255,255,255 | Fill Color 0,0,0,150
[MeterTempLabel]
Meter=STRING
X=0r
Y=0r
FontColor=220,220,220,255
FontEffectColor=0,0,0,255
StringEffect=Shadow
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Padding=5,0,5,0
Text=Rack Temp:
[MeterTempValue]
Meter=STRING
MeasureName=MeasureTemp
MeasureName2=MeasureTempUnit
X=150r
Y=0r
FontColor=220,220,220,255
FontEffectColor=0,0,0,255
StringEffect=Shadow
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=RIGHT
AntiAlias=1
Padding=5,0,5,0
;Text=%1%2
Text=000.00°C
[MeterHumLabel]
Meter=STRING
X=-150r
Y=0R
FontColor=220,220,220,255
FontEffectColor=0,0,0,255
StringEffect=Shadow
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Padding=5,0,5,0
Text=Rack Humidity:
[MeterHumValue]
Meter=STRING
MeasureName=MeasureHumidity
MeasureName2=MeasureHumidityUnit
X=150r
Y=0r
FontColor=220,220,220,255
FontEffectColor=0,0,0,255
StringEffect=Shadow
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=RIGHT
AntiAlias=1
Padding=5,0,5,0
;Text=%1%2
Text=000.00°C
;Server Case temp below
[MeasureTempCapture2]
Measure=WebParser
URL=http://192.168.1.36
RegExp=(?siU)<span class="dht-labels">Temperature</span>.*<span id="temperature">(.*)</span>.*<sup class="units">(.*)</sup>.*<span class="dht-labels">Humidity</span>.*<span id="humidity">(.*)</span>.*<sup class="units">(.*)</sup>
DynamicVariables=1
UpdateRate=600
[MeasureTemp2]
Measure=WebParser
URL=[MeasureTempCapture2]
StringIndex=1
[MeasureTempUnit2]
Measure=WebParser
URL=[MeasureTempCapture2]
StringIndex=2
DecodeCharacterReference=1
[MeasureHumidity2]
Measure=WebParser
URL=[MeasureTempCapture2]
StringIndex=3
[MeasureHumidityUnit2]
Measure=WebParser
URL=[MeasureTempCapture2]
StringIndex=4
[MeterBox2]
X=0
Y=35
Meter=Shape
Shape=Rectangle 0.5,0.5,150,32 | StrokeWidth 1 | Stroke Color 255,255,255,255 | Fill Color 0,0,0,150
[MeterTempLabel2]
Meter=STRING
X=0r
Y=0r
FontColor=220,220,220,255
FontEffectColor=0,0,0,255
StringEffect=Shadow
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Padding=5,0,5,0
Text=Server Temp:
[MeterTempValue2]
Meter=STRING
MeasureName=MeasureTemp2
MeasureName2=MeasureTempUnit2
X=150r
Y=0r
FontColor=220,220,220,255
FontEffectColor=0,0,0,255
StringEffect=Shadow
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=RIGHT
AntiAlias=1
Padding=5,0,5,0
;Text=%1%2
Text=000.00°C
[MeterHumLabel2]
Meter=STRING
X=-150r
Y=0R
FontColor=220,220,220,255
FontEffectColor=0,0,0,255
StringEffect=Shadow
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Padding=5,0,5,0
Text=Server Humidity:
[MeterHumValue2]
Meter=STRING
MeasureName=MeasureHumidity2
MeasureName2=MeasureHumidityUnit2
X=150r
Y=0r
FontColor=220,220,220,255
FontEffectColor=0,0,0,255
StringEffect=Shadow
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=RIGHT
AntiAlias=1
Padding=5,0,5,0
;Text=%1%2
Text=000.00°C
Your job (yes, you have one) is to uncomment (as in remove the starting
; from the line) the
Text=%1%2 lines and comment (add a starting
; at the beginning of the line) or remove entirely my
Text=000.00°C lines, since the latter are there just to be able to test your code without the meters being populated with the data that only works in your own local environment.
Take care to modify the
X and
Y options if you adjust the size of the rectangle shapes in the
[Box] and
[Box2] meters. Later on, when you'll know more, maybe you'll use the
BoxWidth variable I created at the start of the code, so that you won't have to modify stuff like the ones mentioned above each time you adjust something they depend on.