Monitor your energy consumption with Go

Programming Snapshot – Go Energy Monitor

© Lead Image © Lightwise, 123RF.com

© Lead Image © Lightwise, 123RF.com

Article from Issue 301/2025
Author(s):

Before adding a new gadget to the household, Mike Schilli always monitors its power consumption with a Go program and creates intuitive graphs to decide whether it can stay.

Electricity is expensive. Where I live, in California, a kilowatt hour costs around 40 cents. If a new gadget consumes 20W in continuous operation, that adds up to 14kWh per month or almost $6. In addition, the price of electricity from my utility, Pacific Gas & Electric, is based on the time of day (Figure 1). A time-based power consumption breakdown for selected devices could offer ideas for potential savings.

Figure 1: Energy usage graph from Pacific Gas & Electric.

An energy monitor such as the TP-Link Tapo P110M (Figure 2) keeps you up to date with the amount of power you are currently using; it has an API to make the measurement results available to inquiring WiFi clients. Upon request, the small device reports the power currently being drawn in milliwatts by all consumers plugged into it. On top of that, it also features two persistent counters that measure cumulated watt hours, one for the current day and one for the month.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Perl: Google Chart Instructions

    A CPAN module passes drawing instructions in object-oriented Perl to Google Chart, which draws visually attractive diagrams.

  • Charly's Column: Smart Meter Monitoring

    If you've been forced to deliver Linux magazines to pay for your last electric bill, we’ll help you discover why, assuming you have a state-of-the-art electricity meter.

  • Saving Power

    Save power by choosing the right system and software configuration.

  • Perl: Jawbone UP Data

    The Jawbone UP electronic bracelet measures the wearer's daily activity and nocturnal sleep patterns. If you are bored by the official smartphone app, you can create your own Perl scripts and access your data via the unofficial web API.

  • Tracking Energy Usage

    Want to bring down your electric bill? Investigate your favorite household appliances with a consumption meter and a Raspberry Pi.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News