WebParser Tester

Help with creating, editing & fixing problems with skins
User avatar

WebParser Tester

October 31st, 2013, 2:32 pm
jsmorley
Developer   [16039 posts]

If you are having problems getting WebParser skins (weather, rss feeds, etc) to work and are not sure that Rainmeter / WebParser is "talking" to the internet properly you can use this tiny little skin to test if Rainmeter is connecting to the internet ok.

Just run this .rmskin. If the lights are green, you are ok. If they are red, there is an issue that needs further investigation.

WebParserTest.rmskin
(32.69 KiB) Downloaded 724 times


01.jpg






Possible solutions

- Exit and restart Rainmeter
- Restart your computer.
- Check if firewall or router is blocking Rainmeter.
- Proxy server setting incorrectly configured in Windows Internet Explorer.

Re: WebParser Tester

November 4th, 2013, 11:23 am
francescocossiga
   [1 posts]

Thanks for sharing good work.

Re: WebParser Tester

February 7th, 2016, 11:26 pm
lockhear7
   [1 posts]

Just what I need. Thanks!

Btw quick question about update rates. I have a skin update of 10000ms. I didnt set a value for update rate but i read that it is defaultly set to 600 for safety measures. Will my total update be 10000ms or 10000ms x 600?
User avatar

Re: WebParser Tester

February 8th, 2016, 3:51 am
jsmorley
Developer   [16039 posts]

lockhear7 wrote:Just what I need. Thanks!

Btw quick question about update rates. I have a skin update of 10000ms. I didnt set a value for update rate but i read that it is defaultly set to 600 for safety measures. Will my total update be 10000ms or 10000ms x 600?



10000ms x 600
User avatar

Re: WebParser Tester

April 26th, 2016, 1:08 pm
exper1mental
   [282 posts]

I really like this skin! Now I can get a workaround setup that prevents WebParser from murdering itself trying to lookup webpages offline :p However, there are a few things I can't seem to quite figure out.

When I disconnect my computer from a network, the internet connection and webparser test stay green and the measures do not seem to recognize the loss of internet. I modified the measures and now internet connection goes back to gray when a network is disconnected but I can't seem to figure out how to reset the WebParser no matter what I try... (I'd like to avoid resorting to refreshing the skin if at all possible)

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureNetwork]
Measure=Plugin
Plugin=CheckNet
ConnectionType=Network
UpdateRate=5
IfEqualValue=1
IfEqualAction=[!EnableMeasure MeasureInternet][!EnableMeasure MeasureCheckNetwork]
IfBelowValue=1
IfBelowAction=[!DisableMeasure MeasureInternet][!DisableMeasure MeasureWebParser][!EnableMeasure MeasureCheckNetwork]

[MeasureCheckNetwork]
Measure=Calc
Formula=[MeasureNetwork]
IfEqualValue=0
IfEqualAction=[!SetOption MeterNetworkImage ImageName NoLight.png][!SetOption MeterNetworkText FontColor "150,150,150,255"][!UpdateMeter *][!Redraw]
IfAboveValue=0
IfAboveAction=[!SetOption MeterNetworkImage ImageName GreenLight.png][!SetOption MeterNetworkText FontColor "220,252,221,255"][!UpdateMeter *][!Redraw]
IfBelowValue=0
IfBelowAction=[!SetOption MeterNetworkImage ImageName RedLight.png][!SetOption MeterNetworkText FontColor "247,143,143,255"][!UpdateMeter *][!Redraw]
DynamicVariables=1
Disabled=1

[MeasureInternet]
Measure=Plugin
Plugin=CheckNet
ConnectionType=Internet
UpdateRate=30
IfEqualValue=1
IfEqualAction=[!EnableMeasure MeasureWebParser][!EnableMeasure MeasureCheckInternet]
IfBelowValue=1
IfBelowAction=[!DisableMeasure MeasureWebParser][!EnableMeasure MeasureCheckInternet]
Disabled=1

