It is currently March 28th, 2024, 8:15 am

[BUG] Numeric value in the Interface option of Net measures

Report bugs with the Rainmeter application and suggest features.
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

[BUG] Numeric value in the Interface option of Net measures

Post by Yincognito »

Test skin (set the numerical values of the Interface options in the [...N] measures to match the - busy, for proper viewing - string equivalents in the [...S] measures):

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

---Measures---

[measureNetInN]
Measure=NetIn
Interface=4
DynamicVariables=1

[measureNetInS]
Measure=NetIn
Interface=Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC
DynamicVariables=1

[measureNetOutN]
Measure=NetOut
Interface=4
DynamicVariables=1

[measureNetOutS]
Measure=NetOut
Interface=Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC
DynamicVariables=1

---Meters---

[meterNICInfo]
Meter=String
StringEffect=Shadow
FontEffectColor=0,0,0,50
SolidColor=47,47,47,255
FontColor=255,255,255,255
FontFace=Consolas
FontSize=16
AntiAlias=1
MeasureName=measureNetInN
MeasureName2=measureNetInS
MeasureName3=measureNetOutN
MeasureName4=measureNetOutS
Text=NetIn  : %2 B (%1 B)#CRLF#NetOut : %4 B (%3 B)
DynamicVariables=1
Problem: The values outside the brackets should match the ones inside the brackets from the same line. They do not though:
Net.jpg
Question: This is a bug, isn't it? Because the manual clearly says that you can use both the string name of your adapter or its numerical index in the Interface option, in order to get data from Net measures.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG] Numeric value in the Interface option of Net measures

Post by jsmorley »

The numbers are the same for me.

The trick is to actually find the right index number for your adapter. There is literally no way I know of to get this number from anything in Windows. This is because Rainmeter creates its own index when it is first started, and those numbers have nothing to do with what Windows uses.

The way to get the right index number is:

1) Turn on "Debug Mode"
2) Turn on "Log to File"
3) Restart Rainmeter
4) Click on "Show Log File"

1.jpg


Then look in that log and search for Hardware=Yes to find the right entry for your hardware network interface.


2.jpg

Code: Select all

[measureNetInN]
Measure=NetIn
Interface=46
DynamicVariables=1

[measureNetInS]
Measure=NetIn
Interface=Intel(R) Dual Band Wireless-AC 7265
DynamicVariables=1

[measureNetOutN]
Measure=NetOut
Interface=46
DynamicVariables=1

[measureNetOutS]
Measure=NetOut
Interface=Intel(R) Dual Band Wireless-AC 7265
DynamicVariables=1
You will literally have dozens of indexed entries for network interfaces. Almost all of them will be Hardware=No.

Be sure to turn off 1) and 2) when you are done, as this level of logging is a bit expensive.

This is convoluted I know, and I wish it were otherwise, but this is why we added support for using the string value of the adapter name, and the setting of "Best" on the interface. Those approaches are certainly a lot easier to deal with.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: [BUG] Numeric value in the Interface option of Net measures

Post by SilverAzide »

The insidious thing about those index numbers is they are not constant. For example, just because your Ethernet adapter is #4 today. doesn't mean it will be #4 tomorrow. Or in an hour. I can get mine to shift places by firing up a VPN client or simply toggling airplane mode on my laptop. I know where those index numbers come from (a Win32 API call), but they are not exposed anywhere else I can find that is more easily accessible, like WMI.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG] Numeric value in the Interface option of Net measures

Post by jsmorley »

SilverAzide wrote: August 10th, 2021, 12:32 pm The insidious thing about those index numbers is they are not constant. For example, just because your Ethernet adapter is #4 today. doesn't mean it will be #4 tomorrow. Or in an hour. I can get mine to shift places by firing up a VPN client or simply toggling airplane mode on my laptop. I know where those index numbers come from (a Win32 API call), but they are not exposed anywhere else I can find that is more easily accessible, like WMI.
Yeah, I'm not a fan of depending on those index numbers in Rainmeter. This is why we added support for using the string value of the adapter name, and the setting of "Best" on the interface. Those approaches are certainly a lot easier to deal with.

If you have more than one hardware interface that you can dynamically "switch" between, I'd recommdend Interface=Best and DynamicVariables=1. If you have one interface that you always use, then Interface=Intel(R) Dual Band Wireless-AC 7265 is good.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: [BUG] Numeric value in the Interface option of Net measures

