It is currently April 27th, 2024, 6:47 pm

Network, How to get local IP address

Get help with installing and using Rainmeter.
User avatar
balala
Rainmeter Sage
Posts: 16178
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Network, How to get local IP address

Post by balala »

HardNeck wrote: February 2nd, 2024, 5:39 pm This one produced some results but it is not yet 100%.
Could you be little bit more specific, please? What do you mean by "produced some results"?
It seems the http://ipv6.icanhazip.com/ URL, used into the URL option of the [MeasureWAN6IP] measure is not working, it returns only a Hmmm… can't reach this page error in the browser. So if this is what you don't get working, it seems there is an issue with this URL.
User avatar
HardNeck
Posts: 6
Joined: February 1st, 2024, 5:49 pm

Re: Network, How to get local IP address

Post by HardNeck »

balala wrote: February 2nd, 2024, 6:53 pm Could you be little bit more specific, please? What do you mean by "produced some results"?
It seems the http://ipv6.icanhazip.com/ URL, used into the URL option of the [MeasureWAN6IP] measure is not working, it returns only a Hmmm… can't reach this page error in the browser. So if this is what you don't get working, it seems there is an issue with this URL.
Here the URL is working well, I am able to display IPv6 with this code but not all of it is cut.
Example:

LAN:000,000,000,000
WAN:000,000,000,000
WAN6: 000a : 00aa : 0aa0 : 0a00 : 00a0 : aa00 : 0aaa

When I type to center it cuts off the WAN6 address.

Code: Select all

[Rainmeter]
Update=1000

[Metadata]
Name=Network
Author=CyberTheWorm
Information=Displays LAN, WAN IP and data transfer rate
Version=1.0.0
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0


[Variables]

[MeasureNetIn]
Measure=NetIn

[MeasureNetOut]
Measure=NetOut

[MeasureLANConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=LAN_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureLANIP]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfodata=Best

[MeasureWANConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureWANIP]
Measure=Plugin
Plugin=WebParser
URL=http://ipv4.icanhazip.com/
RegExp=(.*)
UpdateDivider=3600

[MeasureWAN6IPConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureWAN6IP]
Measure=Plugin
Plugin=WebParser
URL=http://ipv6.icanhazip.com/
RegExp=(.*)
UpdateDivider=3600

[MeterConnectivity]
Meter=String
X=500
Y=60
MeasureName=MeasureLANConectivity
MeasureName2=MeasureLANIP
MeasureName3=MeasureWANConectivity
MeasureName4=MeasureWANIP
MeasureName5=MeasureWAN6IPConectivity
MeasureName6=MeasureWAN6IP


Text=LAN:%2 - %1#CRLF#WAN:%4 - %3#CRLF#WAN6:%6 - %5
FontColor=255,255,255,255
StringAlign=Right
AntiAlias=1
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Network, How to get local IP address

Post by Yincognito »

