In the first part of this two part post, I described how I used an old Music & Sound intercom system to power a Skybell HD without having to install a special adapter or a new transformer. This second part will describe how to have the Skybell ring a “virtual doorbell” by causing the Skybell button push to play a doorbell sound over speakers. This is an alternative to hard wiring the Skybell to an analog or electronic doorbell as intended by Skybell or using a service like IFTTT which results in a rather long delay between button push and response.
As background, when the button is pressed on the Skybell or when motion is detected, Skybell sends a message over Wifi through your router to the Skybell computers outside of your home network. While the messages can’t be read as they are encrypted, routers that allow ssh logins can run a tcpdump command to monitor network traffic and detect the button press. Once the button press is detected, a script can be triggered to play a sound file or perform any other action. This method results in a much quicker response time than monitoring Skybell’s cloud servers or using IFTTT.
You will need the following to setup a virtual doorbell with Skybell:
- A linux server running on your home network ( I use a Raspberry Pi)
- A router which permits ssh logins (I have a router running dd-wrt firmware which permits ssh)
Install Skybell Sniffer
Install the Simple Skybell Sniffer following these instructions. This is a slight modification I made to a portion of a Skybell plugin to Homebridge which was developed by Thoukydides. My modification doesn’t require Homebridge and simply is intended to run as a service on a linux systemd based server (e.g., debian stretch). The Skybell Sniffer is a systemd service which runs a tcpdump on your router through an ssh command. The service monitors the tcpdump output and then runs the command you specify when it detects a message indicating that the Skybell button has been pressed. Since the message is detected before it leaves your network, the response time is much quicker (1 to 2 seconds) then having to rely on IFTTT or having to monitor Skybell’s cloud service.
Once Skybell Sniffer is setup and running, we need to set up the action part of the process. The simplest action would be to play an MP3 file of a doorbell ringing and play that over a speaker connected to your Raspberry Pi through the 3.5 mm jack or through blue tooth. However, I have a number of Google Assistant minis and a few Chromecast audio devices throughout my house and I wanted to cast the doorbell sound over those devices. After some research I discovered harperreed’s Google Home Notifier Webservice. This service allows one to cast an mp3 file on any Google Assistant or Chromecast Audio device on your network. It also allows you to have Google Asssistant say any text you want, e.g., “You have a visitor at the door”, however I have found this service to be unreliable at times so I haven’t included it in this write-up but it is explained in the Google Home Notifier readme.
Install Google Home Notifier
[NOTE/UPDATE: I no longer use the Google Home Notifier as it was unreliable. I now use skybell-sniff to run a script that publishes an mqtt topic to Home Assistant
. See this revised github post (geekvisit/simple-skybell sniffer)
here as well as further instructions in this skybell-actions.sh file on github – this method is much recommended over the below which seems to break every few days. I’m leaving the below only for those who want to try an alternative method or don’t want to install Home Assistant
I downloaded Google Home Notifier Webservice, renamed “main.py” to “gnotify.py”, edited gnotify.py to specify the name of the Google Assistant device I wanted the doorbell to play on (e.g., “Living Room Mini”), downloaded a doorbell.mp3 sound file that I found on the web and placed it in the “static” subfolder, and then followed the “getting started” instructions to install:
pip install -r requirements.txt
nohup python gnotify.py
To have the Google Notifier start up each time the Raspberry Pi boots, I added the following to my crontab:
@reboot nohup /home/root/scripts/gnotify.sh &
Specify Doorbell Action
I then edited the Skybell Sniffer “skybell-actions.sh” script (path is contained in the last line of /etc/default/skybell-sniff) to add the action I wanted to perform on the press of the door bell – playing the doorbell mp3 file I downloaded:
That was it. The system works fairly well and I have been using it for several months.
There are several advantages and disadvantages to this setup over a hard wired connection to a real doorbell as set forth in the Skybell documentation:
- No separate analog or electronic doorbell required
- Infinite actions, sounds, and notifications be triggered
- Requires a full time Raspberry Pi to be running ( I don’t find this to be a problem as the pi is low in electricity usage and I already use one for HomeAssistant, I do recommend the Raspberry Pi 3 on up as the prior versions are less stable. I have found the 3 to be rock solid.)
- Relatively complicated – several things can go wrong – wifi could fail, the Pi could fail, the PI could be unplugged, the software programs could stop, someone could turn off or down the speaker and/or Google Assistant/Chromecast Audio device
Despite the disadvantages, I have found this system to work relatively well over the course of several months. The biggest issue has been some instability in the google notifier but I believe I have ironed those out in the scripts. If the doorbell does appear to fail,then simply restart your google notifier by executing the following commands:
pkill -f gnotify.py
nohup /home/root/gnotify.py &"
TIP: Configure your router so that the Google Home or Chromecast Device you are casting to is assigned a static IP based on the mac address shown in the Google Home app. This will solve an issue where the device may intermittently go offline.