Naveen Kulandaivelu's WattWise Is a TUI Tool for Monitoring Your Power Usage — and Saving Money
Designed to track, and manage, high-end workstation power usage, WattWise works at the terminal rather than requiring a graphical app.
Engineer Naveen Kulandaivelu has released a tool designed to help you take control of your power usage, by tapping into off-the-shelf smart plugs — but running entirely in a terminal, with a neat text-based user interface (TUI): WattWise.
"I have been setting up a workstation for off-loading compute-intensive LLM [Large Language Model] workflows from my desktop," Kulandaivelu explains of the project's inspiration. Since I already use smart plugs throughout my home, I added one to monitor the workstation’s power consumption. However, checking power statistics using the [TP-Link] Kasa phone app or Home Assistant dashboard proved cumbersome, especially when I already maintain a terminal window with monitoring tools like htop, nvtop, and nload in a 2×2 grid on my secondary display."
While many smart home systems rely on mobile apps, and even open-source projects gravitate towards web interfaces, Kulandaivelu wanted something different — so built WattWise. Designed for use at the terminal, WattWise is text-based user interface that is capable of communicating with TP-Link smart plugs directly or other devices through Home Assistant and putting their information in a handy dashboard.
At the time of writing, the tool included real-time monitoring of both wattage and amperage, color coding for low, medium, and high power draws, and historical consumption charts — but passive monitoring is only part of its capabilities. WattWise, Kulandaivelu explains, is designed to integrate into the host operating system in order to deliver active energy savings: automatic throttling of CPU and GPU performance according to time-of-use electricity pricing.
"With my workstation potentially drawing up to 1400W at full load," Kulandaivelu explains, "it made sense to add automatic CPU and GPU throttling during expensive rate periods. My testing showed that reducing CPU frequency from 3700MHz to 1500MHz saved approximately 225W under load on my specific setup, though results will vary by hardware."
Kulandaivelu's full write-up is available on his website, with the project source code on GitHub under the permissive MIT license. For those looking to try WattWise out themselves, Kulandaivelu does have a few warnings — including that the active power management feature requires a Linux-based operating system, that it currently only works with TP-Link's Kasa smart plug range, and that it can only monitor one plug at a time.