Post by SilverAzide »

The most insidious issue of all is if you use Cumulative=1 on any Net measure, regardless of whether you use Best, the adapter name, or the index. The stats are ultimately stored against the adapter's index in the Rainmeter.stats log file, and they can never be correct in the long term due to the instability of the index numbers. Unfortunately, fixing this (if it is possible -- or if anyone cares besides just me, LOL) could cause backward compatibility issues.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG] Numeric value in the Interface option of Net measures

Post by jsmorley »

SilverAzide wrote: August 10th, 2021, 12:44 pm The most insidious issue of all is if you use Cumulative=1 on any Net measure, regardless of whether you use Best, the adapter name, or the index. The stats are ultimately stored against the adapter's index in the Rainmeter.stats log file, and they can never be correct in the long term due to the instability of the index numbers. Unfortunately, fixing this (if it is possible -- or if anyone cares besides just me, LOL) could cause backward compatibility issues.
Yes. Since Jun 20th, my single WiFI interface has had 25 different index numbers... I think they are "reliable" as such, but you would have to collect and add up all the cumulative numbers to get a real total, and that would entirely depend on having only ONE phyiscal interface. It's really not doable, as many of those indexed numbers in Raimeter.stats are redundant, as they are coming from some of the "virtual" interfaces talking to your hardware.

I sorta wish we had never done Cumulative=1 at all. It's a pretty meaningless number in any case. It might have meant something in 2001, before WiFi and dozens of devices on your network. I've lost track of how many devices in my house are hammering the network. Lots... It only measures the traffic that "crosses" your individual computer's network adapter, including from your computer to another device, but not from another device to another device, and has nothing to do at all with how much "network" you are using through your router. I have never ever used what is in Rainmeter.stats for anything. What is it really telling you? Do I really care that my hardware interface has seen 6TB of data in the last month?

The only "cumulative" data I would find at all interesting is how much data has crossed my ROUTER on it's way in and out of the WAN network, and that is tricky indeed to get, as the router isn't fond of things poking at it from either side of the DMZ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [BUG] Numeric value in the Interface option of Net measures

Post by Yincognito »

jsmorley wrote: August 10th, 2021, 12:16 pm The numbers are the same for me.

The trick is to actually find the right index number for your adapter. There is literally no way I know of to get this number from anything in Windows. This is because Rainmeter creates its own index when it is first started, and those numbers have nothing to do with what Windows uses.
[...]
This is convoluted I know, and I wish it were otherwise, but this is why we added support for using the string value of the adapter name, and the setting of "Best" on the interface. Those approaches are certainly a lot easier to deal with.
Huh, I thought those numbers are the same as the number from SysInfoData? I mean, I literally set the NIC according to it:

Code: Select all

SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=#NICID#
where #NICID# is the NIC index, therefore it felt obvious that when calling the Net measures with the same number I just set the adapter description to a few ms ago would yield that specific NIC/adapter traffic values... :jawdrop
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG] Numeric value in the Interface option of Net measures

Post by jsmorley »

Yincognito wrote: August 10th, 2021, 1:26 pm Huh, I thought those numbers are the same as the number from SysInfoData? I mean, I literally set the NIC according to it:

Code: Select all

SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=#NICID#
where #NICID# is the NIC index, therefore it felt obvious that when calling the Net measures with the same number I just set the adapter description to a few ms ago would yield that specific NIC/adapter traffic values... :jawdrop
Take a look in that debug log though. There are probably a dozen indexed entries for my WiFI adapter. Only one of them is Hardware=Yes, and that is the only one that counts in a sense, but they are all "real" as far as Windows is concerned.

Sorry, but I would just not depend on those index numbers in any way. In my view, they are transient and meaningless. Always have been. Use ipconfig or something to get the names (Description) of all your adapters, then just use those names in the net measures. For most normal NetIn/NetOut purposes, Interface=Best is your friend.

Code: Select all