[MeasureCheckInternet]
Measure=Calc
Formula=[MeasureInternet]
IfEqualValue=0
IfEqualAction=[!SetOption MeterInternetImage ImageName NoLight.png][!SetOption MeterInternetText FontColor "150,150,150,255"][!UpdateMeter *][!Redraw]
IfAboveValue=0
IfAboveAction=[!SetOption MeterInternetImage ImageName GreenLight.png][!SetOption MeterInternetText FontColor "220,252,221,255"][!UpdateMeter *][!Redraw]
IfBelowValue=0
IfBelowAction=[!SetOption MeterInternetImage ImageName RedLight.png][!SetOption MeterInternetText FontColor "247,143,143,255"][!UpdateMeter *][!Redraw]
DynamicVariables=1
Disabled=1

[MeasureWebParser]
Measure=Plugin
Plugin=WebParser
Url=http://www.msftncsi.com/ncsi.txt
RegExp="^(.*)$"
;UpdateRate=30
ForceReload=1
StringIndex=1
RegExpSubstitute=1
Substitute="^Microsoft NCSI$":"1","":"-1"
ErrorString="-1"
FinishAction=[!EnableMeasure MeasureCheckWebParser]
Disabled=1

[MeasureCheckWebParser]
Measure=Calc
Formula=[MeasureWebParser]
IfEqualValue=0
IfEqualAction=[!SetOption MeterWebParserImage ImageName NoLight.png][!SetOption MeterWebParserText FontColor "150,150,150,255"][!UpdateMeter *][!Redraw][!DisableMeasureGroup Proxy]
IfAboveValue=0
IfAboveAction=[!SetOption MeterWebParserImage ImageName GreenLight.png][!SetOption MeterWebParserText FontColor "220,252,221,255"][!UpdateMeter *][!Redraw][!DisableMeasureGroup Proxy]
IfBelowValue=0
IfBelowAction=[!SetOption MeterWebParserImage ImageName RedLight.png][!SetOption MeterWebParserText FontColor "247,143,143,255"][!UpdateMeter *][!Redraw][!EnableMeasureGroup Proxy]
DynamicVariables=1
Disabled=1

[MeasureProxy]
Measure=Registry
Group=Proxy
RegHKey=HKEY_CURRENT_USER
RegKey=Software\Microsoft\Windows\CurrentVersion\Internet Settings
RegValue=ProxyEnable
UpdateDivider=30
Disabled=1

[MeasureIsProxy]
Measure=Calc
Group=Proxy
Formula=MeasureIsProxy
IfBelowValue=1
IfBelowAction=[!SetOption MeterProxyText Text "WebParser is not able to parse the site at http://www.msftncsi.com.  This could be due to a limited Internet connection, firewall settings, or a problem with connection settings in Windows Internet Explorer."][!ShowMeter MeterProxyText][!UpdateMeter *][!Redraw]
IfEqualValue=1
IfEqualAction=[!SetOption MeterProxyText Text "WebParser is not able to parse the site at http://www.msftncsi.com.  This could be due to a limited Internet connection, firewall settings, or a problem with connection settings in Windows Internet Explorer.#CRLF##CRLF#Note: There seems to be a proxy server defined for Internet Explorer on your system. WebParser can't authenticate on a proxy server if it requires a login. You may be able to correct the issue by unchecking the 'Proxy Server' box in 'Lan Settings' under 'Internet Options' in Internet Explorer."][!ShowMeter MeterProxyText][!UpdateMeter *][!Redraw]
Disabled=1

[MeterBack]
Meter=Image
W=220
H=140
SolidColor=47,47,47,255

[MeterHeader]
Meter=String
W=210
H=30
FontSize=14
FontColor=161,186,220,255
SolidColor=37,37,37,255
Padding=10,10,0,0
AntiAlias=1
Text=WebParser Tester

[MeterNetworkImage]
Meter=Image
ImagePath=#@#Images\
ImageName=NoLight.png
X=10
Y=48
W=24
H=24
AntiAlias=1

[MeterNetworkText]
Meter=String
X=8R
Y=4r
FontSize=11
FontColor=150,150,150,255
AntiAlias=1
Text=Network Connection

[MeterInternetImage]
Meter=Image
ImagePath=#@#Images\
ImageName=NoLight.png
X=10
Y=([MeterNetworkImage:Y] + [MeterNetworkImage:H] + 5)
W=24
H=24
AntiAlias=1

