Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fleaz/battery-refresh
Automatically cycle your laptop battery with a smart socket
https://github.com/fleaz/battery-refresh
Last synced: about 2 months ago
JSON representation
Automatically cycle your laptop battery with a smart socket
- Host: GitHub
- URL: https://github.com/fleaz/battery-refresh
- Owner: fleaz
- Created: 2023-08-11T16:41:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-11T17:00:54.000Z (over 1 year ago)
- Last Synced: 2023-08-11T23:46:15.082Z (over 1 year ago)
- Language: Python
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# battery-refresh
Use a smart socket to automatically refresh your laptop battery.
## Usecase
After a few years of home office, my laptop battery was pretty bad because my work laptop spend 24/7 in a docking
station. To get a bit of capacity back I thought about running a few charge/discharge cycles. This is a common feature
to refresh old batteries (mainly due to better battery circuit calibration) and can e.g. be done with the Thinkvantage
tools on Windows if you own a Thinkpad.Because I have a Dell XPS, I needed a different approach. And because I have Home Assistant, my idea was to use a smart
socket and just turn it on/off based on the current battery charge level.## Usage
Open the `main.py` and adapt the variables on top of the script to your setup. The code was created quite late in the
night, so it's not that beautiful, but it get's the job done :DAfter that, just plug the charger in the smart socket, conenct your laptop to the charger and start the script. Then let
it run as long as you like.Depending on the performance of your battery, you probably don't want to set the THRESH_LOW to low, so it won't turn off
before reaching it. Setting THRESH_HIGH to 100 is also not recommended because modern lithium batteries don't like to be
completly full or completly empty.