It is currently December 15th, 2019, 6:28 am

Need help in displaying multiple IP

Get help with installing and using Rainmeter.
guigui7
Posts: 12
Joined: October 25th, 2019, 1:38 pm

Need help in displaying multiple IP

guigui7 » October 25th, 2019, 1:45 pm

So I am trying to have a laptop display both ethernet AND wireless IPs at the same time, since when its connected via ethernet, the wireless connection is still active and displays an internal IP in ipconfig /all

Here's what I'm working with right now
[MeasureEthernet]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=Best
DynamicVariables=1
UpdateDivider=1

[MeasureWifi]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData= Wireless
UpdateDivider=1

[MeterEthernetIP]
Meter=String
MeasureName=MeasureEthernet
Y=5R
AntiAlias=1
FontColor = 255,255,255,255
FontSize=10
StringStyle=Bold
Text= IP : %1
LeftMouseUpAction=[]
RightMouseUpAction=[]

[MeterWifiIP]
Meter=String
MeasureName=MeasureWifi
Y=6R
AntiAlias=1
FontColor = 255,255,255,255
FontSize=10
StringStyle=Bold
Text= IP : %1
LeftMouseUpAction=[]
RightMouseUpAction=[]
I know the MeasureEthernet is set at best, that's what I want, so don't worry about that, its just that the wifi part, even though I've put Sysinfodata = Wireless it still displays the Ethernet IP - I've tried setting the value to 71 instead of wireless since the documentation of rainmeter mentionned that 71 = Wireless adapter, but this doesn't work either.

Basically trying to have it display

Line 1 = shows current IP that will update real time (This one works fine)
Line 2 = shows laptop's current wireless IP even thought its using Ethernet (It is still connected to the wireless network and displays an internal IP when doing ipconfig /all, trying to get that IP to display)


Hope this makes sense. Thanks in advance!
User avatar
jsmorley
Developer
Posts: 19870
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Need help in displaying multiple IP

jsmorley » October 25th, 2019, 1:51 pm

The values like "wireless" (string) and "71" (number) are values the measure "returns", not values you should set as input.

What you want for SysInfoData is either "Best", which will choose the currently active interface, with a preference for wired connections over wireless if both are active, or the "name" of the desired adapter, which might be something like "Intel(R) Dual Band Wireless-AC 3168" or "Intel(R) I211 Gigabit Network Connection".

You can get the name(s) for your adapters from Window Network and Sharing Center.
guigui7
Posts: 12
Joined: October 25th, 2019, 1:38 pm

Re: Need help in displaying multiple IP

guigui7 » October 25th, 2019, 1:55 pm

Cool, that explains it. Now as far as the name is concerned then, I know with powershell I am able to fetch the name and the value attached to that interface. Is there a way to setup something in Rainmeter so if I put my pluggin in a different laptop, it'll fetch the info in case of a different name? Or that's just impossible?
User avatar
jsmorley
Developer
Posts: 19870
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Need help in displaying multiple IP

jsmorley » October 25th, 2019, 2:10 pm

guigui7 wrote:
October 25th, 2019, 1:55 pm
Cool, that explains it. Now as far as the name is concerned then, I know with powershell I am able to fetch the name and the value attached to that interface. Is there a way to setup something in Rainmeter so if I put my pluggin in a different laptop, it'll fetch the info in case of a different name? Or that's just impossible?
I don't have multiple interfaces active, so it's a bit hard for me to test anything, but my gut reaction is that it might be hard. The problem is that there are multiple physical and virtual "interfaces" that Windows sees for your computer, and I'm not sure how you would have it detect just the one(s) you are interested in.

Certainly you could use RunCommand to interface with a Powershell script and parse the results.
User avatar
jsmorley
Developer
Posts: 19870
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Need help in displaying multiple IP

jsmorley » October 25th, 2019, 2:13 pm

1.jpg
You do not have the required permissions to view the files attached to this post.