WattWise – A command line tool for smart power plugs with energy monitoring

Smart Power plugs help users monitor their appliances’ power consumption, and they’d usually check measurements in a mobile app or a web dashboard. Naveen was not satisfied with this workflow while using a TP-link Kasa EP25 Smart Plug to monitor his LLM workstation’s power consumption.

So he wrote the WattWise command-line interface (CLI) for power monitoring smart plugs to allow him to throttle his power-hungry, dual AMD Ryzen EPYC 7C13 workstation following his utility’s Time of Use (ToU) pricing in order to lower his electric bill.

WattWise - Command line utility for Smart Power plugs

The Python tool pulls power usage data from smart plugs directly or through Home Assistant and presents it in a neat terminal-based UI.

Key features:

  • Real-time power monitoring with wattage and current display
  • Color-coded power values (green < 300W, yellow 300-1200W, red > 1200W)
  • Historical consumption charts directly in the terminal
  • Automatic CPU/GPU throttling based on time-of-use electricity pricing
  • Configurable power thresholds and performance profiles
  • Simple configuration through an interactive setup process

WattWise can be installed directly from source code or through a Docker container, and offers Kasa smart plug access and Home Assistant integration.

I could go through the direct installation as follows since Ubuntu 24.04 won’t let me install a Python package outside of a virtual environment:


After you’d need to configure the utility for Kasa or Home Assistant integration:


After configuration is done, you can run one of three commands:


I could not try it myself, but Naveen provided a short demo.

WattWise demo

You’ll find the source code and instructions on GitHub, and a blog post provides more details about computer throttling based on the time of the day. I understand it currently only works with Kasa smart power plugs, but since the command line utility supports Home Assistant integration, adding other smart power plugs/meters might not be too complicated.

Via Hackaday

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications
Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications