Doorbell

No problem 123456789

@malthus86 do you have issues with your Everspring sensor falling asleep and failing to respond to button presses or getting stuck in the ‘closed’ state. I’m still trying to optimize my setup and tweak my device type and am having a hell of a time getting a setup to reliably work.

No sir. Transformers are AC in, AC out by definition. A transformer changes voltage - step up or step down. The doorbell transformer is a step down transformer, typically 120VAC to 12 or 16 VAC. Transformers do not and cannot change current by themselves.

You might be thinking of wall wart power supplies that also have a rectifier which converts the stepped-down AC voltage to DC. Those are often generically called transformers, but it’s a simplification. Also, that’s not your standard doorbell transformer.

That’s because of the momentary switch, and might be what saves you from any real problem in using a DC relay in an AC setup. You’re not noticing the 120Hz hum because the relay is only powered for an occasional brief instant.

Apologies for the pedantry, but something you connect to your home’s mains is not to be underestimated. Consider the knockoff iPhone usb charging blocks - the little white cube ones made to look like Apple’s but were not. They went for form (look like Apple’s) over function (safe voltage step-down and current rectification), and earned a reputation for starting fires. Google “knockoff apple chargers cause fires” if you’re not familiar with this phenomenon. And while it’s not apples-to-apples (no pun intended, really), the lesson is the same: It’s easy to say ‘good enough’ when something performs the task intended (charges phone), but the implied functions (doesn’t overheat nor burst into flame) are neglected or forgotten about.

I like the approach @Mike_Maxwell describes. Elegant, simple, requires no wiring into the house’s electrical system. Got a notification a bit ago that my magnetic reed sensors have been delivered, so I have another sensor to add to my condo’s awareness.

Absolutely no problems. It’s probably the one device that works the best of my whole set up.

@malthus86, thanks for the input.

Works for me too.

Does the sensor show as open all the time on your phone, it closes and repoens when the door bell is rung?

just wondering. mine is open the whole time. closes for split second, opens again and an alerts comes to my phone


if that is the case, is there away to flip the sensor status ?

Yes, it closes for a split second and I use that to trigger an alert. I cobbled together from previously written device types a custom one for it that turns the tile grey and it won’t show as “Some doors are open” on the dashboard. Flashes orange ding dong! when the bell is rung. 2am now so tomorrow I’ll try and put it on github or post it here. I also did this same thing with a relay into my smoke/CO alarms. Then set it to trigger all the lights and unlock the doors if there’s a fire.

1 Like

I’ve never posted code here, hopefully this works. Sorry it took so long to get to this.

Doorbell device type:

/**

  • Z-Wave Door/Window Sensor for use as Doorbell
  • Author: SmartThings (modded malthus86)
  • Date: 2014-11-6
    */

// for the UI
metadata {
// Automatically generated. Make future change here.
definition (name: “Doorbell”, namespace: “malthus86”, author: “malthus86 (SmartThings)”) {
capability “Contact Sensor”
capability “Sensor”
capability “Battery”

  fingerprint deviceId: "0x2001", inClusters: "0x30,0x80,0x84,0x70,0x85,0x86,0x72"

}

// simulator metadata
simulator {
// status messages
status “open”: “command: 2001, payload: FF”
status “closed”: “command: 2001, payload: 00”
}

// UI tile definitions
tiles {
standardTile(“contact”, “device.contact”, width: 2, height: 2) {
state “open”, label: ‘Ding Dong’, icon: “st.Home.home2”, backgroundColor: “#ffa81e”
state “closed”, label: ‘No Guests’, icon: “st.Home.home2”, backgroundColor: “#ffffff”
}
valueTile(“battery”, “device.battery”, inactiveLabel: false, decoration: “flat”) {
state “battery”, label:‘${currentValue}% battery’, unit:“”
}

  main "contact"
  details(["contact", "battery"])

}
}

