Program to monitor Amazon Dash button presses and perform custom action
Python
Latest commit f8dace3 Mar 8, 2016 @jgrahamc Merge pull request #1 from Tenzer/dependencies-and-imports
Dependencies and imports

README.md

dash

Program to monitor Amazon Dash button presses and perform custom action.

Amazon Dash

As has been blogged elsewhere the Amazon Dash button can be used as a WiFi enabled button if it is incorrectly configured. By partially setting up an Amazon Dash button it's possible to have it boot and send out small number of broadcast packets (DHCP and ARP) on start up.

A computer running on the same WiFi network can sniff these packets and use them as an indication that the Dash button has been pressed.

I found in practice that the blogged about technique of just listening for an ARP packet was unreliable. Sometimes the packet would not get received. The code here listens for all packets sent from the MAC address of one or more buttons and uses a time window (default 60 seconds) to filter out multiple packets being received.

TODO

There are two TODOs in the code: one where you fill in the MAC addresses of the Amazon Dash buttons you want to monitor and another in the rx() function to implement whatever action you want your button(s) to perform.

Caveat

I almost never write Python code.