SilverAzide / Gadgets

Gadgets for Rainmeter
Other
350 stars 12 forks source link

Network Meter: See all stats from multiple connections #103

Closed DragynsLair closed 3 months ago

DragynsLair commented 3 months ago

I can't seem to find a way to make the statistics from my second NIC show in the Network Meter. I can get it to swap if I disable the one it's currently displaying, but I would like to see both at the same time as they're used for different things.

I'm looking to see the Internal and External IPs, Ping, Traffic, Graph, etc...

Is this something that can be done in the current version? or is this more along the lines of a feature request.

Thanks!

SilverAzide commented 3 months ago

Hello! Glad you are finding the Network Meter useful!

There are a few things to note before we get too deep. For the level of precision you want, I'd strongly suggest using the "Pro" variant skins, as they will not get confused when network adapters change their indexes. This is your call, however, the instructions below will work either way. Secondly, the graphs in the Network Meters are showing you all the activity of the all the adapters you have selected (summed). And finally, internal IP value and the orange text (adapter name and description) is the adapter that Rainmeter thinks is the currently active one, emphasis on one. If you have two that are active, then Rainmeter picks one.

So, to do what you want, you will need to alter the skin(s). This isn't something that can be an option; not without a ton of rework on my part anyway. Instead of showing multiple adapters, or letting Rainmeter pick, you'll need to create skins that are focused on a single adapter each. This is exactly how the Wireless Meter works. The instructions below will create two "Wired Meter" skins to show 2 ethernet adapters.

The easiest way to do this is to perform the following steps.

  1. In the Rainmeter\Skins folder, create two new folders (one for each adapter you want to monitor). For the sake of these instructions, let's just call them Gadgets 1 and Gadgets 2.
  2. Copy the entire contents of the Gadgets folder into Gadgets 1 (don't do anything with Gadgets 2 yet).
  3. Open the Network Meter Pro.ini file (or whichever one you plan on using) with Notepad++ or whatever editor your prefer.
  4. Do a global replace and change all instances of SysInfoData=Best to SysInfoData=#InterfaceEthernet#.
  5. Save the changes.
  6. Open the variables file NetworkVariables.inc in the Gadgets 1\@Resources folder. Set the name of the InterfaceEthernet variable to the first ethernet adapter you want to monitor. Set the other adapter variables to an empty string (""). Make sure InterfaceAutoConfig is set to 0.
  7. Save your changes.
  8. Copy the entire contents of the Gadgets 1 folder into Gadgets 2.
  9. Open the variables file NetworkVariables.inc in the Gadgets 2\@Resources folder. Set the name of the InterfaceEthernet variable to the second ethernet adapter you want to monitor.
  10. Save your changes and restart Rainmeter.
  11. Open the two new NetworkMeter Pro skins. Each skin should now focus only on your specified ethernet adapter, including graphs, internal IP, etc., and will never switch to whatever Rainmeter thinks is the "right" one.

Let me know if this works for you.

DragynsLair commented 3 months ago

I'm using a lot of the widgets in the Gadgets toolkit. I find them very useful. Thank you for them!

The process you outlined worked great!

Thank you for the quick reply!

SilverAzide commented 3 months ago

@DragynsLair, glad you got it working! In the next release of the Gadgets, the Network Meters will be able to support up to three ethernet adapters. The instructions above will still work (you'll have to keep doing this since these skins monitor all adapters at once by design).