After reading on several home automation websites about how your home will do cool things when your doorbell is rang, I started looking around for a simple z-wave sensor I could put on my doorbell. Nothing. So I looked for a USB sensor. Nothing. This was a bit disappointing. So I took matters into my own hands.
To build this project, I used the following items:
An Elk 930 Doorbell Detector - (http://www.elkproducts.com/_webapp_2981405/ELK-930_Doorbell_and_Telephone_Ring_Detector)
An Arduino Nano (http://arduino.cc/en/Main/ArduinoBoardNano)
A 4.7k resistor
A Project Box
A piece of perf board
Using these components, the Vera plug-in I wrote (included below), and the Arduino code I wrote (also included below), I was able to get a rock solid sensor on my doorbell.
Electrical Assembly:
I didn’t have time to write up a schematic for those wanting to do this on their own, but I can if there is any interest/need. For those with some electrical knowledge, the Elk has an open collector output, so you basically hook it up to the Nano just like any other device - the negative to ground and the open collector output directly to the data pin you are going to use (in my case, D2). Also, for this circuit, you need a pull-up resistor, so take the 4.7k resistor and hook one end to the Nano’s 5V pin, and the other to your data pin (once again, in my case D2).
The other side of the Elk gets connected exactly as the included directions specify. Pay attention to this as my instinct was to wire this up in parallel, but the Elk should go in series to the circuit.
Arduino Setup:
The beauty of the Nano is that it has an on-board FTDI chip that work with the driver installed on Vera without problem. Therefore, simply take the the Arduino code I have below and upload it to the Nano. It will now send a string to the Vera everytime the doorbell button is pushed or released. For those looking at the code, keep in mind that the open-collector circuit is active low, so a logic 0 means that the doorbell is pushed and 1 is released.
Vera Setup:
Once everything is attached, upload the included files. Then go to the Developers section and create a new device with the D_Doorbell1.xml and I_Doorbell1.xml files. Once this is done and saved, then go into the device’s settings tab and click on IO. Select the new FTDI device and save. Everything should work now!
Issues:
The only issue I have found is that even though the Doorbell implements a Security State file and device, it shows up under the “Other” tab. This is a problem as I would like the camera to take a snapshot whenever the doorbell is pressed, but that’s not an option because on devices under “Sensors” can trigger a snapshot for a camera. @MCVFlorin, can you give any suggestions?
Let me know if anyone needs more clarification on this.