It is currently April 18th, 2024, 2:17 pm

Trouble getting WAN IP to work.

Share and get help with Plugins and Addons
jeffhobson
Posts: 39
Joined: January 15th, 2015, 9:05 am

Trouble getting WAN IP to work.

Post by jeffhobson »

I posted this question yesterday but did not see it today so I am re-posting it -- sorry if there is a mixup on my part in not seeing a possible reply.

I have copied the code from the tips section to grab the WAN IP

[MeasureIPWeb]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=http://checkip.dyndns.org
StringIndex=1
RegExp="(?siU)Address: (.*)</body>"
Substitute="":"N/A"
UpdateRate=3600

It consistently returns "N/A"
the return from checkip/dyndns is

Current IP Address: 97.87.96.120

I cannot see where it is going wrong since the checkip return seems to be OK.
How do I output the results of the RegExp line to make sure that the return from checkip is being properly parsed?

Thanks for the help
Don't lose heart, someone may want it and not waste time with a messy search
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trouble getting WAN IP to work.

Post by jsmorley »

jeffhobson wrote:I posted this question yesterday but did not see it today so I am re-posting it -- sorry if there is a mixup on my part in not seeing a possible reply.

I have copied the code from the tips section to grab the WAN IP

[MeasureIPWeb]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=http://checkip.dyndns.org
StringIndex=1
RegExp="(?siU)Address: (.*)</body>"
Substitute="":"N/A"
UpdateRate=3600

It consistently returns "N/A"
the return from checkip/dyndns is

Current IP Address: 97.87.96.120

I cannot see where it is going wrong since the checkip return seems to be OK.
How do I output the results of the RegExp line to make sure that the return from checkip is being properly parsed?

Thanks for the help
That works fine for me. Are you getting any error in About / Log? Try fully restarting Rainmeter if you have not done so.

P.S. You are not losing your mind, we had a system crash yesterday afternoon, and had to sync the database from a mirror that is a few hours behind. That is why your post "disappeared".
jeffhobson
Posts: 39
Joined: January 15th, 2015, 9:05 am

Re: Trouble getting WAN IP to work. (SOLVED)

Post by jeffhobson »

Thanks for the reply...I rebooted the machine and solved the problem.
Don't lose heart, someone may want it and not waste time with a messy search
revwillie1956
Posts: 1
Joined: April 23rd, 2021, 12:56 pm

Re: Trouble getting WAN IP to work.

Post by revwillie1956 »

[MeasureIPWeb]
Measure=WebParser
URL=http://checkip.dyndns.org
RegExp=(?siU)^(.*)
StringIndex=1
UpdateRate=3600
Substitute="":"Scanning..."

Doesn't work as expected. I get the "Scanning..."
The Web Site reports : Current IP Address: 75.81.146.184
I would like to get just the 75.81.146.184 and not "Scanning..."

any help at getting the measure to report the correct IP Address would be helpful.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trouble getting WAN IP to work.

Post by jsmorley »

revwillie1956 wrote: April 23rd, 2021, 1:46 pm [MeasureIPWeb]
Measure=WebParser
URL=http://checkip.dyndns.org
RegExp=(?siU)^(.*)
StringIndex=1
UpdateRate=3600
Substitute="":"Scanning..."

Doesn't work as expected. I get the "Scanning..."
The Web Site reports : Current IP Address: 75.81.146.184
I would like to get just the 75.81.146.184 and not "Scanning..."

any help at getting the measure to report the correct IP Address would be helpful.
I use this:

Code: Select all

[MeasureIPWeb]
Measure=WebParser
Flags=Resync | NoCookies
URL=https://checkip.amazonaws.com/
RegExp=(?siU)^(.*)$
StringIndex=1
UpdateRate=30
RegExpSubstitute=1
Substitute="^$":"None"