def parse(String description) {
def result = null
if (description.startsWith(“Err”)) {
result = createEvent(descriptionText:description)
} else if (description == “updated”) {
if (!state.MSR) {
result = [
response(zwave.wakeUpV1.wakeUpIntervalSet(seconds:4*3600, nodeid:zwaveHubNodeId)),
response(zwave.manufacturerSpecificV2.manufacturerSpecificGet()),
]
}
} else {
def cmd = zwave.parse(description, [0x20: 1, 0x25: 1, 0x30: 1, 0x31: 5, 0x80: 1, 0x84: 1, 0x71: 3, 0x9C: 1])
if (cmd) {
result = zwaveEvent(cmd)
}
}
return result
}

def sensorValueEvent(value) {
if (value) {
createEvent(name: “contact”, value: “open”, descriptionText: “$device.displayName is open”)
} else {
createEvent(name: “contact”, value: “closed”, descriptionText: “$device.displayName is closed”)
}
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd)
{
sensorValueEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd)
{
sensorValueEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd)
{
sensorValueEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv1.SensorBinaryReport cmd)
{
sensorValueEvent(cmd.sensorValue)
}

def zwaveEvent(physicalgraph.zwave.commands.sensoralarmv1.SensorAlarmReport cmd)
{
sensorValueEvent(cmd.sensorState)
}

def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cmd)
{
def result =
if (cmd.notificationType == 0x06 && cmd.event == 0x16) {
result << sensorValueEvent(1)
} else if (cmd.notificationType == 0x06 && cmd.event == 0x17) {
result << sensorValueEvent(0)
} else if (cmd.notificationType == 0x07) {
if (cmd.v1AlarmType == 0x07) { // special case for nonstandard messages from Monoprice door/window sensors
result << sensorValueEvent(cmd.v1AlarmLevel)
} else if (cmd.event == 0x01 || cmd.event == 0x02) {
result << sensorValueEvent(1)
} else if (cmd.event == 0x03) {
result << createEvent(descriptionText: “$device.displayName covering was removed”, isStateChange: true)
result << response(zwave.wakeUpV1.wakeUpIntervalSet(seconds:4*3600, nodeid:zwaveHubNodeId))
if(!state.MSR) result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
} else if (cmd.event == 0x05 || cmd.event == 0x06) {
result << createEvent(descriptionText: “$device.displayName detected glass breakage”, isStateChange: true)
} else if (cmd.event == 0x07) {
if(!state.MSR) result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
result << createEvent(name: “motion”, value: “active”, descriptionText:“$device.displayName detected motion”)
}
} else if (cmd.notificationType) {
def text = “Notification $cmd.notificationType: event ${([cmd.event] + cmd.eventParameter).join(”, “)}”
result << createEvent(name: “notification$cmd.notificationType”, value: “$cmd.event”, descriptionText: text, displayed: false)
} else {
def value = cmd.v1AlarmLevel == 255 ? “active” : cmd.v1AlarmLevel ?: “inactive”
result << createEvent(name: “alarm $cmd.v1AlarmType”, value: value, displayed: false)
}
result
}

def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd)
{
def result = [createEvent(descriptionText: “${device.displayName} woke up”, isStateChange: false)]
if (!state.lastbat || (new Date().time) - state.lastbat > 5360601000) {
result << response(zwave.batteryV1.batteryGet())
result << response(“delay 1200”)
}
if (!state.MSR) {
result << response(zwave.wakeUpV1.wakeUpIntervalSet(seconds:4
3600, nodeid:zwaveHubNodeId))
result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
result << response(“delay 1200”)
}
result << response(zwave.wakeUpV1.wakeUpNoMoreInformation())
result
}

def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
def map = [ name: “battery”, unit: “%” ]
if (cmd.batteryLevel == 0xFF) {
map.value = 1
map.descriptionText = “${device.displayName} has a low battery”
map.isStateChange = true
} else {
map.value = cmd.batteryLevel
}
state.lastbat = new Date().time
[createEvent(map), response(zwave.wakeUpV1.wakeUpNoMoreInformation())]
}

def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
def result =

def msr = String.format(“%04X-%04X-%04X”, cmd.manufacturerId, cmd.productTypeId, cmd.productId)
log.debug “msr: $msr”
updateDataValue(“MSR”, msr)

retypeBasedOnMSR()

result << createEvent(descriptionText: “$device.displayName MSR: $msr”, isStateChange: false)

