Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please expose remote UPS data through a win32_battery WMI driver. #326

Open
mrudat opened this issue Sep 25, 2016 · 6 comments
Open

Please expose remote UPS data through a win32_battery WMI driver. #326

mrudat opened this issue Sep 25, 2016 · 6 comments
Labels

Comments

@mrudat
Copy link

mrudat commented Sep 25, 2016

It would be awesome if a WMI driver could be implemented that would present remote UPS information to windows using the win32_battery class (the way a directly attached UPS is exposed to native windows applications).

This would allow using the native power configuration control panel to configure behaviour when on battery, rather than having to have the monitor daemon configured to run the appropriate programs to achieve the same effect (where this is actually possible).

This would make it easier/possible to:

  • reduce maximum clock speed to save power
  • reduce sleep time for pc/monitor
  • shut down applications (eg. Boinc) that can be configured to not run on battery
@clepple clepple added the Windows label Oct 8, 2016
@fragtion
Copy link

Agree this is needed. It would either need to be implemented as part of upsmon.conf, or as a separate module

@jimklimov
Copy link
Member

jimklimov commented Feb 1, 2017 via email

@clepple
Copy link
Member

clepple commented Feb 6, 2017

@jimklimov I don't think we have an issue open for this, but UPower is a successor to HAL, and is a possibility for exposing NUT data to the *nix GUI. In the other direction, we have #319.

@mrudat and @fragtion : it's good to know that there is interest in more advanced features, but what we really need is help re-implementing basic Windows support on something more recent than the 2.6.x branch of NUT. If you know anyone with experience in developing open-source software on Windows, issue #5 is our starting point.

@6XGate
Copy link

6XGate commented Mar 3, 2017

I don't know about the licensing (I think I used MIT), but I've got a NT service/daemon (still rough) that does expose Win32_Battery to NUT clients. Ya'll can borrow any code from it.

@RoganDawes
Copy link

I'd support the use of a Win32_Battery driver. In the simplest case, everything should just work with it running as a netclient, with a 1-line MONITOR entry a la upsmon. That could be stored in the Windows Registry. If needed, POLLFREQ and similar variables can also be set in the same location. Actions such as shutting down and hibernation, etc become the responsibility of the OS.
To me this seems like the absolute minimum effort required to get a working Windows-based NUT client. And potentially, it could be added to the Windows core, much as APC did with their built-in Windows UPS driver.

@RoganDawes
Copy link

RoganDawes commented Sep 16, 2020

This page seems to be a good starting point for learning how to write a WMI provider: https://docs.microsoft.com/en-us/windows/win32/wmisdk/creating-wmi-providers

And https://docs.microsoft.com/en-us/windows/win32/wmisdk/developing-a-wmi-provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants