Giter Site home page Giter Site logo

Comments (35)

michellabbe avatar michellabbe commented on June 15, 2024 2

That worked, thanks.
I had seen this HWiNFO.txt file in UPS Meter folder.. should've looked at it.

image

Yay! :)

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024 2

As far as the green/yellow/red, that is already there, except for the flashing. There is a set of power threshhold percentages you can customize (based on the Windows battery plan). Once you get to 10% (the default value), you'll see this:

image

Once you get to 7%, you'll see this:

image

There are a couple variables you can tweak in the UPSVariables.inc file to control this. You can sync these up with the values that cause your UPS to alarm/shutdown/whatever. On my laptop, once I hit the 7% mark, I have about 15-20 seconds to plug it in before it shuts down (this is the ""critical" level in the MS power plan).

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024 1

I can look into creating a UPS gadget. It should not be too hard.

One favor to ask, tho. Your screenshot above is great, but can you let me know if there are any additional sensors not visible in the shot, and if so, can you post a complete screenshot of whatever HWiNFO is showing for a UPS? (I only have laptops, so I don't have a UPS to test with.) You might need to let the UPS charge or discharge to see additional sensors (e.g., does it show charge rate, discharge rate, etc.).

I would also like to know what you see in the HWiNFO registry keys. HWiNFO writes sensor data to \HKEY_CURRENT_USER\Software\HWiNFO64\VSB. Under this branch you'll see keys like "LabelN", "SensorN", "ValueN", and "ValueRawN" (where N is the sensor index number). Specifically, what I'd like to know is if the "ValueRaw" values for the battery sensors match the "Value" values, but just without the unit of measure... and very specifically, I'm wondering if the value shown in your screenshot of the estimated run-time ("33.1 mins") is showing as "33.1" or is it a value in seconds that is being converted. (I suspect it is the same value, no conversion). I'd also like to know if the Yes/No raw values are also the same or if it is a numeric value (if text, this is going to be a problem with various languages).

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024 1

I confirm that no additional sensor values are added during discharging/charging events.

VSB_discharging.txt / VSB_charging.txt

discharging
charging

from gadgets.

Davoleo avatar Davoleo commented on June 15, 2024 1

Don't worry, happens to everyone, I can relate :P
all good on my PC now btw!
image

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024 1

I kinda like to see the "Fully charged" mention too. It's clear.

My personal preference would be to add the Estimated Runtime value below Max Load when charging or Fully charged (mask it when discharging or value = "N/A" when missing so the remaining time isn't shown twice) and leave the rest as-is.

But you're the skin master so you definitely have the final word.

Awesome job on all the dynamic stuff btw :)

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

Hello! The Battery Meter is meant for use with laptops; it is not intended for use with UPSs and does not use HWiNFO. That is why nothing is referenced in HWiNFO.inc, and the instructions don't refer to batteries.

It would be pretty easy to modify the skin to work with HWiNFO and your UPS. An older version of the Gadgets had an HWiNFO-based Battery Meter variant, but I dropped it as it didn't have any advantage over the regular one and was much harder to configure.

You have a couple of options. The GPU Meter can display 6 optional sensors, so you could show the UPS sensors there (although it is a bit odd to do this, I admit). Another option is to check out the Gadgets Additions suite; there is an HWiNFO skin that displays anything you want and has a similar appearance. Lastly you can tweak the Battery Meter to make it work with UPSs.

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

Thanks for your reply.

It would be pretty easy to modify the skin to work with HWiNFO and your UPS. An older version of the Gadgets had an HWiNFO-based Battery Meter variant, but I dropped it as it didn't have any advantage over the regular one and was much harder to configure.

Is it worth adding a UPS gadget as a feature request then?

Adding some values like UPS load %, Estimated Runtime and Input Voltage would certainly be an advantage over the regular Battery gadget. As for gadget configuration with HWiNFO, yes it's scary at first, but once you've gone through the config process for GPU and other MB sensors, it's nothing to add a couple more values for other devices.

I've tried Gadgets Additions (thanks for the tip). It does work to show values from HWiNFO but your Battery gadget is so much nicer with the dynamic battery icon and charging status.

I've looked a bit at tweaking it myself (more than once to be honest: that has been on my "Things to do before I die" checklist since Win7/Vista gadgets died and I turned to Rainmeter). As an IT I'm used to tweaking or building scripts in different languages, but Rainmeter skins is still completely beyond my mortal knowledge.

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

Awesome!

I had taken care of showing all values on my previous screenshots, although admitedly I didn't check sensors changes when discharging/recharging. I will do the test tomorrow. Everyone's asleep right now and the loud UPS beeps would most likely wake kids up in panic.

I'm including exports of the VSB reg keys on two different pc (both using APC UPS but different models) and also with french equivalent, but they are all basically the same:
VSB1.txt / VSB1fr.txt
VSB2.txt / VSB2fr.txt

"ValueRaw" does match "Value" without the unit of measure and without needing conversion.

The Yes/No values are text, and match HWiNFO language. You probably should support english only anyway. I'm running canadian french OS myself, but I leave tools like this in english for convenience. I hate when some translation don't make sense (often translated out of context) and/or are way too long and exceed reserved space. "AC Power" translation on screenshots below is a great example of both ;-).

I also confirm Gadgets Addition doesn't show these Yes/No values properly either if HWiNFO is non-english:
image image

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

Great! Thank you very much!

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

Hello @michellabbe!
Are you still interested in a UPS Meter gadget? If so, let me know!

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

Hello @michellabbe! Are you still interested in a UPS Meter gadget? If so, let me know!

Sure :)

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

