I’ve been using an old laptop as a home server for almost a year now, and honestly, it’s one of the best repurposing projects I have ever done. It runs Home Assistant, a dozen Docker containers, and powers a few AI models all while quietly humming away on my desk 24/7.
The catch with running a laptop this way is that it stays plugged into the wall constantly, and that’s exactly the kind of activity that’ll demolish the lithium-ion battery over time. The fix? A $10 smart plug and a few Home Assistant automations.
Sitting at 100 percent is the actual problem
300 to 500 cycles is the budget you’re burning through
Lithium-ion cells degrade faster when they sit at very high or very low states of charge, and the sweet spot for longevity is generally between 20 and 80 percent. Leaving a laptop plugged in at 100 percent all day keeps the cell voltage elevated, which accelerates electrolyte breakdown and shortens the number of usable charge cycles the battery can handle before it noticeably degrades.
Windows laptops are typically rated for somewhere between 300 and 500 cycles before dropping to 80 percent of original capacity, and constant trickle charging at full voltage is one of the fastest ways to burn through that budget. Since the battery acts as a built-in power backup, I can’t get rid of either, but there’s zero reason to keep those cells parked at 100 percent all the time.
A $10 plug does what TP-Link’s own app won’t
Real energy monitoring, not just an on/off switch
I’ve grown increasingly obsessed with smart plugs as they’re the easiest way to solve problems with appliances that aren’t Wi-Fi enabled, such as my laptop’s charger. I landed on the TP-Link P110 mainly because it’s cheap, readily available, and I’ve already tested it with a couple of air conditioners around the house. The plug also has real energy monitoring, and it plays perfectly well with Home Assistant.
The plug reports real-time power draw, tracks daily and monthly consumption, and can even estimate my electricity bill for that one device, all which turns out to be more useful than I expected. TP-Link has also started baking in a Smart Charge Guard feature into the newer P110 firmware, which automatically cuts power once a connected device is estimated to be fully charged specifically to reduce battery wear.
That’s a nice built-in option, but I wanted to be more granular than an opaque estimated full charge cutoff. Automations in Home Assistant are significantly more powerful than what TP-Link offers in its app, and I can monitor my laptop’s battery directly with Home Assistant too.
The integration works, once you flip one hidden toggle
Firmware updates can quietly break local API access
Getting the P110 into Home Assistant isn’t exactly plug-and-play. The official path is the TP-Link Smart Home integration, which supports the P110 natively and exposes both a switch entity and power sensors once it is set up. However, you also need to enable third-party compatibility inside the Tapo app first before Home Assistant can authenticate against the plug locally.
TP-Link has also shuffled the integration around a few times, so what was once a community Tapo Controller add-on is now largely folded into the official TP-Link Smart Home integration. Another thing to watch out for is that firmware updates can sometimes break local API access, and toggling third-party compatibility off and back on fixes some of these connectivity hiccups almost instantly, though a firmware update that changes the plug’s underlying encryption scheme may need a library update instead.
Oscillating between 50 and 80 does the actual work
Force-charge below 20 percent, cut power above 80
Once the entities show up in Home Assistant, the actual automation logic is quite simple. Since my instance o Home Assistant itself is virtualized, it has no direct access to the laptop’s hardware, so the battery reading actually comes from a small service like System Bridge running on the host OS, which exposes it over the network for Home Assistant to poll. A simple automation that turns the smart plug on when the battery drops below 50 percent and off when it reaches 80 percent will do the job.
This keeps the laptop oscillating well within the 20-to-80 percent buffer zone that battery chemists consider the low-stress range while also ensuring it has enough charge to provide meaningful battery backup in case the power goes out. I also added an emergency automation that force-charges the laptop regardless of other conditions if the battery ever drops below 20 percent, just so the server never gets caught off guard during a power blip.
Watching the wattage confirms the cutoff is real
Zero watts for hours means the connection dropped, not the laptop
The energy monitoring side of the P110 is more than just a gimmick. Home Assistant graphs the plug’s real-time wattage and daily energy totals, so I can literally watch the charging curve taper off as the battery approaches its cutoff, and confirm the plug is actually cutting power.
I also set up a notification that pings my phone if the plug reports zero watts for more than a few hours while the automation expects it to be charging, which usually means the integration dropped its connection rather than anything being wrong with the laptop. This doesn’t do anything meaningful per se, but it does alert me in case I need to look into the P110’s connection to Home Assistant.
A $10 fix for a problem that compounds for years
Six years old and still worth protecting
For the cost of one smart plug, I get a server that behaves less like a laptop chained to a wall outlet and more like a properly managed battery-backed appliance. I can still get the benefit of the laptop’s battery acting as a power backup while making sure it stays in the best shape it possibly can, especially considering it’s over six years old now.
You won’t be saving money by mapping your old laptop’s power draw, nor is it going to be a significant part of your electricity bill, but that number is still a useful statistic that can be used. It’s a small project, but it’s the kind of boring fix that adds years to a piece of hardware I was never planning to replace anyway.