if (msr == “011A-0601-0901”) { // Enerwave motion doesn’t always get the associationSet that the hub sends on join
result << response(zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:zwaveHubNodeId))
} else if (!device.currentState(“battery”)) {
result << response(zwave.batteryV1.batteryGet())
}

result
}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
createEvent(descriptionText: “$device.displayName: $cmd”, displayed: false)
}

def retypeBasedOnMSR() {
switch (state.MSR) {
case “0086-0002-002D”:
log.debug(“Changing device type to Z-Wave Water Sensor”)
setDeviceType(“Z-Wave Water Sensor”)
break
case “011F-0001-0001”: // Schlage motion
case “014A-0001-0001”: // Ecolink motion
case “0060-0001-0002”: // Everspring SP814
case “0060-0001-0003”: // Everspring HSP02
case “011A-0601-0901”: // Enerwave ZWN-BPC
log.debug(“Changing device type to Z-Wave Motion Sensor”)
setDeviceType(“Z-Wave Motion Sensor”)
break

}
}

CO/Smoke Detector Device Type:

/**

  • Z-Wave Door/Window Sensor for use as Smoke/CO Detector
  • Author: SmartThings (modded malthus86)
  • Date: 2015-03-11
    */

// for the UI
metadata {
definition (name: “Smoke/CO Detector”, namespace: “malthus86”, author: “malthus86 (SmartThings)”) {
capability “Contact Sensor”
capability “Sensor”
capability “Battery”

  fingerprint deviceId: "0x2001", inClusters: "0x30,0x80,0x84,0x70,0x85,0x86,0x72"

}

// simulator metadata
simulator {
// status messages
status “open”: “command: 2001, payload: FF”
status “closed”: “command: 2001, payload: 00”
}

// UI tile definitions
tiles {
standardTile(“contact”, “device.contact”, width: 2, height: 2) {
state “open”, label: ‘No Smoke’, icon: “st.Weather.weather3”, backgroundColor: “#ffffff”
state “closed”, label: ‘DANGER! SMOKE/CO DETECTED!’, icon: “st.particulate.particulate.particulate”, backgroundColor: “#CC3300”
}
valueTile(“battery”, “device.battery”, inactiveLabel: false, decoration: “flat”) {
state “battery”, label:‘${currentValue}% battery’, unit:“”
}

  main "contact"
  details(["contact", "battery"])

}
}

def parse(String description) {
def result = null
if (description.startsWith(“Err”)) {
result = createEvent(descriptionText:description)
} else if (description == “updated”) {
if (!state.MSR) {
result = [
response(zwave.wakeUpV1.wakeUpIntervalSet(seconds:4*3600, nodeid:zwaveHubNodeId)),
response(zwave.manufacturerSpecificV2.manufacturerSpecificGet()),
]
}
} else {
def cmd = zwave.parse(description, [0x20: 1, 0x25: 1, 0x30: 1, 0x31: 5, 0x80: 1, 0x84: 1, 0x71: 3, 0x9C: 1])
if (cmd) {
result = zwaveEvent(cmd)
}
}
return result
}

def sensorValueEvent(value) {
if (value) {
createEvent(name: “contact”, value: “open”, descriptionText: “All Clear”)
} else {
createEvent(name: “contact”, value: “closed”, descriptionText: “DANGER! SMOKE/CO DETECTED!”)
}
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd)
{
sensorValueEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd)
{
sensorValueEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd)
{
sensorValueEvent(cmd.value)
}

def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv1.SensorBinaryReport cmd)
{
sensorValueEvent(cmd.sensorValue)
}

def zwaveEvent(physicalgraph.zwave.commands.sensoralarmv1.SensorAlarmReport cmd)
{
sensorValueEvent(cmd.sensorState)
}

