It is currently March 29th, 2024, 8:16 am

NETWORK settings... How to show my Local and Public IP?

Get help with installing and using Rainmeter.
User avatar
RepoDraghon
Posts: 8
Joined: February 24th, 2018, 7:04 am

NETWORK settings... How to show my Local and Public IP?

Post by RepoDraghon »

I'd like for the meter to display both but it currently only shows the Public IP
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: NETWORK settings... How to show my Local and Public IP?

Post by balala »

RepoDraghon wrote:I'd like for the meter to display both but it currently only shows the Public IP
Try the DNS_SERVER and the IP_ADDRESS SysInfoType options in SysInfo plugin measures.
User avatar
RepoDraghon
Posts: 8
Joined: February 24th, 2018, 7:04 am

Re: NETWORK settings... How to show my Local and Public IP?

Post by RepoDraghon »

I have no idea where that file is
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: NETWORK settings... How to show my Local and Public IP?

Post by jsmorley »

Code: Select all

[MeasureIPLan]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS

[MeasureIPWeb]
Measure=WebParser
URL=http://icanhazip.com/
RegExp=(?siU)^(.*)$
StringIndex=1
Those two measure will give you your local LAN address and public WAN address. Then you can display them as you like in String meters.
User avatar
RepoDraghon
Posts: 8
Joined: February 24th, 2018, 7:04 am

Re: NETWORK settings... How to show my Local and Public IP?

Post by RepoDraghon »

ok, I'm sorry, I'm not that smart but I know some basics...

where is this Meter String? in the Network.ini? cause I searched, there is none
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: NETWORK settings... How to show my Local and Public IP?

Post by eclectic-tech »

RepoDraghon wrote:ok, I'm sorry, I'm not that smart but I know some basics...

where is this Meter String? in the Network.ini? cause I searched, there is none
Are you asking about the illustro network.ini skin?

If so, you can add those measures and will need to add a new label string meter, value string meter, and a new separator meter to show the additional info. You would also have to change the vertical spacing values to insert the new meters.

Here is an example of how to do it for the illustro network.ini

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Network
Author=poiru
Information=Shows your IP address and network activity.
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
maxDownload=10485760
MaxUpload=10485760
; Set maxDownload and maxUpload to your maximum download and upload speed in bits.
; To convert kilobits, megabits, kilobytes, and megabytes into bits, go to www.google.com
; and search for something like "10 megabytes in bits".

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

[MeasureIPLan]
Measure=Plugin
Plugin=SysInfo
SysInfoData=Best
SysInfoType=IP_ADDRESS

[MeasureIP]
; This measure returns your IP. WebParser measures are relatively complicated. If you're a beginner with
; Rainmeter, take a look at some of the other illustro skins before modifying this one.
Measure=WebParser
URL=http://icanhazip.com/
RegExp=(?siU)^(.*)$
StringIndex=1
Substitute="":"N/A"
; Substitute works as follows: "A":"B" where A is a string to substitute and B is a string
; to substitute with. In this case, it substutes "" (i.e. empty) to N/A

[measureNetIn]
Measure=NetIn
NetInSpeed=#maxDownload#
; NetInSpeed must be set so your maximun download speed for the download bar to scale correctly

[measureNetOut]
Measure=NetOut
NetOutSpeed=#maxUpload#

; ----------------------------------
; 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.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=Network
; Even though the text is set to Network, Rainmeter will display
; it as NETWORK, because styleTitle contains StringCase=Upper.

[meterIPLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=IP Web Address

[meterIPValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureIP
X=200
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=190
H=14
Text=%1
; %1 stands for the value of MeasureName (measureIP in this case).

[meterSeperator0]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=12r
W=190
H=1

[meterIPLanLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=IP Lan Address

[meterIPLanValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureIPlan
X=200
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=190
H=14
Text=%1
; %1 stands for the value of MeasureName (measureIP in this case).

[meterSeperator1]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=12r
W=190
H=1

[meterUploadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=Upload

[meterUploadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetOut
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1
; Because measureIP returns the current upload speed in bytes, we must use AutoScale=1 to
; automatically scale the value into a more readable figure.

[meterUploadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetOut
X=10
Y=12r
W=190
H=1

[meterDownloadLabel]
Meter=String
MeterStyle=styleLeftText
X=10
Y=100
W=190
H=14
Text=Download

[meterDownloadValue]
Meter=String
MeterStyle=styleRightText
MeasureName=measureNetIn
X=200
Y=0r
W=190
H=14
Text=%1B/s
NumOfDecimals=1
AutoScale=1

[meterDownloadBar]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureNetIn
X=10
Y=12r
W=190
H=1
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: NETWORK settings... How to show my Local and Public IP?

Post by balala »

RepoDraghon wrote:ok, I'm sorry, I'm not that smart but I know some basics...

where is this Meter String? in the Network.ini? cause I searched, there is none
Just to clarify a few things RepoDraghon:

I suppose you have the illustro suite installed (it is Rainmeter's default suite, so probably you have it). Open the illustro Network skin. For this, you have to right click Rainmeter's icon in the Notification Area, point to Skins and to illustro, then, in the opening submenu, go to Network and click Network.ini. The illustro's Network skin will be loaded. You'll see it in the upper left corner of your screen.

Now right click it. In the popped up menu, click Edit skin. The code of the skin loads in the default text editor.

Paste here eclectic-tech's previously posted code and refresh the skin (right click it and click Refresh). You'll see the upload and download speed, along with the two desires IP addresses.
User avatar
RepoDraghon
Posts: 8
Joined: February 24th, 2018, 7:04 am

Re: NETWORK settings... How to show my Local and Public IP?

Post by RepoDraghon »

Thanks, I did know how to get to the ini file, Yes, the default skin... I tried paste then save it but nothing changed... I tried to unload and reload and refresh the skin but nothing worked correction, worked the 2nd time... GREAT THANKS GUYS!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: NETWORK settings... How to show my Local and Public IP?

Post by eclectic-tech »

Happy to help! :welcome:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: NETWORK settings... How to show my Local and Public IP?

Post by balala »

RepoDraghon wrote:I have no idea where that file is
RepoDraghon wrote:Thanks, I did know how to get to the ini file
These two don't match too much, but I'm glad if you got it working. :17good