Wireless Doorbell - (Raspberry PI & Amazon Dash)

23K14569

Intro: Wireless Doorbell - (Raspberry PI & Amazon Dash)

What does it do? (see video)

When the button is pressed, Raspberry discovers new device logging on the wireless network. This way- it can recognise the button being pressed and pass the information about this fact to your mobile (or a device of your choice)

In this project, you will see how to change the Amazon Dash into a wireless doorbell.
(Video tutorial link in the last step)

Things you'll need for this project:


Amazon Dash Button - Amazon offers WIFI buttons in the USA which can be set up to skip the Amazon functionality and make it work as a wireless button or a switch.

Tasker - Android app, which allows you to automate everyday tasks, we will be using this framework to display a notification on the mobile

AutoRemote - Tasker plugin which allows communication between mobile and raspberry

Raspberry Pi - a microcomputer which will scan the network for WIFI button presses - has to be connected to the network (via WIFI or LAN)

STEP 1: Setting Up WIFI Button

Connect the button to WIFI

  1. Press the button for 5 sec to enter the device into a WIFI broadcast mode.
  2. Open your mobile (or any wifi device) and look for the Amazon Configure Me
  3. Once connected to the device open a web browser and navigate to 192.168.0.1
  4. Select your network and enter your password
  5. Your button now is ready to rock

STEP 2: Setting Up Raspberry PI

Looking up the MAC of your buttons

Please make sure you have following libraries installed:

sudo apt-get install tcpdump

sudo apt-get install arp-scan

sudo pip3 install scapy-python3

Use Doorbell.py script to find out MAC for your button - see comments in the script.

Script has been updated and modified for Python 3

Setting up the scrip responsible for intercepting button presses

We will need to modify the doorbell.py script, open it and replace YOUR BUTTON MAC GOES HERE with the MAC saved from the step above. Look for YOUR AR KEY GOES HERE - this is where the Autoremote keys will be pasted. I will show you how to obtain the keys in the next step.

If you have the new buttons JK29LP - please see this post for the correct python3 script:
http://www.notenoughtech.com/raspberry-pi/new-amazon-dash-buttons/

STEP 3: AutoRemote and Tasker

AutoRemote

Open AR on your mobile and go to your personal URL (something like http://goo.gl/xXxXx). The address bar will contain the key we need for the doorbell.py - it will start with:

http://autoremotejoaomgcd.appspot.com/?key=YOUR_KE...

Copy the key (all after the = symbol) and replace the YOUR AR KEY GOES HERE in the script.

Tasker

We are going to create a profile. Our condition is an EVENT-plugin- Autoremote and set the filter to AmazonGreen (or whatever message you have used in doorbell.py)

Create a Task that will display notification. Open Alert - Notify and type your information. This message will be displayed on your screen.

Profile is provided as a project file.

STEP 4: End Tips


Your Raspberry is ready to intercept the button presses. It allows for one press every 6-10 sec, and multiple buttons can be pressed as well. As long as the script is running - you can receive the notifications (consider running it at the start)

The script should display below warning when operating:

WARNING: No route found for IPv6 destination:: (no default route?)

You can peel off the default label using a sharp tool and glue it another way around or use it as a stencil to generate your own. (see picture)

If you want to run this script at startup use rc.local method, put sleep 10 before the line with your script to allow the execution.


Full video tutorial on my YouTube channel:
Wireless Doorbell

61 Comments

Thank you all who voted for me!
Thanks to your kindness I was able to win 2nd prize in the contest! - You are awesome! I'm new to the website and I hope this will encourage you to share the great stuff you make!
Good luck!

Instructable updated, errors removed and script updated to python 3
See description.

Thanks for likes and votes

Strangly, on my windows 10 pc when I run the code, it writes "ARP" is not defined..
Kudos for trying this out.
My first guess would be Python 2.6 vs Python 3 - and the code is definitely not written for v3 :)
I am quite new (2 Y) to Python, and especially DEF functions, and the use of, lets say programming to include managing and starting devices like this button.
However it's seven years later, hopefully this post is accurate enough to have the doorbell running on the Pi and mobile.

However:

When I run the doorbell.py (after installing all packages needed) (named as "FNO..." after download..)

It gives me one error: ErrNo1 Operation Not Permitted, Line 30 'Print Sniff..
Is there any way to make this project without an Amazon Dash button? According to Amazon, they've stopped making Dash buttons and shut them all off. Does this project still work, and could I make one with a Dash button I fount on Ebay? Thank you!

Hi I have this error :

pi@raspberrypi:~ $ python doorbell.py
Traceback (most recent call last):
File "doorbell.py", line 8, in <module>
import urllib.request
ImportError: No module named request

Do you have any idea to solve it?

Thanks

Hey, do you have an old or new button? Check this post out - it should help you:
http://www.notenoughtech.com/raspberry-pi/new-amazon-dash-buttons/

Hi
Yes I have the new model : JK29PL
I already tried the modified version, same error.
Maybe I'm doying something wrong, here are the scripts I tried, if you could have a look :

https://dl.dropboxusercontent.com/u/16549393/Doorbells.zip

Thanks a lot.

are you running this via python or python3 ? the message you get means the python is unable to find the correct library - which should be served with python3 already.

I used this article over a month ago to create my own 'hack' for it as a notification system. I am experiencing issues, though. It is used quite a lot so I am thinking because these buttons are not meant to be used so often they are failing quicker.

I have a system that has 6 buttons and when you click one I created a small one page app using node.js to detect the arp request and then flash a div on the screen (all on an rPi) you tap the touch screen on the flashing box to close it.

The problem is with the buttons one of them died completely, it does not do anything anymore, no light or anything.

Other times the rPi fails to detect the packets. I am using an rPi 3 with the built on wifi adapter so it's more reliable than the USB one. It would work great for 2-3 days then fail and need a reboot (with no real good reason) and then work for a couple more days and one or two buttons would fail. Now, it is not working at all.

I am wondering if anyone else had problems like this ?

I found the best performance to be when RPI is wired to the router. Make sure you get good reception for your buttons, remember that only because your mobile/pc is in range doesn't mean that button is able to broadcast, the one that died - you can try to replace the battery. Dash specs say they aim for 1000 pushes per button battery wise.
I had to restart the script few times (usualy after few days) but im not sure what is the issue behind this one, rebooting your RPI daily with autoloading script seem to be the way to go

Well, they all would work great for a couple days, so I know the range is not the problem. This last time we had the problem it didnt work at all and I brought the button to the front room which is near the router also and it still didnt work.

I am likely going to revamp the system entirely and integrate the same function that the button provides into something else using the rPi.

I thought it worked so well but we're just having issue after issue, it's unfortunate that this didn't work out.

the only solution I can think of would be flic.io but with the steep price tag, it may be a little too much to ask for

Very nice! Curious about the Bounty and Tide logos on the buttons?

I'm planning on using one to use as a notifier for our washing machine as it doesn't have a buzzer built in so my Tide branded one is perfect for that!

Are you trying to mod the button into the washing machine? -I would like to see this in action:) cool idea. If this is the case a lot of devices could be IoT enabled this way:)

These are default stickers. Can be removed. Amazon dash comes with several brands stickers meant to make it easier to order products. In my guide they have obviously no influence :) although I could eat a bounty bar now:!
More Comments