Using Go to Monitor for Available Laundromat Machines

Programming Snapshot – Go Monitoring

© Photo by Annie Spratt on Unsplash

© Photo by Annie Spratt on Unsplash

Article from Issue 304/2026
Author(s):

Before doing his laundry, Mike Schilli checks the activity in the laundry room using a Go program that queries a Tapo motion detector.

Anyone who lives in an American apartment building like I do is likely to experience a thousand adventures every day. One of them takes place in the building's small laundry room, where nearly 30 occupants share two washing machines. I don't know how many times I have taken the elevator two floors down with a bulging laundry basket in tow, only to find that both machines are occupied, leading me to shout "This is a job for the German engineer in the house!" (Figure 1). In response, I built a system that now displays all the activities in the laundry room for everyone to view on the web.

Figure 1: The author in his apartment building's laundry room.

To do this, I first glued two battery-powered Tapo T100 motion detectors to the walls of the laundry room (Figure 2); these devices are triggered by passing human bodies, as their infrared radiation changes the heat background measured by a passive infrared sensor (PIR). The sensors then send a short signal to a Tapo H100 hub, whose controller stores the timestamps of the events in an SQLite database.

[...]

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

Buy this article as PDF

Download Article PDF now with Express Checkout
Price $2.95
(incl. VAT)

Buy Linux Magazine

Related content

  • Concierge's Pac-Man

    Strategically placed motion detectors send signals that Mike Schilli processes using a Pac-Man-style Go terminal app to keep up with foot traffic in his apartment building.

  • Watt Watch

    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.

  • Google Chart

    The Google Chart API lets you draw custom graphs, charts, maps, and barcodes through a simple web interface.

  • Measuring the Flow

    A Go program running on a Raspberry Pi grabs metrics from a pfSense firewall and displays them on a miniature display to help Mike Schilli keep an eye on his Internet connection's bandwidth usage.

  • Tutorial – LibreOffice Charts

    Everybody needs charts sooner or later, and LibreOffice Calc is the easiest way to create them with free and open source software.

comments powered by Disqus