def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cmd)
{
def result =
if (cmd.notificationType == 0x06 && cmd.event == 0x16) {
result << sensorValueEvent(1)
} else if (cmd.notificationType == 0x06 && cmd.event == 0x17) {
result << sensorValueEvent(0)
} else if (cmd.notificationType == 0x07) {
if (cmd.v1AlarmType == 0x07) { // special case for nonstandard messages from Monoprice door/window sensors
result << sensorValueEvent(cmd.v1AlarmLevel)
} else if (cmd.event == 0x01 || cmd.event == 0x02) {
result << sensorValueEvent(1)
} else if (cmd.event == 0x03) {
result << createEvent(descriptionText: “$device.displayName covering was removed”, isStateChange: true)
result << response(zwave.wakeUpV1.wakeUpIntervalSet(seconds:4*3600, nodeid:zwaveHubNodeId))
if(!state.MSR) result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
} else if (cmd.event == 0x05 || cmd.event == 0x06) {
result << createEvent(descriptionText: “$device.displayName detected glass breakage”, isStateChange: true)
} else if (cmd.event == 0x07) {
if(!state.MSR) result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
result << createEvent(name: “motion”, value: “active”, descriptionText:“$device.displayName detected motion”)
}
} else if (cmd.notificationType) {
def text = “Notification $cmd.notificationType: event ${([cmd.event] + cmd.eventParameter).join(”, “)}”
result << createEvent(name: “notification$cmd.notificationType”, value: “$cmd.event”, descriptionText: text, displayed: false)
} else {
def value = cmd.v1AlarmLevel == 255 ? “active” : cmd.v1AlarmLevel ?: “inactive”
result << createEvent(name: “alarm $cmd.v1AlarmType”, value: value, displayed: false)
}
result
}

def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd)
{
def result = [createEvent(descriptionText: “${device.displayName} woke up”, isStateChange: false)]
if (!state.lastbat || (new Date().time) - state.lastbat > 5360601000) {
result << response(zwave.batteryV1.batteryGet())
result << response(“delay 1200”)
}
if (!state.MSR) {
result << response(zwave.wakeUpV1.wakeUpIntervalSet(seconds:4
3600, nodeid:zwaveHubNodeId))
result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
result << response(“delay 1200”)
}
result << response(zwave.wakeUpV1.wakeUpNoMoreInformation())
result
}

def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
def map = [ name: “battery”, unit: “%” ]
if (cmd.batteryLevel == 0xFF) {
map.value = 1
map.descriptionText = “${device.displayName} has a low battery”
map.isStateChange = true
} else {
map.value = cmd.batteryLevel
}
state.lastbat = new Date().time
[createEvent(map), response(zwave.wakeUpV1.wakeUpNoMoreInformation())]
}

def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
def result =

def msr = String.format(“%04X-%04X-%04X”, cmd.manufacturerId, cmd.productTypeId, cmd.productId)
log.debug “msr: $msr”
updateDataValue(“MSR”, msr)

retypeBasedOnMSR()

result << createEvent(descriptionText: “$device.displayName MSR: $msr”, isStateChange: false)

if (msr == “011A-0601-0901”) { // Enerwave motion doesn’t always get the associationSet that the hub sends on join
result << response(zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:zwaveHubNodeId))
} else if (!device.currentState(“battery”)) {
result << response(zwave.batteryV1.batteryGet())
}

result
}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
createEvent(descriptionText: “$device.displayName: $cmd”, displayed: false)
}

def retypeBasedOnMSR() {
switch (state.MSR) {
case “0086-0002-002D”:
log.debug(“Changing device type to Z-Wave Water Sensor”)
setDeviceType(“Z-Wave Water Sensor”)
break
case “011F-0001-0001”: // Schlage motion
case “014A-0001-0001”: // Ecolink motion
case “0060-0001-0002”: // Everspring SP814
case “0060-0001-0003”: // Everspring HSP02
case “011A-0601-0901”: // Enerwave ZWN-BPC
log.debug(“Changing device type to Z-Wave Motion Sensor”)
setDeviceType(“Z-Wave Motion Sensor”)
break

}
}

I love all the ideas in this thread! I am planning on getting a monoprice contact sensor for my doorbell (same as the one pictured here)
 however I would like to go one step further and add a relay to disable the bell
 I would ideally like to have it automatically triggered by a door state.
when my 10month olds bedroom door is closed I would like the bell disabled and instead get a notification when its pressed. the issue is when the baby is napping the doorbell goes and if that does not wake him the dog barking in response does
 I cant even get mad at the dog for barking because i trained her years ago to bark several times and go sit by the door when it rings for when my wife is home alone.

anyone have any ideas as to how / what device i should use to add a relay to disable the bell as well?