PS C:\Users\JSMorley> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : TOWER
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) I211 Gigabit Network Connection
   Physical Address. . . . . . . . . : E0-D5-5E-E2-D6-C6
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Unknown adapter NordLynx:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : NordLynx Tunnel
   Physical Address. . . . . . . . . :
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter Ethernet 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : TAP-NordVPN Windows Adapter V9
   Physical Address. . . . . . . . . : 00-FF-B6-E5-38-AA
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 1:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
   Physical Address. . . . . . . . . : 34-2E-B7-F5-AC-04
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 10:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2
   Physical Address. . . . . . . . . : 36-2E-B7-F5-AC-03
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wi-Fi 3:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 7265
   Physical Address. . . . . . . . . : 34-2E-B7-F5-AC-03
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : 2600:8806:3307:bd00::7491(Preferred)
   Lease Obtained. . . . . . . . . . : Tuesday, August 10, 2021 7:18:51 AM
   Lease Expires . . . . . . . . . . : Saturday, August 14, 2021 3:38:51 PM
   IPv6 Address. . . . . . . . . . . : 2600:8806:3307:bd00:215d:800a:e301:ec17(Preferred)
   Temporary IPv6 Address. . . . . . : 2600:8806:3307:bd00:9043:25b6:ea6b:6344(Preferred)
   Link-local IPv6 Address . . . . . : fe80::215d:800a:e301:ec17%4(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.0.17(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Tuesday, August 10, 2021 7:18:49 AM
   Lease Expires . . . . . . . . . . : Thursday, August 12, 2021 7:18:49 AM
   Default Gateway . . . . . . . . . : fe80::226:86ff:fef3:6755%4
                                       192.168.0.1
   DHCP Server . . . . . . . . . . . : 192.168.0.1
   DHCPv6 IAID . . . . . . . . . . . : 137637559
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-24-D2-34-B3-E0-D5-5E-E2-D6-C6
   DNS Servers . . . . . . . . . . . : 2001:578:3f::30
                                       2001:578:3f:1::30
                                       2001:578:3f::30
                                       2001:578:3f:1::30
                                       8.8.8.8
                                       8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Bluetooth Network Connection 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network) #2
   Physical Address. . . . . . . . . : 34-2E-B7-F5-AC-07
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG] Numeric value in the Interface option of Net measures

Post by jsmorley »

Code: Select all

C:\Users\JSMorley>getmac /fo list /v

Connection Name:  Ethernet 2
Network Adapter:  TAP-NordVPN Windows Adapter V9
Physical Address: 00-FF-B6-E5-38-AA
Transport Name:   Media disconnected

Connection Name:  Ethernet
Network Adapter:  Intel(R) I211 Gigabit Network Connection
Physical Address: E0-D5-5E-E2-D6-C6
Transport Name:   Media disconnected

Connection Name:  Wi-Fi 3
Network Adapter:  Intel(R) Dual Band Wireless-AC 7265
Physical Address: 34-2E-B7-F5-AC-03
Transport Name:   \Device\Tcpip_{18A8D6A0-64F9-4803-B4C5-329309490987}

Connection Name:  NordLynx
Network Adapter:  NordLynx Tunnel
Physical Address: N/A
Transport Name:   Media disconnected

Connection Name:  Bluetooth Network Connection 2
Network Adapter:  Bluetooth Device (Personal Area Network) #2
Physical Address: 34-2E-B7-F5-AC-07
Transport Name:   Media disconnected
and when I turn on my VPN:

Code: Select all

PS C:\Users\JSMorley> getmac /fo list /v

Connection Name:  Ethernet 2
Network Adapter:  TAP-NordVPN Windows Adapter V9
Physical Address: 00-FF-B6-E5-38-AA
Transport Name:   Media disconnected

Connection Name:  Ethernet
Network Adapter:  Intel(R) I211 Gigabit Network Connection
Physical Address: E0-D5-5E-E2-D6-C6
Transport Name:   Media disconnected

Connection Name:  Wi-Fi 3
Network Adapter:  Intel(R) Dual Band Wireless-AC 7265
Physical Address: 34-2E-B7-F5-AC-03
Transport Name:   \Device\Tcpip_{18A8D6A0-64F9-4803-B4C5-329309490987}

Connection Name:  NordLynx
Network Adapter:  NordLynx Tunnel
Physical Address: N/A
Transport Name:   \Device\Tcpip_{5D7C2CD5-9A75-1AC5-6245-118F1C411193}

Connection Name:  Bluetooth Network Connection 2
Network Adapter:  Bluetooth Device (Personal Area Network) #2
Physical Address: 34-2E-B7-F5-AC-07
Transport Name:   Media disconnected
User avatar
Yincognito
Rainmeter Sage
Posts: 7017
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [BUG] Numeric value in the Interface option of Net measures

Post by Yincognito »

jsmorley wrote: August 10th, 2021, 1:28 pm Take a look in that debug log though. There are probably a dozen indexed entries for my WiFI adapter. Only one of them is Hardware=Yes, and that is the only one that counts in a sense, but they are all "real" as far as Windows is concerned.
Yes, that does it, but I thought it would be easier than this:

Code: Select all

DBUG (17:16:33.587) : * NETWORK-INTERFACE: Count=67
DBUG (17:16:33.588) : 1: Bluetooth Device (RFCOMM Protocol TDI)
DBUG (17:16:33.589) :   Alias: Local Area Connection* 3
DBUG (17:16:33.589) :   Type=Other(1), Hardware=No, Filter=No
DBUG (17:16:33.590) : 2: VirtualBox Host-Only Ethernet Adapter-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.591) :   Alias: VirtualBox Host-Only Network-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.591) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.592) : 3: Npcap Loopback Adapter-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.593) :   Alias: Npcap Loopback Adapter-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.593) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.594) : 4: Realtek PCIe FE Family Controller-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.595) :   Alias: Ethernet-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.595) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.596) : 5: Bluetooth Device (Personal Area Network)-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.597) :   Alias: Bluetooth Network Connection-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.597) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.598) : 6: Realtek PCIe FE Family Controller-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.598) :   Alias: Ethernet-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.599) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.600) : 7: Realtek PCIe FE Family Controller-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.600) :   Alias: Ethernet-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.601) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.602) : 8: Realtek PCIe FE Family Controller-QoS Packet Scheduler-0000
DBUG (17:16:33.603) :   Alias: Ethernet-QoS Packet Scheduler-0000
DBUG (17:16:33.603) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.604) : 9: Realtek PCIe FE Family Controller-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.605) :   Alias: Ethernet-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.605) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.606) : 10: Npcap Loopback Adapter-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.606) :   Alias: Npcap Loopback Adapter-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.607) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.608) : 11: Npcap Loopback Adapter-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.608) :   Alias: Npcap Loopback Adapter-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.609) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.609) : 12: Npcap Loopback Adapter-QoS Packet Scheduler-0000
DBUG (17:16:33.610) :   Alias: Npcap Loopback Adapter-QoS Packet Scheduler-0000
DBUG (17:16:33.611) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.611) : 13: Npcap Loopback Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.612) :   Alias: Npcap Loopback Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.613) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.613) : 14: VirtualBox Host-Only Ethernet Adapter-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.614) :   Alias: VirtualBox Host-Only Network-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.615) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.615) : 15: VirtualBox Host-Only Ethernet Adapter-QoS Packet Scheduler-0000
DBUG (17:16:33.616) :   Alias: VirtualBox Host-Only Network-QoS Packet Scheduler-0000
DBUG (17:16:33.617) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.617) : 16: VirtualBox Host-Only Ethernet Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.618) :   Alias: VirtualBox Host-Only Network-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.619) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.619) : 17: WAN Miniport (IP)-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.620) :   Alias: Local Area Connection* 9-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.621) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.621) : 18: WAN Miniport (IP)-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.622) :   Alias: Local Area Connection* 9-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.623) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.623) : 19: WAN Miniport (IP)-QoS Packet Scheduler-0000
DBUG (17:16:33.624) :   Alias: Local Area Connection* 9-QoS Packet Scheduler-0000
DBUG (17:16:33.625) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.625) : 20: WAN Miniport (IPv6)-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.626) :   Alias: Local Area Connection* 10-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.627) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.627) : 21: WAN Miniport (IPv6)-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.628) :   Alias: Local Area Connection* 10-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.628) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.629) : 22: WAN Miniport (IPv6)-QoS Packet Scheduler-0000
DBUG (17:16:33.630) :   Alias: Local Area Connection* 10-QoS Packet Scheduler-0000
DBUG (17:16:33.630) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.631) : 23: WAN Miniport (Network Monitor)-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.632) :   Alias: Local Area Connection* 11-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.632) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.633) : 24: WAN Miniport (Network Monitor)-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.634) :   Alias: Local Area Connection* 11-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.634) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.635) : 25: WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000
DBUG (17:16:33.636) :   Alias: Local Area Connection* 11-QoS Packet Scheduler-0000
DBUG (17:16:33.636) :   Type=Ethernet(6), Hardware=No, Filter=Yes
DBUG (17:16:33.637) : 26: Microsoft Kernel Debug Network Adapter
DBUG (17:16:33.637) :   Alias: Ethernet (Kernel Debugger)
DBUG (17:16:33.638) :   Type=Ethernet(6), Hardware=No, Filter=No
DBUG (17:16:33.639) : 27: Realtek PCIe FE Family Controller
DBUG (17:16:33.639) :   Alias: Ethernet
DBUG (17:16:33.640) :   Type=Ethernet(6), Hardware=Yes, Filter=No
DBUG (17:16:33.641) : 28: Bluetooth Device (Personal Area Network)
DBUG (17:16:33.641) :   Alias: Bluetooth Network Connection
DBUG (17:16:33.642) :   Type=Ethernet(6), Hardware=No, Filter=No
DBUG (17:16:33.642) : 29: WAN Miniport (IP)
DBUG (17:16:33.643) :   Alias: Local Area Connection* 9
DBUG (17:16:33.644) :   Type=Ethernet(6), Hardware=No, Filter=No
DBUG (17:16:33.644) : 30: WAN Miniport (IPv6)
DBUG (17:16:33.645) :   Alias: Local Area Connection* 10
DBUG (17:16:33.646) :   Type=Ethernet(6), Hardware=No, Filter=No
DBUG (17:16:33.646) : 31: WAN Miniport (Network Monitor)
DBUG (17:16:33.647) :   Alias: Local Area Connection* 11
DBUG (17:16:33.648) :   Type=Ethernet(6), Hardware=No, Filter=No
DBUG (17:16:33.648) : 32: VirtualBox Host-Only Ethernet Adapter
DBUG (17:16:33.649) :   Alias: VirtualBox Host-Only Network
DBUG (17:16:33.649) :   Type=Ethernet(6), Hardware=No, Filter=No
DBUG (17:16:33.650) : 33: Npcap Loopback Adapter
DBUG (17:16:33.651) :   Alias: Npcap Loopback Adapter
DBUG (17:16:33.651) :   Type=Ethernet(6), Hardware=Yes, Filter=No
DBUG (17:16:33.652) : 34: WAN Miniport (PPPOE)
DBUG (17:16:33.653) :   Alias: Local Area Connection* 8
DBUG (17:16:33.653) :   Type=PPP(23), Hardware=No, Filter=No
DBUG (17:16:33.654) : 35: Software Loopback Interface 1
DBUG (17:16:33.654) :   Alias: Loopback Pseudo-Interface 1
DBUG (17:16:33.655) :   Type=Loopback(24), Hardware=No, Filter=No
DBUG (17:16:33.656) : 36: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.656) :   Alias: Wi-Fi-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.657) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.658) : 37: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC-Npcap Packet Driver (NPCAP) (WiFi version)-0000
DBUG (17:16:33.658) :   Alias: Wi-Fi-Npcap Packet Driver (NPCAP) (WiFi version)-0000
DBUG (17:16:33.659) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.660) : 38: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC-Virtual WiFi Filter Driver-0000
DBUG (17:16:33.660) :   Alias: Wi-Fi-Virtual WiFi Filter Driver-0000
DBUG (17:16:33.661) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.662) : 39: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC-Native WiFi Filter Driver-0000
DBUG (17:16:33.662) :   Alias: Wi-Fi-Native WiFi Filter Driver-0000
DBUG (17:16:33.663) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.664) : 40: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.664) :   Alias: Wi-Fi-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.665) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.665) : 41: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.666) :   Alias: Wi-Fi-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.667) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.667) : 42: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC-QoS Packet Scheduler-0000
DBUG (17:16:33.668) :   Alias: Wi-Fi-QoS Packet Scheduler-0000
DBUG (17:16:33.669) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.669) : 43: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.670) :   Alias: Wi-Fi-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.671) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.671) : 44: Microsoft Wi-Fi Direct Virtual Adapter-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.672) :   Alias: Local Area Connection* 1-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.673) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.673) : 45: Microsoft Wi-Fi Direct Virtual Adapter-Npcap Packet Driver (NPCAP) (WiFi version)-0000
DBUG (17:16:33.674) :   Alias: Local Area Connection* 1-Npcap Packet Driver (NPCAP) (WiFi version)-0000
DBUG (17:16:33.675) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.675) : 46: Microsoft Wi-Fi Direct Virtual Adapter-Native WiFi Filter Driver-0000
DBUG (17:16:33.676) :   Alias: Local Area Connection* 1-Native WiFi Filter Driver-0000
DBUG (17:16:33.677) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.677) : 47: Microsoft Wi-Fi Direct Virtual Adapter-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.678) :   Alias: Local Area Connection* 1-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.678) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.679) : 48: Microsoft Wi-Fi Direct Virtual Adapter-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.680) :   Alias: Local Area Connection* 1-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.680) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.681) : 49: Microsoft Wi-Fi Direct Virtual Adapter-QoS Packet Scheduler-0000
DBUG (17:16:33.682) :   Alias: Local Area Connection* 1-QoS Packet Scheduler-0000
DBUG (17:16:33.682) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.683) : 50: Microsoft Wi-Fi Direct Virtual Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.684) :   Alias: Local Area Connection* 1-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.684) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.685) : 51: Microsoft Wi-Fi Direct Virtual Adapter #2-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.686) :   Alias: Local Area Connection* 2-WFP Native MAC Layer LightWeight Filter-0000
DBUG (17:16:33.686) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.687) : 52: Microsoft Wi-Fi Direct Virtual Adapter #2-Npcap Packet Driver (NPCAP) (WiFi version)-0000
DBUG (17:16:33.687) :   Alias: Local Area Connection* 2-Npcap Packet Driver (NPCAP) (WiFi version)-0000
DBUG (17:16:33.688) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.689) : 53: Microsoft Wi-Fi Direct Virtual Adapter #2-Native WiFi Filter Driver-0000
DBUG (17:16:33.689) :   Alias: Local Area Connection* 2-Native WiFi Filter Driver-0000
DBUG (17:16:33.690) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.691) : 54: Microsoft Wi-Fi Direct Virtual Adapter #2-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.691) :   Alias: Local Area Connection* 2-Npcap Packet Driver (NPCAP)-0000
DBUG (17:16:33.692) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.692) : 55: Microsoft Wi-Fi Direct Virtual Adapter #2-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.693) :   Alias: Local Area Connection* 2-VirtualBox NDIS Light-Weight Filter-0000
DBUG (17:16:33.694) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.694) : 56: Microsoft Wi-Fi Direct Virtual Adapter #2-QoS Packet Scheduler-0000
DBUG (17:16:33.695) :   Alias: Local Area Connection* 2-QoS Packet Scheduler-0000
DBUG (17:16:33.696) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.696) : 57: Microsoft Wi-Fi Direct Virtual Adapter #2-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.697) :   Alias: Local Area Connection* 2-WFP 802.3 MAC Layer LightWeight Filter-0000
DBUG (17:16:33.698) :   Type=IEEE802.11(71), Hardware=No, Filter=Yes
DBUG (17:16:33.698) : 58: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC
DBUG (17:16:33.699) :   Alias: Wi-Fi
DBUG (17:16:33.699) :   Type=IEEE802.11(71), Hardware=Yes, Filter=No
DBUG (17:16:33.700) : 59: Microsoft Wi-Fi Direct Virtual Adapter
DBUG (17:16:33.701) :   Alias: Local Area Connection* 1
DBUG (17:16:33.701) :   Type=IEEE802.11(71), Hardware=No, Filter=No
DBUG (17:16:33.702) : 60: Microsoft Wi-Fi Direct Virtual Adapter #2
DBUG (17:16:33.703) :   Alias: Local Area Connection* 2
DBUG (17:16:33.703) :   Type=IEEE802.11(71), Hardware=No, Filter=No
DBUG (17:16:33.704) : 61: Microsoft Teredo Tunneling Adapter
DBUG (17:16:33.705) :   Alias: Teredo Tunneling Pseudo-Interface
DBUG (17:16:33.705) :   Type=Tunnel(131), Hardware=No, Filter=No
DBUG (17:16:33.706) : 62: Microsoft IP-HTTPS Platform Adapter
DBUG (17:16:33.707) :   Alias: Microsoft IP-HTTPS Platform Interface
DBUG (17:16:33.707) :   Type=Tunnel(131), Hardware=No, Filter=No
DBUG (17:16:33.708) : 63: Microsoft 6to4 Adapter
DBUG (17:16:33.709) :   Alias: 6to4 Adapter
DBUG (17:16:33.710) :   Type=Tunnel(131), Hardware=No, Filter=No
DBUG (17:16:33.710) : 64: WAN Miniport (SSTP)
DBUG (17:16:33.711) :   Alias: Local Area Connection* 4
DBUG (17:16:33.712) :   Type=Tunnel(131), Hardware=No, Filter=No
DBUG (17:16:33.713) : 65: WAN Miniport (IKEv2)
DBUG (17:16:33.713) :   Alias: Local Area Connection* 5
DBUG (17:16:33.714) :   Type=Tunnel(131), Hardware=No, Filter=No
DBUG (17:16:33.715) : 66: WAN Miniport (L2TP)
DBUG (17:16:33.715) :   Alias: Local Area Connection* 6
DBUG (17:16:33.716) :   Type=Tunnel(131), Hardware=No, Filter=No
DBUG (17:16:33.716) : 67: WAN Miniport (PPTP)
DBUG (17:16:33.717) :   Alias: Local Area Connection* 7
DBUG (17:16:33.718) :   Type=Tunnel(131), Hardware=No, Filter=No
In my view, there should be correlance between the adapter description's SysInfoData and Net measures' Interface. If Rainmeter assign its own numbers to use in SysInfoData, it should keep a "list" of what those numbers translate to in Windows so that the former can be used elsewhere as well. E.g. for me:

