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

Implement psutil.sensors_battery() #955

Closed
giampaolo opened this issue Jan 24, 2017 · 2 comments
Closed

Implement psutil.sensors_battery() #955

giampaolo opened this issue Jan 24, 2017 · 2 comments

Comments

@giampaolo
Copy link
Owner

giampaolo commented Jan 24, 2017

On Linux this is exposed under /sys/class/power_supply/BAT0/ and from there we can retrieve battery:

  • usage (percent)
  • energy_now
  • energy_full
  • name
  • manufacturer
  • voltage_now
  • voltage_min

Python module: https://github.com/Kentzo/Power

For Windows:

It MAY be good to also add an estimate of the remaining time.

As for OSX and BSD I haven't looked into it but I'm OK also by supporting only Linux and Windows.

Progress

branch: https://github.com/giampaolo/psutil/compare/955-battery-sensors

  • Linux
  • Windows
  • FreeBSD
@giampaolo
Copy link
Owner Author

Merged as #963

@Sygyzmundovych
Copy link

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

No branches or pull requests

2 participants