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
Digital Autonomy
• How the Fediverse Found Parts for Its Platforms
• The Answer Was Already on the Shelf
• Changing the Chip Industry: How Public Investment Has Grown Open Silicon
• United Nations Open Source Portal Goes Live
• EU Open Source Strategy Plays Key Role in Tech Sovereignty Package
• France Says “Au Revoir” to Microsoft
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
-
Bottlenecks Discovered by Meta Engineers Lead to Scalability Improvements
Thanks to a small group of engineers at Meta, the Linux kernel module kernfs has been improved, which has led to some serious gains.
-
PwnEscape Poses VM Vulnerability
A guest-to-host escape flaw in Linux KVM, named PwnEscape, might be yet another means of attacking Linux.
-
Linux Mint 27 Set for a Christmas Release
The developers behind Linux Mint have announced a Christmas release, and it looks like Santa's sack will be brimming with features.
-
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.