Adapter's Name = Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC
Adapter's SysInfoData in ADAPTER_DESCRIPTION = 4
Adapter's Interface in Net measures = 58

Rainmeter could automatically translate the 4 used in a Net measure to its internally stored 58, something like an array where Interface[4]=58 and such. If possible, that is.
jsmorley wrote: August 10th, 2021, 1:28 pm Sorry, but I would just not depend on those index numbers in any way. In my view, they are transient and meaningless. Always have been. Use ipconfig or something to get the names (Description) of all your adapters, then just use those names in the net measures. For most normal NetIn/NetOut purposes, Interface=Best is your friend.
Yeah, I had things working with that approach (should have posted this for a better understanding):

Code: Select all

[Variables]
NICID=0

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

---Measures---

[measureAdapterName]
Measure=Plugin
Plugin=SysInfo
SysInfoType=ADAPTER_DESCRIPTION
SysInfoData=#NICID#
RegExpSubstitute=1
Substitute="(^$|^0$)":"Unavailable"
IfMatch=^.{2,}$
IfMatchAction=[!SetOption measureIP SysInfoData "[measureAdapterName]"]
IfNotMatchAction=[!SetOption measureIP SysInfoData 999]
IfMatchMode=1
DynamicVariables=1

[measureIP]
Measure=Plugin
Plugin=SysInfo
Group=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=
RegExpSubstitute=1
Substitute="(^$|^0$)":"Unavailable"
DynamicVariables=1

