It is currently September 21st, 2021, 7:46 am

[BUG] Network adapter IP get by adapter name always return 0

Report bugs with the Rainmeter application and suggest features.
aetasoul
Posts: 11
Joined: August 7th, 2021, 6:49 am

[BUG] Network adapter IP get by adapter name always return 0

Post by aetasoul »

Test skin, set the variables AdapterName with your adapters name and the same ip is shown for all the three adapters. The problem seems to be in the SysInfo plugin.

Code: Select all

[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
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]
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
AdapterName0=Intel(R) Ethernet Connection (7) I219-LM
AdapterName1=Realtek USB GbE Family Controller
AdapterName2=Intel(R) Wi-Fi 6 AX200 160MHz

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

[measureIP0]
Measure=Plugin
Plugin=SysInfo
Group=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=#AdapterName0#

[measureIP1]
Measure=Plugin
Plugin=SysInfo
Group=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=#AdapterName1#

[measureIP2]
Measure=Plugin
Plugin=SysInfo
Group=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=#AdapterName2#

; ----------------------------------
; 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
X=100
Y=12
W=190
H=18
Text=Network

[meterIPLabel0]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=Ethernet

[meterIPValue0]
Meter=String
MeterStyle=styleRightText
MeasureName=measureIP0
X=200
Y=0r
W=190
H=14
Text=%1

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

[meterIPLabel1]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=Docking

[meterIPValue1]
Meter=String
MeterStyle=styleRightText
MeasureName=measureIP1
X=200
Y=0r
W=190
H=14
Text=%1

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

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

[meterIPValue2]
Meter=String
MeterStyle=styleRightText
MeasureName=measureIP2
X=200
Y=0r
W=190
H=14
Text=%1

[meterSeperator2]
Meter=Image
MeterStyle=styleSeperator
X=10
Y=92
W=190
H=1
Immagine 2021-08-07 085239.png
Immagine 2021-08-07 085422.png
Take a look to the pull request on github https://github.com/rainmeter/rainmeter/pull/270

The issue is solved and with the compiled DLL with the fix all work good
Immagine 2021-08-27 181548.png
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22287
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG] Network adapter IP get by adapter name always return 0

Post by jsmorley »

Let us take a look at this. Thanks for reporting and providing a potential solution!