Hacking Amazon Dash Buttons
The Amazon Dash button is about a year old and has proven to be a pretty great hackable internet-of-things button. It’s got built-in wifi, an onboard battery and best of all, a $4.99 price tag.
How It Works
The actual “hacking” of dash buttons has really nothing to do with the button itself. The process involves an external application that sits on the local network and listens for when the button is pressed.
Dash button hacks popularized by people like Ted Benson involve detecting an ARP Probe request made by the button ( a common way to avoid IP conflicts on a network ). The hack uses a running script that listens for ARP requests coming from the known MAC address of the button on the local network. When a request from the button is identified, an action is performed in response.
Dash Button Setup
In order to get your Dash button talking on the network, you first have to set it up from an iOS or Android device running the Amazon app. You’ll put in the SSID name and password into your mobile device and then it communicates with the Dash button to apply the settings.
The key is to not complete the final step in the setup process as you do not want your Dash button to actually order something. Once you get to the final step where you select your product, just exit the app.
After exiting the Amazon App, the Dash button will do everything it needs to do and you can safely use it to perform various tasks without fear of buying stuff. Now for the fun part, running code in response to a dash button press. There are really two ways to do this.
Option 1: Set up a Local Server
The most straightforward option is to have a server running on the local network that will listen specifically for the ARP Probe requests made by your dash button. I’ve had the best luck with a simple Ubuntu server running the Node Dash Button module. The documentation is very good and I got it set up and working without any issues.
Option 2: Proxy button press requests with your router
A more complex option is to proxy the requests that come from your button using rules on your router. Router firmwares like DD-WRT allow you to load a custom script that can be triggered when DNS requests are made from your button. This way you can avoid having to manage a physical server yourself and simply send a call out to a personal server like a VPS on DigitalOcean. My brother came up with a DD-WRT setup that works for him, instructions can be found here.
Dash Button Ideas
Once you have everything set up and working, you’ll need to find a good use for your hacked Dash button. Here is a list of ideas I’ve tried/considered:
- Log the times you wake up and go to sleep in a google sheet
- Send a message on slack (node-slack works great)
- Send a canned email message to annoy your coworkers
- Order pizza using the Domino’s pizza API
- Start the build process for your project
- Turn Phillips Hue Smart Bulbs on or off