[MeterInternetText]
Meter=String
X=8R
Y=4r
FontSize=11
FontColor=150,150,150,255
AntiAlias=1
Text=Internet Connection

[MeterWebParserImage]
Meter=Image
ImagePath=#@#Images\
ImageName=NoLight.png
X=10
Y=([MeterInternetImage:Y] + [MeterInternetImage:H] + 5)
W=24
H=24
AntiAlias=1
DynamicVariables=1

[MeterWebParserText]
Meter=String
X=8R
Y=4r
FontSize=11
FontColor=150,150,150,255
AntiAlias=1
Text=WebParser Test

[MeterProxyText]
Meter=String
W=210
X=([MeterBack:X] + [MeterBack:W] + 5)
Y=0
FontSize=10
FontColor=255,255,255,255
SolidColor=145,20,22,255
Padding=5,5,5,5
ClipString=2
AntiAlias=1
DynamicVariables=1
Hidden=1
User avatar

Re: WebParser Tester

April 26th, 2016, 1:14 pm
jsmorley
Developer   [16039 posts]

You might take a look at this:

https://docs.rainmeter.net/manual-beta/plugins/webparser/#OnConnectErrorAction

and this:

https://docs.rainmeter.net/manual-beta/plugins/webparser/#CommandMeasureReset

And see if you can't use this to have something in the skin change if a connect error is detected. You WON'T want to use !Refresh with it, as that is certain to cause a fatal endless loop if you don't have an internet connection. In fact, any action at all that forces the WebParser parent measure to update on an error is just the definition of an endless loop.

I haven't given it a lot of thought, as really the point of this skin is to "test" and so doing a refresh of the skin is sorta the best way to do it. It's really not about "monitoring" the connection.

The issue with using WebParser to "monitor" your network / internet connection is that by design WebParser will retain any previous value(s) it had if it can't connect to the remote resource on any given update. It is designed so that if you disconnect your laptop, or your internet is slow, or there is some other "hiccup" in the connection, you don't have news feeds and weather skins and all that just blowing up on you. The assumption is that it is likely that the connection problem is transient, and WebParser just holds on to the previous value while it waits for things to straighten out.

You are really better off using the SysInfo plugin to "monitor" your network connection.
User avatar

Re: WebParser Tester

April 26th, 2016, 1:44 pm
jsmorley
Developer   [16039 posts]

exper1mental, something like this is a possibility:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureWebParser]
Measure=Plugin
Plugin=WebParser
Url=http://www.msftncsi.com/ncsi.txt
RegExp=^Microsoft NCSI$
UpdateRate=30
ForceReload=1
RegExpSubstitute=1
Substitute="^Microsoft NCSI$":"1","":"-1"
OnConnectErrorAction=[!SetOption MeasureGotError Formula "1"]

[MeasureGotError]
Measure=Calc
Formula=0
IfAboveValue=0
IfAboveAction=[!CommandMeasure MeasureWebParser "Reset"]

[MeasureTestResult]
Measure=Calc
Formula=[MeasureWebParser]
IfEqualValue=0
IfEqualAction=[!SetOption MeterResult Text "Waiting"][!SetOption MeterResult FontColor "150,150,150,255"][!UpdateMeter *][!Redraw][!SetOption MeasureGotError Formula "0"]
IfAboveValue=0
IfAboveAction=[!SetOption MeterResult Text "WebParser connecting"][!SetOption MeterResult FontColor "220,252,221,255"][!UpdateMeter *][!Redraw][!SetOption MeasureGotError Formula "0"]
IfBelowValue=0
IfBelowAction=[!SetOption MeterResult Text "WebParser not connecting!"][!SetOption MeterResult FontColor "247,143,143,255"][!UpdateMeter *][!Redraw][!SetOption MeasureGotError Formula "0"]
DynamicVariables=1

[MeterResult]
Meter=String
FontSize=15
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1

Return to “Help: Rainmeter Skins”



Who is online

Users browsing this forum: Bing [Bot], VRArt1 and 3 guests