Hacker News new | ask | show | jobs
by malfist 866 days ago
I have gigabit copper to the house, but the Ethernet cable coming into the house kept negotiating at 100mbit connection randomly. ISP just kept blaming my equipment. Especially since rebooting the router fixed it. Although unplugging and plugging in the Ethernet from the ISP is really what fixed it.

I wrote a script that ran fast.com's speed test every hour. If it detected <105mbit results it would test every 5 minutes for 30 minutes. If it didn't see >105mbits it would do two things, if it was during the day, it'd turn one of the Phillips hue lights in my office to red and turn it on if it wasn't. That let me decide if I could take the downtime during work to fix the Internet or if I'd just live with it. If my partner spotted it, he'd tell me we had a "red light special"

If it was at night, I found there was an undocumented soap protocol for my router and I could reboot it. I didn't care about downtime at night so the script would do it and not deal with the light.

The system worked wonderfully, my partner has asked me to expand the light thing to other situations in the house and other lights. He wants something hooked to his aquarium.

Eventually after about 6 months of this script we took it upon ourselves to replace the ISP Ethernet and made the script unnecessary, but it was a fascinating exercise in stringing together all kinds of random systems, would do it again in a heartbeat, though I might swap the cable first.

2 comments

Love the creativity of this, and the simplicity of just changing a light. VS a phone notification or email! I’ve got to think of ways I can apply that for myself.

> The system worked wonderfully, my partner has asked me to expand the light thing to other situations in the house and other lights. He wants something hooked to his aquarium.

Best of luck on the next project!

We had physical green and red lights controlled via USB on a build machine. So when someone checked in code to SVN, the build monkey would kick off, and if the build passed, the green light would come on. And if the build failed, the red light came on. Whilst the build was running, no lights would be on. You could glance up from your desk and see the status of what was recently checked in and it motivated people to keep the red light off. Someone then installed a USB camera that would look for the green light or the red light, and send a notification to their desktop computer so they didn't have to turn around to look at the light. And for Halloween we all wore red sweatshirts and red t-shirts to troll the guy.
That's a delightful story! Made me chuckle