Doorbell Sensor

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.

The Elk 930 is a nice find :slight_smile:

I guess you could use this with a HRDS1 or something similar and do it over Zwave without a plugin.

I looked at the HRDS1, but it costs 50$. The Nano was less than $20 and I have a dozen other data pins that I can utilize for whatever. For example, I could hook up the ring detector or the second doorbell detector and use the same Nano.

Good thought though.

I have a spare one, and also some spare inputs through my Alarm panel that I guess I could use.

Thanks for the pointers anyway, I think I’m going to go ahead and implement something like this now!

Hey dfad1469,

Nice job. Let us know when you’ve hooked up an RGB LED to your doorbell.

Bump

*MCVFlorin, any comment on my issue from the OP?

Thanks.

Sweet find on the Elk 930!

I did something similar about a year ago, using an arduino board, and a few components (rectifier, caps, resistors, voltage reg, etc). I finally got this project enclosed the other day (it was sitting on my ground mat for a year), but I have implemented camera shots. I am not on UI5 yet, nor have I had a chance to update UI4 in a few months, so I don’t know what notification options are out there now, but I used Luup events/scene to implement this.
Since we have issues authenticating directly with gmail, I set up a smtp relay server on one of my pc’s. Through a luup scene, I tell the camera to pan/tilt to catch a shot of the person at the front door. I then use a luup wget to capture this shot and store it on vera using the Lua IO commands. Then, I use Lua SMTP functions to send this out through gmail along with some notification text. Finally, I delete the stored picture using Lua IO, and 2 minutes later, the camera moves back to the home position.

This has worked everytime - and on my iphone, the picture is embedded in the body of the e-mail (not as an attachment).

Again, I don’t know if Vera now gives us an option to simplify this, but if you need my code to look at, please let me know.

I’ve attached a screenshot from my phone - although the pizza guy looked away in this one… and you’ll also note that the lights turn on at doorbell press (if dark) as well.

@dfad1469,
Thanks for the tip on the Elk-930!

I just ordered one of these, and will wire it into the extra input on my Alarm (as a non-alarming even, lest I scare the heck out of the Pizza guy)

Hey there. I need some assistance with embedding the snapshot to the body of the email. How did you do it with Lua IO? Can you provide sample code to save/delete the image as well as your method of ‘attaching’ the image to the body of the email?

[quote=“woodsby, post:7, topic:170185”]Sweet find on the Elk 930!

I did something similar about a year ago, using an arduino board, and a few components (rectifier, caps, resistors, voltage reg, etc). I finally got this project enclosed the other day (it was sitting on my ground mat for a year), but I have implemented camera shots. I am not on UI5 yet, nor have I had a chance to update UI4 in a few months, so I don’t know what notification options are out there now, but I used Luup events/scene to implement this.
Since we have issues authenticating directly with gmail, I set up a smtp relay server on one of my pc’s. Through a luup scene, I tell the camera to pan/tilt to catch a shot of the person at the front door. I then use a luup wget to capture this shot and store it on vera using the Lua IO commands. Then, I use Lua SMTP functions to send this out through gmail along with some notification text. Finally, I delete the stored picture using Lua IO, and 2 minutes later, the camera moves back to the home position.

This has worked everytime - and on my iphone, the picture is embedded in the body of the e-mail (not as an attachment).

Again, I don’t know if Vera now gives us an option to simplify this, but if you need my code to look at, please let me know.

I’ve attached a screenshot from my phone - although the pizza guy looked away in this one… and you’ll also note that the lights turn on at doorbell press (if dark) as well.[/quote]

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?

Try changing the [tt], “DeviceType”, “device_type”[/tt] in [tt]D_.json[/tt] and/or in [tt]D_.xml[/tt] to [tt]urn:schemas-micasaverde-com:device:MotionSensor:1[/tt].

@dfad1469, I’ve got it all set up with the Arduino, but I’m having trouble getting my tile in Vera’s dashboard to show the status of Doorbell ON / Doorbell OFF. I see the doorbell being detected through the Arduino’s serial console, but is there a way to debug this once plugged into the Vera?

Here’s what I did:

  1. Uploaded all of the 3 Doorbell plugin files.
  2. Created the device with the D_* and I_* files.
  3. Saved and restarted Vera.
  4. Clicked on IO and set it to ftdi_sio[]
  5. save and restarted

Did I miss a step?

[quote=“dfad1469, post:1, topic:170185”]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.[/quote]

i’d take a push-button scene-controller and break it open and attach the pushbutton-wires to the doorbell button.
or take a doorsensor and use external contacts to trigger a doorbell event.
nevertheless cool project :slight_smile:
im planning on putting a relais between the door-buzzer and attach these to doorsensor.
and a pushbutton to turn on a fibaro 2-way switch which will steer the door-opener and the telephone thingy …
audio is tapped into my pc

I am clearly the slow kid here, but what is the mechanical connection between the arduino and the vera? It looks like the arduino is just writing out to the serial port? Is this what is meant by the FTDI device - something connected via serial/usb? This project opens a whole world of possibilities! (I currently have my clothes dryer text me when it finishes, using an arduino, ethernet, pulling on a php prowl page…)

that be nice :slight_smile:
if you get to know this device it opens a world of possibilities
usb <> FTDI(com-port) <>arduino

I would like to email myself a picture whenever the door in unlocked.
Can you share your lua code ?
thanks :slight_smile:

Anyone have a step by step on how to install this on UI5? Just cant seem to get it to install in Apps Portal

Thanks dfad1469,

I’m trying to do the same project – my Arduino is a Duemilenove. I’m brand new at this stuff – how is it determined that you needed a 4.7k resistor? is that to reduce the 12V on the Elk to the 5V in the Arduino or… I personally would love a diagram. I guess the main thing I don’t get is which part of the circuit is the resistance for. Which aspect of the circuit wouldn’t want to have too much current, is it the Arduino we’re worried about or the open collector part of the Elk?

Cheers

Just a side post on the subject - The Fibaro Universal (Z-Wave) Sensor is another option when it comes to creating a door bell sensor. I’ve bought one to work with mine ( it also reports the temperature too) and being z-wave I can set Vera to invoke scenes when it’s pressed. E.g I use my Sonos as the door bell/ringer.

Is this available in a us version? Seems like I’m only finding EU links.

Sent from my SPH-D710 using Tapatalk 2

Just to add more options to the doorbell sensor theme.

The Vera RFXtrx plugin can receive and control some chime types of these brands HomeEasy, Chacon, KlikAanKlikUit, NEXA, Intertechno.which are supported are using the ARC (address code wheels) or AC (learning mode) protocol. - (sorry in Dutch) http://www.klikaanklikuit.nl/shop/producten/op-op/?p=2

Another option is to connect a standard chime pushbutton to a door/window sensor. Some security sensors have a connection for an external contact for example the X10 DS90. If the sensor does not have this connection you can solder the 2 wires to each end of the reed contact in the sensor.

http://www.homeeasy.eu/RemoteControlMagneticSwitchUnit/HE305/189/Product/44/
It is not advised to use this type of sensor to control lights in a Home Automation environment see: Don't use AC door/window sensors - Home Automation Domotica Forum Europe, Bwired Forum