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.