October 19, 2015

The Internet I Wish We Had: Making Toast

"Why is the light in the refrigerator purple? It looks like I'm making a breakfast for zombies!"

I grab the makings for a mushroom cheddar omelet. We're running low on butter.  I say "Ok refrigerator" and then wait.. its display shows it's thinking about what I said and then beeps an error tone at me. It writes out "unrecognized command". This time I hit the listen button and say, "We're running low on butter." It shoots back, "Salted or unsalted?", "Salted" I say. It beeps happily having understood that I want butter added to my shopping todo list. I hit the settings button, and follow the menus to "light", "color" and set it back to "natural full spectrum". The food glows a healthily once again.

I start cooking while my family runs around getting ready for work and school. I put the kettle on the stove for tea, I leave the frying pan heating up, put the toast in the toaster. A usual weekday morning. As the eggs are starting to firm, up the toaster in a loud shrill voice beeps three times that it's done. It waits a few moments and beeps again, three times. I'm still working the eggs but the toaster doesn't care. It wants me to walk over to it and hit "cancel" even though it's done and there's nothing to cancel. I glance in its direction and it flashes its LED display back at me in annoyance. "DONE" it reads and then beeps three times again. Something needs to be done about that toaster.

I go to put the eggs back into the fridge and the lights are purple again. What the hell? Must be one of the kids' idea of a joke. "Hey Sara, can you grab me my debugging cable when you have a chance?" I serve breakfast and it's devoured before I even get a chance to sit down. Everyone starts to head out, leaving me with hugs and kisses and dirty dishes. Sara hands me my debugging cable with her goodbye kiss and runs off to catch the bus. I clean up from breakfast and then get to work. That toaster has it coming.

A debugging cable isn't much more than a USB host cable. One end plugs into my cell phone and the other is an octopus of different usb ports, mini, micro, A and B. The toaster is a little older too, so it has a micro usb port. Newer ones would just have the USB C ports with the nifty cables that you can plug in to either end and upside down. Remember when no matter which way you plugged in your cable it was wrong? Those days are almost long gone. I pull up the CodeCat app on my phone. I'm sure the toaster has an official app but the community keeps better track of these things. The app detects it's plugged into a "SmartTek Heatmaster 1520" with stock firmware. It downloads the code from the toaster and opens it up. Boy this thing is a mess. I find where it keeps beeping but I can't figure out why it keeps beeping, something must be calling the beep function over and over.  I hit the "community firmware" tab on CodeCat I bet someone has already solved this. It's not a popular toaster oven but there are at least 3 firmwares with "STOP THE BEEPING" in their names so I hit the most popular one and view a diff.

It shows me where the firmware was changed to stop the beeping, and it also looks like they turned the toasting levels down a bit. That's great! It used to be "kinda toasty", "burnt", "burnt to a crisp", "fire hazard",  and two more levels I've never dared to toast with. I wish they had said they fixed that in the docs but this is wonderful news. I hit install and it downloads into the toaster. I then test it with a nice piece of fresh sourdough. The bread turns golden brown and then a nice low "beep" happens once. The display reads "Thank You".

Now for the fridge! Something keeps changing the settings, and I bet it's a script written by someone who wants to paint their room black and purple. The fridge has its own display and is capable of user scripts. This lets us write a script that runs either in response to events or all the time. It also lets us fork the scripts that the fridge came with. When we first got the fridge I played around with it a bit, and modified the light script to slowly increase the brightness when you open the door and then flash it a few times if the door is left open more than 30 seconds. In all honestly I thought it was a gimmick at the time. But when I figured out how to bypass the fridge's quaint todo app and have it send todos to a shared shopping list on phones, I was sold 100 times over. There's not much more I want from my fridge. And thank god fridge companies stopped trying to automatically detect what's in there and place orders for us. Those were dark days. I mean someone even tried to get RFID chips put in individual eggs. Crazy, right?

There were no additional scripts but the modification time on my light script had been updated. I checked a diff and noticed almost every line had been modified, but only its whitespace? The fridge doesn't support suppressing changes to spaces and tabs and only showing the actual code differences. So I plugged in my phone again (this time with USBC!) and pulled up CodeCat again. I found the lighting script again and had it show me only the code changes, no spaces this time. A new section had been hidden in the middle that would reset the color of the light every 7 minutes. Crafty. I copied it out and then reset the file to the previous version.

With the fridge fixed, I logged into my house's command and control box. This is an old mini computer (about the size of my phone) that I had laying around and hooked up to the wifi. It primarily listens for all the switches and turns on the lights in whatever room you're in. It can also listen for commands from your phone and it knows if we're home or not and can turn on the porch light. Simple stuff. I add a new script for the switch in the kids' bedroom, every 3rd time the light is turned on, and only if it hasn't happened in the last 2 hours, flash the lights bright green for 30 seconds and then go back to purple or whatever. That will show them!

The kids haven't really figured out about the house control as it's not right in front of them like the fridge, and they're still pretty young. I leave them with write access to the script so they can fix it if they figure it out. No point being completely mean. Time for work I suppose!

Roborooter.com © 2024
Powered by ⚡️ and 🤖.