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

Support UPSs handled by APC #24

Open
boomshroom opened this issue Mar 16, 2019 · 3 comments
Open

Support UPSs handled by APC #24

boomshroom opened this issue Mar 16, 2019 · 3 comments
Labels
A-battery Area: battery crate C-enhancement New feature or request O-linux Operating system: Linux P-low Low priority

Comments

@boomshroom
Copy link

As someone whose computer is connected via USB to an external power supply, I would love to be able to monitor its status from within battop. However it doesn't appear in the sysfs and as such is invisible to this library. Being able to support more types of batteries and power supplies should be a worthy goal for this type of library, but I don't know how much effort it would take to implement.

@svartalf
Copy link
Owner

Hey, @boomshroom!

I seriously doubt that this is the good idea, sorry. battery is nothing more than an abstraction over OS interfaces, and if target platform does not have the driver for your power supply, this crate is useless in that case.

Also, I do not want to commit myself to support all these various and rare devices for all supported platforms; that would be a hell of a burden.

@boomshroom
Copy link
Author

I do have a driver in the form of apcupsd. I can access the statistics through apcaccess status. Unfortunately it doesn't seem to come with a library that can be linked to and needs the output to be parsed in order to be used, nor does it populate /sys/class/power_supply.

@svartalf
Copy link
Owner

Oh, okay, I've probably misunderstood you.

As far as I see from manual, the only options to get data from the apcupsd without re-implementing it fully, is to run shell command apcaccess status or try to make the HTTP request to a daemon CGI interface (if it is even enabled).

I'm going to re-open that issue, but with a low priority, because ADP information is not supported at all right now and it should be done first.

@svartalf svartalf reopened this Mar 31, 2019
@svartalf svartalf added C-enhancement New feature or request O-linux Operating system: Linux A-battery Area: battery crate P-low Low priority labels Mar 31, 2019
davidkna pushed a commit to davidkna/rust-battery that referenced this issue Jul 31, 2023
Updates the requirements on [uom](https://github.com/iliekturtles/uom) to permit the latest version.
- [Release notes](https://github.com/iliekturtles/uom/releases)
- [Changelog](https://github.com/iliekturtles/uom/blob/master/CHANGELOG.md)
- [Commits](iliekturtles/uom@v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: uom
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-battery Area: battery crate C-enhancement New feature or request O-linux Operating system: Linux P-low Low priority
Projects
None yet
Development

No branches or pull requests

2 participants