{"id":1023,"slug":"hometron","title":"Hometron","excerpt":"Off for fall break, so I shackled the thermostat, cameras, garage, laundry, fridge, network, and my cloud bills together into one page. Home Assistant and a Raspberry Pi lost to a Go binary on an old MacBook.","content":"\u003cp\u003eWe\u0026rsquo;re off this week for fall break. No school, no work, a fridge full of Thanksgiving stuff. A good week to finally shackle all the house automation junk together into something cohesive.\u003c/p\u003e\n\u003cp\u003eCount the apps it takes to run this house. Google Home for the thermostat and cameras. LG ThinQ for the washer and dryer.. which live on Katie\u0026rsquo;s account, so that\u0026rsquo;s a share request. SmartThings for the fridge. Tailwind for the garage. A printer that\u0026rsquo;s somehow always low on magenta.\u003c/p\u003e\n\u003cp\u003eI wanted one page. Open it, see the house, close it.\u003c/p\u003e\n\u003cp\u003e\u003cimg src=\"/uploads/2026/11/hometron-home.png\" alt=\"hometron on a laptop\"\n  loading=\"lazy\"\n  decoding=\"async\"\n/\u003e\n\u003c/p\u003e\n\u003cp\u003eThe camera shots are blurred on purpose. You don\u0026rsquo;t need a tour of my yard.\u003c/p\u003e\n\u003ch2 id=\"where-to-run-it\"\u003eWhere to Run It\u003c/h2\u003e\n\u003cp\u003eThe obvious answer is \u003ca href=\"https://www.home-assistant.io\"\u003eHome Assistant\u003c/a\u003e. The obvious place to run it is a Raspberry Pi.\u003c/p\u003e\n\u003cp\u003eI didn\u0026rsquo;t want to buy and babysit a Pi. And I already had a box: an old M2 MacBook Air, lid shut in a closet, already on \u003ca href=\"https://tailscale.com\"\u003eTailscale\u003c/a\u003e as a little always-connected server. 8 GB of RAM, sleep turned off, logs itself in after a power blip. It was sitting there doing nothing.\u003c/p\u003e\n\u003cp\u003eSo I tried Home Assistant OS in a VM on the M2. Then I was clicking through VM setup dialogs over Screen Sharing on a Sunday afternoon, and I quit. I don\u0026rsquo;t need ten thousand integrations. I need about six.\u003c/p\u003e\n\u003cp\u003eSo I wrote one: \u003cstrong\u003e\u003ca href=\"https://github.com/swantron/hometron\"\u003ehometron\u003c/a\u003e\u003c/strong\u003e. One Go binary on the M2, only reachable over Tailscale. It never touches the public internet.\u003c/p\u003e\n\u003ch2 id=\"the-garage-door\"\u003eThe Garage Door\u003c/h2\u003e\n\u003cp\u003eThe garage was the thing I actually wanted most, and it fought the hardest.\u003c/p\u003e\n\u003cp\u003eThe opener is a Chamberlain, and Chamberlain\u0026rsquo;s MyQ API is closed to third parties. So there\u0026rsquo;s a \u003ca href=\"https://gotailwind.com\"\u003eTailwind\u003c/a\u003e controller on it, which has a local API.. no cloud needed. Great.\u003c/p\u003e\n\u003cp\u003eExcept it always said the door was open. Every time, with the door closed. It wouldn\u0026rsquo;t close it from its own app either. Wiring checked out, the opener and remotes were fine. Off to Tailwind support.\u003c/p\u003e\n\u003cp\u003eThe postmortem: their firmware was reading the opener\u0026rsquo;s \u003cem\u003edigital\u003c/em\u003e output as \u003cem\u003eanalog\u003c/em\u003e. Support pushed a fix to the controller remotely, and it started behaving. Not something I was going to find on my end.\u003c/p\u003e\n\u003cp\u003eMyQ has a door sensor and knows whether the door is up or down.. but that lives behind the same closed API, and the Tailwind doesn\u0026rsquo;t have a sensor of its own on this door. So the card doesn\u0026rsquo;t pretend to know. It shows a still from the garage camera next to a button that works like the wall button. Look, then press.\u003c/p\u003e\n\u003ch2 id=\"building-it-out\"\u003eBuilding It Out\u003c/h2\u003e\n\u003cp\u003eOnce the garage worked, the rest snowballed.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eThermostat.\u003c/strong\u003e Set it, flip modes, and a 24-hour chart of inside temp vs. setpoint vs. outside. \u0026ldquo;Heat ran 5h 45m today\u0026rdquo; settles more arguments than you\u0026rsquo;d think.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eCameras and the doorbell.\u003c/strong\u003e Live view, plus a feed of who showed up, when, with a picture. The doorbell rings the kitchen speaker too.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eWasher and dryer.\u003c/strong\u003e What\u0026rsquo;s running and how long it has left. Leave a load in the washer for an hour and the kitchen speaker says so. Not after 9 pm, though. Nobody needs to be scolded about laundry at 10:30.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eFridge.\u003c/strong\u003e Temps, door alerts, water filter life, how many kWh it burned this month.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eThe rest.\u003c/strong\u003e Weather, tomorrow\u0026rsquo;s calendar, trash night, printer ink, and whether the internet is actually down or it\u0026rsquo;s just the Wi-Fi.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cimg src=\"/uploads/2026/11/hometron-cards.png\" alt=\"Garage, fridge, washer, dryer\"\n  loading=\"lazy\"\n  decoding=\"async\"\n/\u003e\n\u003c/p\u003e\n\u003cp\u003e\u003cimg src=\"/uploads/2026/11/hometron-thermostat.png\" alt=\"Thermostat with 24 hours of history\"\n  loading=\"lazy\"\n  decoding=\"async\"\n/\u003e\n\u003c/p\u003e\n\u003cp\u003e\u003cimg src=\"/uploads/2026/11/hometron-rest.png\" alt=\"Weather, calendar, network, printer\"\n  loading=\"lazy\"\n  decoding=\"async\"\n/\u003e\n\u003c/p\u003e\n\u003cp\u003eMost of the build was arguing with vendors, not writing the page.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003ePictures.\u003c/strong\u003e Google\u0026rsquo;s Device Access API sends a \u0026ldquo;person\u0026rdquo; event for most of my cameras with no picture attached. Those cameras do live video over WebRTC and that\u0026rsquo;s it. A \u0026ldquo;person\u0026rdquo; event with no person in it is pretty useless. So the server keeps a headless Chrome open on its \u003cem\u003eown\u003c/em\u003e dashboard. When a person event comes in, that hidden copy opens the live stream, grabs a frame, and hangs it on the event. Weird, but it works. (Until Chrome decided a page nobody can see doesn\u0026rsquo;t need to do anything, and quietly skipped every person for a couple hours. Fixed.)\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eThe fridge.\u003c/strong\u003e Samsung started charging for SmartThings API apps this month. The free path is a personal token that expires every 24 hours. So hometron keeps a browser on the server signed in to SmartThings and mints itself a fresh token every day. Samsung logs that browser out anyway, so someone signs in about once a day. The fridge card warns you a day ahead. I\u0026rsquo;m not paying $5 a month to watch my fridge.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eThe Wi-Fi.\u003c/strong\u003e Turns out the Google Wifi was quietly NAT\u0026rsquo;ing every Nest device onto its own network, so the server couldn\u0026rsquo;t see half the house. Moved the M2 over. Now it pings every hop out to the internet once a minute, and outages show up on a strip instead of as \u0026ldquo;is it just me?\u0026rdquo;\u003c/p\u003e\n\u003cp\u003e\u003cimg src=\"/uploads/2026/11/hometron-network.png\" alt=\"Network health: every hop, every minute\"\n  loading=\"lazy\"\n  decoding=\"async\"\n/\u003e\n\u003c/p\u003e\n\u003ch2 id=\"then-the-cloud-bills\"\u003eThen the Cloud Bills\u003c/h2\u003e\n\u003cp\u003eWith a dashboard already up, I bolted on the other thing I never look at: what I\u0026rsquo;ve got running in the cloud and what it costs me.\u003c/p\u003e\n\u003cp\u003eI sort of wound up with a fleet. A bunch of stuff on DigitalOcean, a bunch on Google Cloud, eleven domains at Squarespace, Google Workspace for the family. Claude and Cursor are flat $20 a month each, so those are just typed in. The rest gets looked up:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003eDigitalOcean\u003c/strong\u003e gives up everything with a read-only token.. apps, droplets, volumes, the month-to-date bill.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eGoogle Cloud\u003c/strong\u003e gets walked project by project: Cloud Run, VMs, buckets, image repos, Firebase Hosting, and which APIs are switched on.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eDomains\u003c/strong\u003e get their renewal dates from RDAP, and the DNS gets matched up to whatever is actually hosting each one.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eWorkspace\u003c/strong\u003e shows who has a seat, when they last signed in, and who doesn\u0026rsquo;t have 2-step on.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eEvery site\u003c/strong\u003e gets hit once a minute, with an alert if a cert or a domain is about to lapse. The same idea as \u003ca href=\"/2026/06/15/watchtron/\"\u003ewatchtron\u003c/a\u003e, just from my closet.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eI\u0026rsquo;m less worried about the spend than about the inventory. So the useful part is a short list at the top: \u003cstrong\u003ekill\u003c/strong\u003e, \u003cstrong\u003etrim\u003c/strong\u003e, \u003cstrong\u003echeck\u003c/strong\u003e. First pass found two Google Cloud projects with nothing in them, an image repo sitting on 2.3 GB of old builds, and an app on DigitalOcean running two \u0026ldquo;professional\u0026rdquo; instances for a personal site. Time to go delete some stuff.\u003c/p\u003e\n\u003ch2 id=\"the-stack\"\u003eThe Stack\u003c/h2\u003e\n\u003cp\u003eGo, standard library only. One binary, no frameworks, no npm. It cross-compiles on my laptop and \u003ccode\u003emake deploy\u003c/code\u003e drops it on the M2 as a launchd service. The web side is one HTML file. Push notifications, the Chromecast protocol, the DevTools client that drives Chrome.. all hand-rolled. That\u0026rsquo;s part of why it\u0026rsquo;s ~13k lines, but there\u0026rsquo;s nothing to \u003ccode\u003enpm audit\u003c/code\u003e at 2 am.\u003c/p\u003e\n\u003cp\u003ePhones can pin it to the home screen.\u003c/p\u003e\n\u003cp\u003e\u003cimg src=\"/uploads/2026/11/hometron-phone.png\" alt=\"hometron on a phone\"\n  loading=\"lazy\"\n  decoding=\"async\"\n/\u003e\n\u003c/p\u003e\n\u003ch2 id=\"worth-it\"\u003eWorth It?\u003c/h2\u003e\n\u003cp\u003eYeah. It\u0026rsquo;s the tab I leave open. The dryer says 12 minutes left, the doorbell shows who it was, the fridge is 37°, and nothing in the cloud is quietly billing me.\u003c/p\u003e\n\u003cp\u003eNot bad for fall break.\u003c/p\u003e\n\u003cp\u003eSource: \u003ca href=\"https://github.com/swantron/hometron\"\u003egithub.com/swantron/hometron\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eIt isn\u0026rsquo;t a product. It\u0026rsquo;s wired to my house. But if you\u0026rsquo;ve got a Nest thermostat and a closet with an old laptop in it, steal whatever\u0026rsquo;s useful.\u003c/p\u003e\n","date":"2026-11-25T00:00:00Z","permalink":"https://swantron.com/2026/11/25/hometron/","link":"https://swantron.com/2026/11/25/hometron/","path":"/2026/11/25/hometron/","featuredImage":"/uploads/2026/11/hometron-home.png","categories":[],"tags":[]}