OK cool!

I've attached a zip file containing an .rmskin file. It's a patch, so it will merge itself into your existing Gadgets installation. Install the patch, but before it will run successfully you will need to manually fix your HWiNFO.inc file. In the UPS Meter folder, you will find a HWiNFO.txt file. Paste the contents of this file to the bottom of your HWiNFO.inc file. This will add in all the sensor index variables you need for the gadget to work (I assumed you'd use the values in the "UPS" sensor section). Add in your sensor indices and refresh the skin and you should be good to go.

Let me know if this works for you. Just FYI, the "Max Load" value shown in the skin is a calculation based on the current load / percent load. It may or may not equal the value that the vendor claims... 😉

As we discussed earlier, the skin expects English "Yes/No" values for some sensors. I'll need to add some translations into the final release, or figure out another way to get this info.

UPS Meter - Gadgets Patch_7.5.1.zip
Edit: updated patch installer (see below)

from gadgets.

Davoleo avatar Davoleo commented on June 15, 2024

seems like the patch is missing the @Resources folder causing it to throw these errors on my computer:
image

Am I forgetting something when installing the patch?

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

@Davoleo, oops. My bad, I built the patch installer incorrectly. (You do need to have the Gadgets installed first, if you haven't done that already.) Please manually delete the old skin and use this one. It's got a few extra fixes.

UPS Meter - Gadgets Patch_7.5.1.zip

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

Just tried the new build from an hour ago (didn't have time to try yesterday's one).

UPS Meter installs without issue, but it doesn't show up when loading it (Rainmeter -> Skins -> Gadgets -> UPS Meter -> check "UPS Meter.ini").

Position = switched from "Desktop" to "Normal" and disabled "From right" (to match other skins) on "Default primary monitor". Didn't change anything.

When selecting Settings.ini, it shows white outlines of transparent windows (no text or anything), on top left of my primary monitor.

Checked the "background and positioning" section of the .ini file in case it would happen to show coordinates outside visible windows, but it seems ok (comparing with CPU Meter).

Any ideas?

from gadgets.

Davoleo avatar Davoleo commented on June 15, 2024

mmh, this time it got installed as a subdirectory of the Gadgets dir which is good,
image

although it still gives me these errors:
image

My other gadgets are on version 7.5.0 so that shouldn't be the issue, as for how I uninstalled the old patch I just closed Rainmeter and removed the UPS Meter old folder, have I missed a step perhaps?

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

Same errors here in the Log. That probably explains why it doesn't display properly.

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

OMG, I am such a doofus. My apologies! 😳 I AGAIN screwed up the patch installer. (To be fair, patch installs are different than normal ones and I obviously have forgotten how to do it right.) I forgot to include the variables file.

Maybe the third time is the charm?

UPS Meter - Gadgets Patch_7.5.1.zip

P.S.: Thanks for your persistence!

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

"233.1 V"... Wow, that's kind of a lot. You running a backup for an entire server rack? 😉 Or maybe something is off someplace?

from gadgets.

Davoleo avatar Davoleo commented on June 15, 2024

uhhh, yeah I probably misstyped some of the sensor indices >>

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

Still got the same err.. just kidding :)

The UPS skin appears now, but it shows as "Not configured!".

I see UPS infos in HWiNFOIndexList.txt, but no "UPS" or "Battery" variables to adjust in HWiNFO.inc.

HWiNFO Sensor Entry Index List

Index Sensor                                   Label                          Value
----- ---------------------------------------- ------------------------------ ---------------
[...]
25    Battery: American Power Conversion Ba... Battery Voltage                27.160 V
26    Battery: American Power Conversion Ba... Estimated Remaining Time       16.6 mins
27    UPS                                      Battery Voltage                27.160 V
28    UPS                                      Input Voltage                  122.0 V
29    UPS                                      UPS Load                       226.200 W
30    UPS                                      UPS Load                       29.0 %
31    UPS                                      Charge Level                   100.0 %
32    UPS                                      Estimated Runtime              16.6 min
33    UPS                                      AC Power                       Yes
34    UPS                                      Charging                       No
35    UPS                                      Discharging                    No

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

@michellabbe, Make sure you copy the contents of the HWiNFO.txt file in the UPS Meter folder and paste it at the end of the HWiNFO.inc file. The sensor indexes can then be configured there.

from gadgets.

Davoleo avatar Davoleo commented on June 15, 2024

"233.1 V"... Wow, that's kind of a lot. You running a backup for an entire server rack? 😉 Or maybe something is off someplace?

ah right, I hooked that up with the input voltage, so it makes sense, for some reason HWiNFO also shows that high number for output voltage as well, I assume the sensor on the UPS for that specific one is borked, but the input one is ok

Actually it makes sense since my UPS does not already convert to DC, it's external

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

OK, cool (and thanks for the screenshot!!)... Let me know if you can think of any enhancements. Otherwise, I'll include this in the next release of the Gadgets.

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

The Estimated Runtime value is missing on the skin (HWiNFO_UPS_Lifetime variable in HWiNFO.txt).
I tried both indexes 26 and 32 from my example.

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

The Estimated Runtime value is missing on the skin (HWiNFO_UPS_Lifetime variable in HWiNFO.txt). I tried both indexes 26 and 32 from my example.

OK, that is by design. What is happening is that your UPS is at 100% charge and on AC Power, so it just says "Fully charged" like a laptop battery does. If you are <100% and not on AC Power, then it will say the estimated runtime. If you are <100% and on AC Power, then it will say "Plugged in, charging".

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

Would you rather it say the estimated runtime always? I could probably squeeze in something like "Est runtime: XX,X mins", or just leave it as "XX.X min remaining".

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

I think I would replace the dynamic text with "Discharging", and always show the Estimated Runtime.
It's probably the most important value I would like to keep an eye on (same for laptops).

"Est runtime" or "Remaining time" would keep the value on right like others.

If you want to do it fancy you could set it green/yellow/red/flashing based on remaining time value (not sure what is doable or not with these skins).

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

OK! Things are a bit cramped for space, but what about this:

  • At 100% and on AC, it will say "Est runtime: XX.X min" (i.e., instead of "Fully charged")
  • At <100% and on AC power, it will say "Plugged in, charging" (i.e., no change)
  • At <100% and no AC, it will say "XX.X min remaining" (i.e., no change)
  • At no battery found, it will say "No battery" (i.e., no change)

For example:
image

(This logic is borrowed from the Battery Meter skin.)

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

OK, sounds unanimous! 😄 So, something like:

image

image

image

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

Looks great! :)

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

OK, cool... Overwrite the two existing skins with the ones in this zip, and you should be good to go until the formal release. (Whenever that is.)

UPS Meter.zip

from gadgets.

michellabbe avatar michellabbe commented on June 15, 2024

Seems to work great, thanks!

from gadgets.

SilverAzide avatar SilverAzide commented on June 15, 2024

UPS Meter will be added to the next release.

from gadgets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.