Why I stopped hacking the Amazon Dash button and learned to solder

Amazon Dash — designed to be thrown after use

tl;dr;

Stop trying to hack the Amazon Dash button. Just buy a cheap doorbell, a Raspberry Pi, and solder them together. You’ll get more flexibility and keep some heavy metals out of our landfills.

Now the actual story

Behold — the old button doing its thing.

Over the last 6 months, I’ve been running a custom nightlight for my son’s bedroom (available on GitHub). The concept is pretty simple — attach a button to his headboard, when he pushes it a Philips Hue bulb turns on, the light turns off after a couple minutes, and the light changes color when its time to get up. I wrote the code in Node.js and decided to use the Amazon Dash for his button (after reading this Medium post). I was absolutely thrilled with how easy it came together, and started offering to make this for my friends’ families.

When Dash stopped impressing

After 3 months, the button stopped working. Why? Turns out that’s the length of time it takes a 4 year old to push the button 1000 times (Dash wasn’t built for endless pushes, since nobody wants that many bottles of Tide. Also since the feedback from the ARP interceptions isn’t immediate, he’s double/triple/10x clicker some times). So I opened the button’s case, was thrilled to see a AAA battery, and said colorful things when I learned I couldn’t replace the battery without destroying the device. I quickly bought another button (read: the child must sleep) but vowed it would be my last. Sure the cost is cheap, but the thought of filling a landfill with otherwise perfect electronics made me a sad panda.

Alternative buttons I considered

Aside from assembling my own desktops & modding a couple XBoxes, I’ve always shied away from hardware. Soldering seems scary and I just wanted someone to take my money in exchange for a button backed by a programmable API. Here are the devices that I considered buying (and why I didn’t):

  • Amazon’s IOT Dash Button — Got me away from having to intercept packets, but relies on an external service and would still need to be replaced 4 times a year
  • bttn—$80 is a bit high, but the worst is the button only works if you pay & use the bt.tn cloud service (you’ll see a trend, I want the button to work even if outside internet is offline)
  • Particle Button — $49, and honestly I should have bought it. I just was a bit intimidated by the Particle ecosystem, but I could have gotten over that (like I got over my fear of soldering, thus this blog post)
  • Flic — $34, but requires a nearby bluetooth receiver to actually do all the work. Granted I could have just had a Raspberry Pi 3 in the room running the Node Nightlight server, and also have that receive the bluetooth connection, but something about that felt dirty & disaster-prone
  • Droplet— Starting to feel like vaporware
  • NIU — $30, and requires bluetooth. Really I just came across this today, apparently there is a demand in the market for these devices :-)

Time to just build my own

I have a wonderful coworker, Kim, who told me to just stop being a chicken and solder my own device to suit my needs. After a month of trying to find a fault in her logic, I listened to her and am glad I did. Here’s what I used:

This is what the final product looks like. I’m thinking we’ll probably let our son color the button at some point in the near future.
  • $5 Raspberry Pi Zero
  • $25 Cheap soldering iron, solder with flux, and soldering station (I’m sure I’ll soon want better tools, but it was really buying the soldering station the resolved all the barriers that stopped my prior attempts)
  • $1.50 wired doorbell (this one, but I found it at AxMan)
  • $8 USB Wifi dongle
  • $4 USB micro adapter (like this one, you’ll find a better deal with a little Googling)
  • You’ll also need a micro USB cable to power the device, and a micro HDMI cable, but I’d guess most people have those on hand

All in on parts, we’re at $19 or 4 Dash buttons. Beyond no longer contributing to the electronics garbage dump, I no longer have to do dirty ARP interceptions to handle when the button is pushed, plus I can be intelligent to understand the difference between long & short pushes.

The soldering itself was really easy. I took the doorbell apart, soldered one wire straight to a GPIO ground, and soldered the other wire to GPIO pin #18. And this was the magic that I didn’t understand until I dove in, a testament to being too deep in software & a poorly designed Computer Science curriculum — the program effectively is saying “Once every .2 seconds, send some power over this one pin on the board, and let me know if the circuit is complete.” And when I realized this a lightbulb that went off (albeit a mental figment of my imagination, shortly followed by the API-driven Hue bulb).

Everyone in the house is thrilled with how it has been working. The soldering was easy, fun, and I wished I had gotten into it sooner.