Using Go to Monitor for Available Laundromat Machines
Programming Snapshot – Go Monitoring
© Photo by Annie Spratt on Unsplash
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.
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.
[...]
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
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.
News
-
Is Linus Torvalds Vibe Coding?
The creator of Linux has added AI into his process for Linux kernel development, and it's more than just for debugging.
-
openKylin 3.0 Released with Expanded AI Integration
The latest release features a pre-installed AI agent to help perform tasks.
-
DigitalOcean Ends Open Source Credits Program
In a change that has surprised many open source developers, DigitalOcean has decided to sunset its Open Source Credits Program.
-
Office 365 Available for Testing on Linux via Bottles
Linux users can now test the official Office 365, thanks to Mirko Brombin's work on Bottles.
-
Dutch Government Turns to Open Source for Digital Sovereignty
Following in the footsteps of other European countries, the Netherlands is looking to increase its sovereign digital infrastructure with open source software.
-
Linux May Soon Work on Snapdragon X2-Based PCs
If you're thinking about buying a Snapdragon X2-based desktop or laptop, Linux may soon be an option.
-
KDE for People Initiative Calls for AI Ban in Plasma
A new community of KDE wants the project to adopt a strict no-AI policy for KDE Plasma.
-
KDE Sets Ambitious Goals for 2026 and Beyond
KDE Connect reveals the goals for the Linux desktop darling, with one of those goals long overdue.
-
It’s Time to Test Fedora 45 Beta
Fedora 45 beta has been released with updated Gnome, KDE Plasma, and kernel.
-
Ubuntu Stonking Stingray Gets Even Rustier
Ubuntu 26.10 has completed its migration to the Rust-based coreutils.
