I have been a victim to the ‘Sorry, we have missed you…‘ note way too many times. While this is all good when I’m genuinely not home, it bothers the heck out of me, that I can’t move to my back garden and enjoy the nice weather until parcel arrives. Free wireless doorbell project was born to address this issue. Amazon Dash can deliver a notification to your PC, mobile, tablet, or whatever device you wish. This way you will never miss another parcel again, while frying your bacon in the sun, or getting your killstreaks in online multiplayer.
This award winning project will help you to set up your own free wireless doorbell.
DIY vs buy it yourself.
While you could buy simple wireless doorbell in a shop and install this in minutes, I took a different approach. The advantages of DIY approach are:
- you can hook up an unlimited number of buttons
- you don’t need to move the notification device around
- notification can be delivered even if you are outside of your Wi-Fi
- customise notification sounds, declare quiet times
- visual notifications on PC, for the times when you have your headset on
- you will learn new skills and be like: ‘look at me! I made this!‘ at any house party you host!
It’s not only a doorbell, you could use this switch to activate anything you have connected to the Wi-Fi. Response time is solid (2-3sec, Raspberry Pi must be connected via LAN) and you can re-trigger the button every 6-8 sec. You will also see a visual (LED light) feedback on your button. Personally, I own 2 buttons. One is located in the kitchen and used to call me when I’m in my office (due to distance and elevation, I can’t hear anyone calling me). The other one is placed as required on the front door, so the parcel guy could announce his arrival.
Amazon Dash Button
Wireless buttons are expensive and while you can get one easily on flick.io this would cost you over $30! Not the price I would like to pay when similar off the shelf solutions are available already. Amazon Dash however, comes free*. Introduced by Amazon, to get your shopping done quicker, the company decided to offset the cost of the device with purchases. You can get one if you are in the USA for $4.99 and get the price of the button refunded to you with your 1st purchase. Amazon Dash UK is here. Look at this post if you are trying to setup new buttons.
Free Wireless Doorbell
Free wireless doorbell requires few things to function. In this write up I will show you how to hook it up to a PC and mobile, and you can take it from there. We will need:
- Tasker app
- AutoRemote plug-in
- Raspberry Pi
- Amazon Dash
- EventGhost (PC)
- AutoRemote extension for Chrome
If you haven’t figured out how to connect the RPI and AutoRemote – see this video. To make the free wireless button work we will need to intercept the moment the button ‘logs in’ to the WiFi and respond to this action by issuing the notification to the desired device.
Amazon Dash setup:
- Press the button for 5 sec to enter the device into a WIFI broadcast mode.
- Open your mobile (or any wifi device) and look for the Amazon Configure Me
- Once connected to the device open a web browser and navigate to 192.168.0.1
- Select your network and enter your password
- Your free wireless doorbell button now is ready to rock
Raspberry Pi setup:
To detect the button, and look up it’s MAC address we will need following libraries to be installed on your RPI. The script is written for python3. Few modifications will be needed to the script so you could use it. You will need to get your API key for AR – look up this page for info if you haven’t seen the RPI to AR video above. The code will populate the results with MAC addresses of the button when pressed. Copy that address and fill in the default placeholders in the script.
sudo apt-get install tcpdump sudo apt-get install arp-scan sudo pip3 install scapy-python3
Free wireless doorbell python3 script:
"""******************** Doorbell script redone for python3 must run pip3 install scapy-python3 by www.notenoughtech.com ********************""" from scapy.all import * import urllib.request def arp_display(pkt): url_pc = 'http://autoremotejoaomgcd.appspot.com/sendmessage?key=YOUR_AUTOREMOTE_KEY_HERE&message=' url_mobile = 'http://autoremotejoaomgcd.appspot.com/sendmessage?key=YOUR_AUTOREMOTE_KEY_HERE&message=' if pkt[ARP].op == 1: if pkt[ARP].psrc == '0.0.0.0': if pkt[ARP].hwsrc == 'AA:AA:AA:AA:AA:AA': #Your button MAC button = 'BUTTON 1' #Other button mac if you have more than one, OTHERWISE delete this and next line elif pkt[ARP].hwsrc == 'AA:AA:AA:AA:AA:AA': button = 'BUTTON 2' #putting URL together before sent messagePc = url_pc + button messageMobile = url_mobile + button #sending message to pc/mobile response = urllib.request.urlopen(messagePc).read() response = urllib.request.urlopen(messageMobile).read() #print ("Call from: " + button) #unhash for testing #print (pkt[ARP].hwsrc) #unhash for finding MAC of your button print (sniff(prn=arp_display, filter="arp", store=0, count=0))
As usual, I’m going to use Tasker + AutoRemote combo to communicate with my mobile, AR will be also used for PC communication. We will need a simple profile that will act on received notification from Tasker.
Profile: Received Button Click Event: AutoRemote [ Configuration:AmazonGreen ] Enter: Button Pressed (5) A1: Notify [ Title:Your Button Is Pressed Text:Swipe to dismiss Icon:hd_aaa_ext_bulb Number:0 Permanent:Off Priority:5 ]
In a similar manner, once notification is received you can use EventGhost. This is an automation/macro tool that you can use with AutoRemote. You will need a plugin installed for it. Here is the link how to get the EG ready. Once it is connected, you can send a sample message to your PC, and intercept this action. We will also need an extension for chrome to enable this. You will find the extension here. Follow the instructions to set up the PC as AutoRemote device from this link. Chrome by default will show you notifications coming to the PC, but if you wish to get them up while, use EvenGhost. Here is a sample how you could display the notification as an overlay on the screen for few seconds.
I have a video of entire process explained here for you:
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 script is running – you can receive the notifications (consider running it at start)
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.