[measureNetIn]
Group=NetGroup
Measure=NetIn
Interface=[measureAdapterName]
;Interface=#NICID#
;Interface=4
DynamicVariables=1

[measureNetOut]
Group=NetGroup
Measure=NetOut
Interface=[measureAdapterName]
;Interface=#NICID#
;Interface=4
DynamicVariables=1

---Meters---

[meterNICInfo]
Meter=String
StringEffect=Shadow
FontEffectColor=0,0,0,50
SolidColor=47,47,47,255
FontColor=255,255,255,255
FontFace=Consolas
FontSize=16
AntiAlias=1
MeasureName=measureAdapterName
MeasureName2=measureIP
MeasureName3=measureNetIn
MeasureName4=measureNetOut
Text=Number : #NICID##CRLF#Adapter: %1#CRLF#IP     : %2#CRLF#NetIn  : %3 B#CRLF#NetOut : %4 B
MouseScrollUpAction=[!SetVariable NICID (Clamp(#NICID#-1,0,20))][!UpdateMeasure *][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable NICID (Clamp(#NICID#+1,0,20))][!UpdateMeasure *][!UpdateMeter *][!Redraw]
DynamicVariables=1
but I thought it would be nice if the numbers worked too. Now it's too late to change that as it would break backward compatibility for skins using the "Windows" number in the Interface options (with no connection to the "Rainmeter" SysInfoData number), so ... too bad. At least there is an alternative that works, and it's much more reliable in a way, since there are no changes in the adapter's name, unlike its index.

Also, since we're at it, why do the values temporarily "jump" to a high number when scrolling to certain adapters (or quickly scrolling through them)? I have to update measures twice to make it go away, and if I do so I end up having a 0 instead of the actual traffic for the 1st update after scrolling, so it's more or less the same thing.
Post Reply