Introduction: Amazon Dash Security Sensor

I think this is going to be the last Amazon Dash hack I can come up with*. And this is truly MacGyver Style!**

It has tape, glue, & everyday item - all this to create a makeshift security device to fend off all the enemies or protect unauthorized use of fridge!

This time we going to hack the hardware, while software will be reused from my Instructable Award Winning Amazon Dash Wireless Doorbell project!

What a mouthful! You can call it AWADWD for short :)

What does it do?

You can use Amazon Dash as a makeshift WiFi security sensor that can be placed anywhere within your WiFi each. Protect your fridge, shed or cookie jar from un authorized use! Defeat the enemies in the process, possibly rule the world***.

What do we need?

Hardware

Amazon Dash Button

Raspberry Pi

Normally open reed switch

Magnet

3M tape

soldering iron

thin isolated wire

Software:

The software is optional and depends on how you wish to be notified about the 'intrusion'. More on that later.

Limitations

As this is essentially a hack, it's not a professional security solution. It should prevent kids from stealing the cookies but don't secure more expensive possessions this way. Due to how the Amazon Dash operates there are some additional things to consider:

the alarm can be triggered once every 10 sec

takes 4-7 sec to receive the notification

magnet can't interact with the sensor for more than 4 sec at a time

With that aside, let's start this instructable. Feel free to follow me via your favorite social media if you want to hear more about projects like this one. Twitter, Facebook, Google+, Youtube, personal blog NotEnoughTech.com

(*impossible or unlikely)
(**hint**hint**contest**hint)
(***unlikely, but possible)

Step 1: Hardware

The reed switch acts like a button. Normally Open switch will close when a source of magnetic field is in range (magnet).You can commonly find it inside the sensors of professionally fitted alarms. If a magnet moves close enough to the reed switch, it will imitate the button being pressed on the Amazon Dash.

Simple enough. Physics lessons are over! Class dismissed!

No wait, come back we have work to be done!

Before we start taking the button apart - pair it according to the buttons' instructions. Do not select a product to buy. Just exit the amazon app before that step. Otherwise, the intruders will order a pack of nappies each time they trespass!

The button will stay linked to your WIFI.

Button pads

I took the button apart (3 screws underneath the sticker). you will need some glue to put it back together. You should see a button on PCB and the contact points. Solder 2 thin isolated wires to each side. It takes some patience but pads are big enough.

Reed switch

I used a hot needle to puncture holes in the Amazon Dash enclosure. These will be used to thread the reed switch through and solder it with the previously attached to the button, wires. Give enough slack to get the wire wrapped around the battery otherwise, you may struggle to put the button back. Test the reed switch orientation, they trigger better when oriented correctly.

Once everything is ok, test the setup and see if you can wake up the Amazon Dash with a magnet. Put everything back together, use glue or isolation tape to secure the enclosure. (sadly buttons are not meant to be taken apart)

Step 2: Sensing

It's important that, unlike the professional security sensors, you don't keep the magnet permanently near the switch. This will cause the Amazon Dash to enter the setup mode.

If you are mounting the magnet on a door, make sure the magnet makes a swiping motion to activate the reed switch.

Step 3: Software

You will need a short script (python3) on your Raspberry Pi to detect the ARP probe.

Script overview

When the MAC address of the Amazon Dash is detected scripts issues a notificaton and stops.
A restart of the script is required to arm the sensor again. The script has to be filled in with following info:

  • Amazon Dash Mac
  • AutoRemote Key

In this setup I'm using Tasker and AutoRemote to receive the notification directly to my mobile. To set up your RPI please use this tutorial

To get the AutoRemote Key look up the dev help file. To get the MAC address check the back of the button or unhash the option in the script.

TASKER

feel free to issue other notifications but the script is set to work with Tasker App - it waits for the message from Raspberry Pi and it shows you a notification.

Import the project file into the tasker. If you want to reset the alarm directly from the notification you will also need the AutoTools plugin. Visit notenoughtech.com for more

tasker tutorials

Other notifications

Feel free to issue an email instead or modify the script with MQTT libraries. It's up to you how you want to get the notification resolved.

"""********************
Amazon Dash requires:
pip3 install scapy-python3

********************"""

from scapy.all import *
import urllib.request
from sys import exit

url_mobile = 'http://autoremotejoaomgcd.appspot.com/sendmessage?key=YOUR_KEY&message=alarm=:=BUTTON_NAME=:=warning'

def confirmation():
mobile = 'http://autoremotejoaomgcd.appspot.com/sendmessage?key=YOUR_KEY&message=alarm=:=BUTTON_NAME=:=set'
response = urllib.request.urlopen(mobile).read()

confirmation()

def arp_display(pkt):
if pkt[ARP].op == 1:
if pkt[ARP].hwsrc == 'Amazon Dash MAC': #Your button MAC
response = urllib.request.urlopen(url_mobile).read()
exit(5)
#print (pkt[ARP].hwsrc) #unhash for finding MAC of your button
print (sniff(prn=arp_display, filter="arp", store=0, count=0))

MacGyver Challenge

Participated in the
MacGyver Challenge