Doable with the typical 24vac doorbell, but a bit complicated electrically.
Might be easier to replace the doorbell button with a zwave doorbell.

1 Like

im not overly concerned about electrically complicated. Ideally i would like a normally closed relay as it would be great if I didn’t have a device eating up power whenever the baby is not sleeping and saving when he is. if such a device does not exist i may do it with an appliance module and use that to trigger a power supply with a standard normally closed relay.

I guess the other option could be to put an appliance module on the doorbell transformer.

but if a smart things compatible device already exists thats probably cleaner

Doesn’t exist yet, but Aeotec has announced one for release this summer:

the difficulty is that you want to have the doorbell send an alert when off, and ring the doorbell when on.
This requires intercepting the doorbell signal, then enabling the alerts and disabling the bell itself

With a single relay module (of whatever contact form), there’s no way of capturing the door bell action via the contact sensor, since the relay has cut the power to the doorbell


If I was super keen on pulling this off with currently available stuff, I would do the following.
–connect existing door bell button to monoprice contact sensors external inputs., this becomes the doorbell trigger (you may have to remove the doorbell’s light from the button)
–use the zwave relay module to activate the doorbell (replacing the existing doorbell button)
–crank out a smart app, or use an existing one to determine the actions that the contact takes (alert vs. relay on/off)

good suggestions! thanks!

FYI, my relay fried on me recently. Contact sensor still works perfectly and the APP runs just fine, but the relay is kaput. Relays are cheap enough but the time to remove it, solder a new one in, and put it all back together every 6 months is just not worth it. So either I have to find a more appropriate relay or I’ll be looking at another alternative like the Reed Switch Mike_Maxwell used.

1 Like

I had to test a few different relays to work with my lighted doorbell button on a 16v transformer without an actual bell. This 24v AC beefcake has been doing the job well with no signs of quitting:

You might give it a go.

This actually works for you? I just got a nearly identical reed sensor and it doesn’t pick up the field change at all.Did you do anything special?

2 Likes

Yea, been working for over a year.
I used an external reed sensor so I could mount it right to the side of the doorbell coil, the reed switch axis parallel to the coil .

Thanks for this idea, @Mike_Maxwell! This did indeed turn out to be super easy. The trickiest part was knocking out the hole for the external sensor wires and figuring out exactly how to insert the wires in the Monoprice sensor.

Alas, I can’t fit it inside the cover, because the contact sensor is just a little too long to fit between the chime plates and too long to fit in any other direction. For now, it’s sitting on top of the cover. The wall is light colored, so it’s mostly unobtrusive.

The New SkyBell HD is here and our new IFTTT Channel has launched: http://goo.gl/cYVclE

With SkyBell HD, you can start, view and record live video from the SkyBell HD at any time. You can do it from the app or any of the IFTTT/SmartThings devices can trigger SkyBell HD to turn on and start recording.

SkyBell HD also records when the motion sensor is triggered, even if you don’t answer it.

SkyBell HD is the same size as SkyBell 2.0, yet is a major improvement across the board.

Some other nice things about SkyBell HD:
–Full color night vision
–Free cloud recording and activity history so you can watch video later
–Up to 1080p camera without the fishbowl or periscope effect
–Made in the USA
–You can turn off your indoor chime from ringing (good for quiet time, sleeping babies and napping dogs!)
–On-demand video
–New Wi-Fi chip for faster performance and B/G/N support
– You can customize the color of the LED button
– Works with Nest



I liked your approach, but noticed the clatter of the relay when the doorbell was activated, and suspect, over time, the DC relay does not like the low AC voltage coming from the transformer. Just a thought, adding a AC to DC full wave rectifier between the relay and the solenoid might keep it alive. I am by no means and expert in this area, and invite others with a better understanding to comment.

Something like this?
http://www.qualifiedhardware.com/brands/adams-rite/4603-rectifier-2294.cfm?vfsku=2294&vfsku=2294&gpla=pla&gclid=Cj0KEQiAno60BRDt89rAh7qt-4wBEiQASes2tbEjx1bBkFWtW3M29TnQeNn4MWfCoDomJGaWVoxVwAEaAkz78P8HAQ