“Dammit, why am I unable to get this under control!” I thought to myself as I ran, dragging two weeks worth of hot, stinking garbage toward the collection truck that was just about to drive past my house again.
It’s late August in Virginia in 2017, which isn’t great for storing garbage outside your house. My wife is newly pregnant and understandably losing her patience with me.
Hot and annoyed at myself, I reach for my pocket (and remember I’m still in my underpants), suddenly it dawns on me:
“Have you seen my phone?”
“No, stop asking me! Use your beeper app,” said my wife.
But the beeper app didn’t work anymore.
I was running around the house for ten minutes, up and downstairs, no dice. I finally cave in and use ‘Find My Phone’ via the iCloud portal.
My phone was under the mower, in the shed.
“I need to solve these problems, once and for all,” I thought to myself. “I need something, that won’t let me forget to take out the trash AND will find my phone.”
The result: TrashBox
See trashbox in youtube in all of its poorly woodworked glory.
Starting at the beginning with ‘gobeepme.’
I wanted to build an experience that was missing from the market; I wanted to trigger the real ‘Find My Phone’ feature built into iPhones via one of the Alexa nodes laying around my home.
I wanted to say “Alexa, where is Dave’s Phone?” and through the magic of technology, my phone would beep.
I would then be able to hunt it down.
A quick Q&A to help set some context
- Why not just call your phone?
- My phone is always on silent. Always.
- Why not use an existing app?
- None of them use ‘Find my Phone’; they call your phone.
- Set a calendar reminder, set like - ten of them?
- My phone is set to do-not-disturb at times I would need to remember; I ignore the constant buzzing.
- Why not just use an existing library?
- At the time, there wasn’t one. There still isn’t one.
- Why are there so few options for libraries that do this?
- The API is undocumented. Apple have not made it available to developers. It is public, however.
Reverse engineering the ‘Find My iPhone’ API
With the hard part (figuring out what APIs to call) complete, I wrote gobeepme.
It’s a multi-interface application. It runs as a CLI, interactively or via automation. It also runs as a RESTful API as a headless service. It comes with a web UI as well (if you choose to build it).
Try it out right now (as long as you have go installed). Open your terminal and run:
$ git clone https://github.com/daveshanley/gobeepme.git
Once cloned, build and run gobeepme.
$ go build gobeepme.go $ ./gobeepme
There are more details available in the README.
My wife and I used gobeepme regularly for a couple of years. My wife used it as much as I did with her phone until I forgot to renew SSL certs.
After our Alexa nodes stopped responding one day, I figured out that the SSL certs I was using had expired. We had a one-year-old taking up all our time, and my beeper code was a distant memory.
Back to the physical plane of interactivity
My new ’trash’ problem and recently re-emerged ’lost phone’ problem was now causing me constant, avoidable grief. I wanted to solve both problems with a single solution.
The experience requirements
- Must annoy me until forced into being reminded to take out the trash.
- Must annoy my wife, so she kicks my ass into taking out the trash.
- It will have a smaller button to allow us to select my phone or my wife’s phone.
- Must have a screen to show which phone is currently selected.
- Will have another more prominent button that will call the gobeepme service with the selected phone.
- Will have tiny control button at the back to toggle different modes.
- Makes fun noises for button feedback.
- It makes a terrible noise when it’s trash time.
- Must look like a prop from a cheap sci-fi show1.
- Must still (somehow) blend in with our home decoration.
Making it annoying
What is more annoying than super bright flashing red LEDs in your face?
The familiar Original Star Trek whooping siren plays, and the front of the trashbox lights up and blinks, endlessly, on Tuesday night at 9 pm.
The only way to turn it off is to press the red control button at the back of the box.2
It means we physically have to get up and move to disable this most irritating device.
Grabbing all the electronics to make it work
I used Home Depot for the wood for the actual box, and I already had the tools.
Construction was messy. I also had no real experience (at the time) making anything with wood and nails, so the actual wooden box is pretty shoddy.
The lack of golang support wasn’t going to be an issue, Java support is solid.
Transport needs a Java Version
Transport is an open-source, multi-language application event bus and micro-platform technology used in multiple VMware products. In both front-end and back-end systems.
Trashbox was an opportunity.
" If I can prove that the bus design works on a single board computer controlling LCDs and LEDs, then I know it can power anything."
I added in some existing prototype code (that is now opensource) to a new project that would allow me to use the bus to carry commands from button events and LED events.
Running the code on the microcontroller helped me understand how to improve the performance of the bus. The single-threaded CPU slows things down.
Watch a quick video of what Transport is.
The end of the story
Trashbox went out of service in 2020 after a few things happened:
- My wife kept unplugging it, and I would not notice until I missed the trash repeatedly.
- We moved, and our new home has no-where for it to go, without it looking awful.
- Trash pickup occurs at the end of the day now; there is no morning rush.
What about the ‘Find My Phone feature? Don’t you still use that?
No, Apple released the ‘Find My’ app on macOS X. I have this open all the time on my machine(s). It’s easy to open and ping a phone or AirTag quickly.
You can also rip the power cable out of the wall, which is my wife’s preferred method. ↩︎