HardNeck wrote: February 2nd, 2024, 5:39 pmThis one produced some results but it is not yet 100%.
Good job - looks like you managed to do it, bar a few visual adjustments that are trivial to make, for example (compare to see what's changed):

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1

[Metadata]
Name=Network
Author=CyberTheWorm
Information=Displays LAN, WAN IP and data transfer rate
Version=1.0.0
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0


[Variables]

[MeasureNetIn]
Measure=NetIn

[MeasureNetOut]
Measure=NetOut

[MeasureLANConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=LAN_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureLANIP]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfodata=Best

[MeasureWANConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureWANIP]
Measure=Plugin
Plugin=WebParser
URL=http://ipv4.icanhazip.com/
RegExp=(.*)
UpdateDivider=3600

[MeasureWAN6IPConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureWAN6IP]
Measure=Plugin
Plugin=WebParser
URL=http://ipv6.icanhazip.com/
RegExp=(.*)
UpdateDivider=3600

[MeterConnectivity]
Meter=String
X=180
MeasureName=MeasureLANConectivity
MeasureName2=MeasureLANIP
MeasureName3=MeasureWANConectivity
MeasureName4=MeasureWANIP
MeasureName5=MeasureWANConectivity
MeasureName6=MeasureWAN6IP
Text=LAN: %2 - %1   WAN4: %4 - %3#CRLF#WAN6: %6 - %3
FontColor=255,255,255,255
StringAlign=Center
AntiAlias=1
DynamicVariables=1
I actually tried ipv6.icanhazip before my previous reply, but it didn't seem to work from my phone, hence the more general advice I posted earlier.

P.S. The above is probably why balala can't make it work either, if by any change he's trying that from his phone (or, alternatively, if his computer doesn't use IPv6 yet).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
HardNeck
Posts: 6
Joined: February 1st, 2024, 5:49 pm

Re: Network, How to get local IP address

Post by HardNeck »

Yincognito wrote: February 2nd, 2024, 7:11 pm Good job - looks like you managed to do it, bar a few visual adjustments that are trivial to make, for example (compare to see what's changed):

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1

[Metadata]
Name=Network
Author=CyberTheWorm
Information=Displays LAN, WAN IP and data transfer rate
Version=1.0.0
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0


[Variables]

[MeasureNetIn]
Measure=NetIn

[MeasureNetOut]
Measure=NetOut

[MeasureLANConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=LAN_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureLANIP]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfodata=Best

[MeasureWANConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureWANIP]
Measure=Plugin
Plugin=WebParser
URL=http://ipv4.icanhazip.com/
RegExp=(.*)
UpdateDivider=3600

[MeasureWAN6IPConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureWAN6IP]
Measure=Plugin
Plugin=WebParser
URL=http://ipv6.icanhazip.com/
RegExp=(.*)
UpdateDivider=3600

[MeterConnectivity]
Meter=String
X=180
MeasureName=MeasureLANConectivity
MeasureName2=MeasureLANIP
MeasureName3=MeasureWANConectivity
MeasureName4=MeasureWANIP
MeasureName5=MeasureWANConectivity
MeasureName6=MeasureWAN6IP
Text=LAN: %2 - %1   WAN4: %4 - %3#CRLF#WAN6: %6 - %3
FontColor=255,255,255,255
StringAlign=Center
AntiAlias=1
DynamicVariables=1
I actually tried ipv6.icanhazip before my previous reply, but it didn't seem to work from my phone, hence the more general advice I posted earlier.

P.S. The above is probably why balala can't make it work either, if by any change he's trying that from his phone (or, alternatively, if his computer doesn't use IPv6 yet).
An experienced user is another level, what you did in minutes I needed hours to do since I've been trying since yesterday, thank you very much for helping me, with this code below it turned out exactly as I imagined, but I'll keep the your code for future changes.
:thumbup:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,1

[Metadata]
Name=Network
Author=CyberTheWorm
Information=Displays LAN, WAN IP and data transfer rate
Version=1.0.0
License=Creative Commons Attribution - Non - Commercial - Share Alike 3.0


[Variables]

[MeasureNetIn]
Measure=NetIn

[MeasureNetOut]
Measure=NetOut

[MeasureLANConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=LAN_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureLANIP]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfodata=Best

[MeasureWANConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureWANIP]
Measure=Plugin
Plugin=WebParser
URL=http://ipv4.icanhazip.com/
RegExp=(.*)
UpdateDivider=3600

[MeasureWAN6IPConectivity]
Measure=Plugin
Plugin=SysInfo
SysInfoType=INTERNET_CONNECTIVITY
Substitute="-1":"Down","1":"Up"

[MeasureWAN6IP]
Measure=Plugin
Plugin=WebParser
URL=http://ipv6.icanhazip.com/
RegExp=(.*)
UpdateDivider=3600

[MeterConnectivity]
Meter=String
X=180
MeasureName=MeasureLANConectivity
MeasureName2=MeasureLANIP
MeasureName3=MeasureWANConectivity
MeasureName4=MeasureWANIP
MeasureName5=MeasureWANConectivity
MeasureName6=MeasureWAN6IP
Text=LAN: %2 - %1   #CRLF#WAN4: %4 - %3#CRLF#WAN6: %6 - %3
FontColor=255,255,255,255
StringAlign=Center
AntiAlias=1
DynamicVariables=1
User avatar
balala
Rainmeter Sage
Posts: 16178
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Network, How to get local IP address

Post by balala »

Yincognito wrote: February 2nd, 2024, 7:11 pm P.S. The above is probably why balala can't make it work either, if by any change he's trying that from his phone (or, alternatively, if his computer doesn't use IPv6 yet).
I'm trying it from my computer. Doesn't work here.
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Network, How to get local IP address

Post by Yincognito »

balala wrote: February 2nd, 2024, 8:01 pm I'm trying it from my computer. Doesn't work here.
Really?! :jawdrop
That's strange, but maybe it's because your system doesn't use an IPv6 address (can be checked in the Windows settings, I think)? Out of curiosity, do other sites provide an IPv6 address for you? :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Network, How to get local IP address

Post by Yincognito »

HardNeck wrote: February 2nd, 2024, 7:33 pm An experienced user is another level, what you did in minutes I needed hours to do since I've been trying since yesterday, thank you very much for helping me, with this code below it turned out exactly as I imagined, but I'll keep the your code for future changes.
:thumbup:
Excellent! :great:
We've all been beginners at one point, so don't worry, it takes a bit of time to get familiar with something new, for everyone. Experience is not everything though, it's about wrapping your mind around the logic of things too. For a day at the start of the road, I'd say that you did just fine. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16178
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Network, How to get local IP address

Post by balala »

Yincognito wrote: February 2nd, 2024, 9:12 pm but maybe it's because your system doesn't use an IPv6 address
This is right, it seems.
Yincognito wrote: February 2nd, 2024, 9:12 pm Out of curiosity, do other sites provide an IPv6 address for you? :???:
No, it seems they don't:
IPv6.png
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Network, How to get local IP address

Post by Yincognito »

balala wrote: February 2nd, 2024, 9:30 pm This is right, it seems.

No, it seems they don't:
IPv6.png
Ah, that explains it. Thanks for confirming it. Guess my phone is not yet using v6 either, although I would have expected to do so, giving that mobiles are at the forefront of technology nowadays.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth