It is currently May 26th, 2020, 8:54 pm

What is my local IP Address(es)

Get help with installing and using Rainmeter.
buck2825
Posts: 5
Joined: March 30th, 2012, 7:24 pm

What is my local IP Address(es)

Post by buck2825 »

I have 9 network adapters, bluetooth, VPN, VM, Wireless, etc. As these connections come online and offline the "SysInfoData" number changes in regard to the SysInfo.dll Plugin. What I want to show I feel should be easy i'm just missing something. I always want to see the IP address for my "Local Area Connection" with device name "Intel(R) 82579LM ..." this is my physical wired Ethernet port. An I also want to see the IP for my "Wireless Network Connection", as well, with device name "Intel(R) Centrino..."

Thanks in advance,

Phil

Code: Select all


[measureIP0]
; This measure returns your IP. 
Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=IP_ADDRESS
SysInfoData=0
Substitute="":"N/A"

[measureIP1]
Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=IP_ADDRESS
SysInfoData=4
Substitute="":"N/A"


User avatar
JoBu
Posts: 280
Joined: February 16th, 2011, 12:46 am
Location: California

Re: What is my local IP Address(es)

Post by JoBu »

buck2825 wrote:I have 9 network adapters, bluetooth, VPN, VM, Wireless, etc. As these connections come online and offline the "SysInfoData" number changes in regard to the SysInfo.dll Plugin. What I want to show I feel should be easy i'm just missing something. I always want to see the IP address for my "Local Area Connection" with device name "Intel(R) 82579LM ..." this is my physical wired Ethernet port. An I also want to see the IP for my "Wireless Network Connection", as well, with device name "Intel(R) Centrino..."

Thanks in advance,

Phil

Code: Select all


[measureIP0]
; This measure returns your IP. 
Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=IP_ADDRESS
SysInfoData=0
Substitute="":"N/A"

[measureIP1]
Measure=Plugin
Plugin=SysInfo.dll
SysInfoType=IP_ADDRESS
SysInfoData=4
Substitute="":"N/A"


Look into the WifiStatus.dll - it should help you sort out what you want for the statics.
As to measuring 9 adapters, you could have a meter for each that fires when they activate, and hide them when they're inactive... that would take some tinkering but I'm sure it can be done.

Here's what I use to measure my IP's and wifi status. Note the usage of WifiStatus.dll and Webparser.dll:

Code: Select all

; MEASURE WIFI ------------------------


[GetInternIP]
Measure=Plugin
Plugin=Plugins\SysInfo.dll
SysInfoType=IP_ADDRESS
SysInfoData=1
Substitute=".":" . "
UpdateDivider=120

[GetExternIP]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=http://checkip.dyndns.org
RegExp="(?siU)<body>(.+)Address: (.+)</body>"
StringIndex=2
Substitute=".":" . "
UpdateRate=900

[SSID]
Measure=Plugin
Plugin=Plugins\WifiStatus.dll
WifiInfoType=SSID
WifiIntfID=0
UpdateDivider=3

[Encryption]
Measure=Plugin
Plugin=WifiStatus.dll
WifiInfoType=ENCRYPTION
WifiIntfID=0
Substitute="0":"","NONE":"(open)"
UpdateDivider=5

[Quality]
Measure=Plugin
Plugin=WifiStatus.dll
WifiInfoType=QUALITY
WifiIntfID=0
UpdateDivider=5

[NetIn]
Measure=NetIn

[NetOut]
Measure=NetOut

; METER WIFI --------------------------

[MeterTitle]
Group=System
Meter=STRING
MeterStyle=StyleFont2
MeasureName=SSID
MeasureName2=Encryption
X=(#SCREENAREAWIDTH# -220)
Y=30R
Text="WiFi: %1 %2"
Hidden=1

[MeterSignal]
Group=System
Meter=STRING
MeterStyle=StyleFont3
MeasureName=Quality
X=(#SCREENAREAWIDTH# -20)
Y=r
Text="%1%"
Hidden=1

[MeterBarWIFI]
Group=System
Meter=BAR
MeterStyle=StyleBar1
MeasureName=Quality
X=(#SCREENAREAWIDTH# -220)
Y=15r
W=206
H=2
Hidden=1

[MeterBarBackWIFI]
Group=System
Meter=Image
SolidColor=#BarColor2#
X=-2r
Y=-2r
W=210
H=6
Hidden=1

[ShowInternIP]
Group=System
Meter=STRING
MeasureName=GetInternIP
MeterStyle=StyleFont
X=(#SCREENAREAWIDTH# -220)
Y=10r
PreFix="Lan: "
Hidden=1

[ShowExternIP]
Group=System
Meter=STRING
MeasureName=GetExternIP
MeterStyle=StyleFont
X=r
Y=15r
PreFix="Wan: "
Hidden=1

[MeterLine-OUT]
Group=System
Meter=Line
MeasureName=NetOut
X=r
Y=15r
W=100
H=20
;LineColor=#ColorUpload#
LineColor=#BarColor#
LineWidth=1
AutoScale=1
AntiAlias=1
Hidden=1

[MeterLineOUTBack]
Group=System
Meter=Image
SolidColor=#BarColor2#
X=-2r
Y=-2r
W=104
H=24
Hidden=1

[MeterLine-IN]
Group=System
Meter=Line
MeasureName=NetIn
X=5R
Y=2r
W=100
H=20
;LineColor=#ColorDownload#
LineColor=#BarColor#
LineWidth=1
AntiAlias=1
AutoScale=1
Hidden=1

[MeterLineINBack]
Group=System
Meter=Image
SolidColor=#BarColor2#
X=-2r
Y=-2r
W=104
H=24
Hidden=1

[MeterText-OUT]
Group=System
Meter=STRING
MeasureName=NetOut
MeterStyle=StyleFont2
X=(#SCREENAREAWIDTH# -220)
Y=25r
FontSize=8
NumOfDecimals=1
AutoScale=1
Text="UP: %1"
Hidden=1

[MeterText-IN]
Group=System
Meter=STRING
MeasureName=NetIn
MeterStyle=StyleFont2
X=106r
Y=r
FontSize=8
NumOfDecimals=1
AutoScale=1
Text="DN: %1"
Hidden=1
buck2825
Posts: 5
Joined: March 30th, 2012, 7:24 pm

Re: What is my local IP Address(es)

Post by buck2825 »

Thanks for the post, but this does not help. my primary concern is knowing my laptop's wired ip address. when the port is not connected rather than giving me the next port I need it to display "disconnnected" or "N/A"
User avatar
JoBu
Posts: 280
Joined: February 16th, 2011, 12:46 am
Location: California

Re: What is my local IP Address(es)

Post by JoBu »

Edit the SSID measure as follows:

[SSID]
Measure=Plugin
Plugin=Plugins\WifiStatus.dll
WifiInfoType=SSID
WifiIntfID=0
Substitute="":"Disconnected"
UpdateDivider=3

I believe that will give you what you want.

As to always displaying every port... simply create 9 measures and 9 meters. [SSID1] [SSID2] [SSID3]... you'll have to figure out each port so that you're measuring properly, but it shouldn't be too difficult to navigate.
buck2825
Posts: 5
Joined: March 30th, 2012, 7:24 pm

Re: What is my local IP Address(es)

Post by buck2825 »

Thanks for the help. The WifiStatus.dll is only for wifi connections, so this will not work for my primary point of interest, my wired connection.

Thanks,

Phil
User avatar
JoBu
Posts: 280
Joined: February 16th, 2011, 12:46 am
Location: California

Re: What is my local IP Address(es)

Post by JoBu »

Wow, sorry, I totally missed that one. Too much coding has me a little dense this week.
I'd look into the SysInfo and Perfmon possibilities. SysInfo with IP_ADDRESS and SysInfoData should allow you to select different returns.

http://rainmeter.net/cms/Plugins-SysInfo

Sorry again, I appreciate your kindness. Good luck.
buck2825
Posts: 5
Joined: March 30th, 2012, 7:24 pm

Re: What is my local IP Address(es)

Post by buck2825 »

I am currently using the sysinfo plugin (see original post). I am unhappy with the results I am getting.

under normal operations my wired port is SysInfoData=0, and my wireless connection is Sysinfodata=4.

the problem is when I move, once i undock my laptop SysinfoData=0 becomes my VMWare NAT connection, and sysinfodata=4 becomes my miniport adapter.

My wireless connection is then sysinfodata=3

What I would like to happen is when connected to display my wired IP and wireless IP

if my wireless IP is not connected then I want to see "N/A" or "No Connection", and I want my wired port IP to not change

if my wired port IP is not connected then I want to see "N/A" or "No connection", and i want my wireless port IP to not change.

I can parse the "substitute" part after I get the first part (IP address) working.
ultimately I would like to see the wired IP address regardless of connection state.


Thanks again,

Phil
DaveHouser
Posts: 5
Joined: January 23rd, 2012, 4:50 pm

Re: What is my local IP Address(es)

Post by DaveHouser »

I feel your pain buck2825.

I too have many NIC, and need Rain meter to display the correct information. Right now i am using Enigma Network.ini skin. It is a nightmare to try and configure this thing properly.

let me know if you figure this out.

Dave
Masterchi
Posts: 5
Joined: May 28th, 2012, 4:29 am
Location: Virginia Beach, VA

Re: What is my local IP Address(es)

Post by Masterchi »

Buck2825 wrote:if my wireless IP is not connected then I want to see "N/A" or "No Connection", and I want my wired port IP to not change

if my wired port IP is not connected then I want to see "N/A" or "No connection", and i want my wireless port IP to not change.
Ok, going by this change your code to below:

Code: Select all

[mIntIP]
Measure=Plugin
Plugin=Plugins\SysInfo.dll
SysInfoType=IP_ADDRESS
SysInfoData=0
Substitute="192.168.117.1":"N/A"
So to explain. I have 4 "NICs"...1LAN (Sysinfo=0) and 2 VMs and 1 Wlan. When i disconnect my LAN is changes to VM1 like yours does instead of displaying N/A. To get around this i know that my VM1 NIC is always 192.168.117.1 so my substitute above states "When IP = 192.168.117.1 on the "mIntIP" measure display N/A instead" so now when i disconnect my LAN it displays N/A instead of the IP of VM1. You can duplicate this and do the same for your WLAN considering your know the IP of the Miniport Adaptor and just substitute those digits for N/A or Disconnected.

To explain further "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" but in your case when you disconnect the cable it doesn't go "" (empty) it assumes NIC no longer exists and the new "SysInfoData=0" is now the next NIC in line which would be your VM1 (i'm sure if you disconnected VM1 then the IP would jump to your VM2 IP next and so on) so since your don't have an ""(empty) you need to just substitute the next IP to N/A or Disconnected.
buck2825
Posts: 5
Joined: March 30th, 2012, 7:24 pm

Re: What is my local IP Address(es)

Post by buck2825 »

Great Idea!!! it almost works for my situation :(

under normal circumstances my SysInfoData = 5 is a my wireless connection when I disconnect my wired connection (SysInfoData = 0) my SysInfoData = 5 is now nothing and shows N/A even though it is still connected.


what I really need is some way to script this. some vbs and I would have this lick in 20 min.

any idea to to work scripting into rainmeter?