Doorbell serial port trigger


I’ve been researching connecting my doorbell to openHAB. I see on the serial port binding page it talks about using the serial port for on off detector that I think would work here:

“Switch items with this binding will receive an ON-OFF update on the bus, when ever data becomes available on the serial interface (or simply by short-cutting pins 2 and 7 on the RS-232 interface)”

and suggests this doorbell item:

Switch HardwareButton “Bell” (Entrance) { serial="/dev/ttyS0" }

Wondering if anyone has successfully done this and if so, what hardware they used to interface their doorbell to the serial port?

I have a 28V ac powered doorbell and was thinking of using a simple SPST relay on that circuit to drive the coil and then connect pins 2 & 7 of the serial port to the switch poles. I’m thinking this would work, but wanted to see if there was any experience out there.


I didn’t use serial but I did create a simple circuit to convert the 24vac signal to pulling an IO pin to ground on an arduino which reports back via MQTT.

I put a rectifier, small capacitor (don’t remember the value) 12v regulator then 12v reed relay.

All of the parts came from Radio Shack so that I didn’t have to do a mouser order.

The capacitor was critical to smoothing out the zero crossings of the rectifier. Without it the relay would buzz as it opened and closed rapidly.

1 Like

I used a Nexia Doorbell sensor (z-wave) which seems to be working pretty well so far and made for an easier install/intregation:

How is the Nexia doorbell trigger device working for you? Amazon reviews say it’s not Z-Wave certified and some complain it didn’t work for them. With the flexibility of openHAB there’s always ways around things, but I’d rather not have to fight a problematic device. What Z-Wave stick do you use? Can you see battery level?

Edit: It is actually zwave certified -

It was a bit finicky to get set up (part of that was just getting it properly supported in the Zwave binding), but I’ve otherwise ben quite pleased. Battery level is available. I use it with Pushover to send me notifications on my iPhone/computers which has worked well.

Thanks. I just got mine today. Seems to have initialized after waiting for some time and doing some manual wakeups (3 quick taps of the INSTALL button).

One thing appears wrong, though. The only two visible channels on the device are “Power Management” and “Battery Level”. Is this what yours has? Where’s the binary switch to indicate if the doorbell’s is pressed?

The device doesn’t act as a binary switch but uses the notification class. That was some of the difficulty I originally had as the support wasn’t fully baked into the binding (but is now). You’ll want the item setup as Item type Switch, category Alarm (at least that’s how I have it).

Here’s the rule I’m using for mine:

import org.joda.time.*

var boolean doorbellRinging = false

rule "Doorbell rang"
	Item zwave_device_home_node14_notification_power_management changed to ON
	logInfo("Doorbell", "Doorbell ringing?  "+doorbellRinging)
		var Timer waitTimer = createTimer(now.plusSeconds(15))[|
	        	postUpdate(zwave_device_home_node14_notification_power_management, OFF)

		logInfo("Doorbell", "The doorbell rang")
		postUpdate(Sensor_Doorbell_Time, new DateTimeType())
		pushover("The doorbell rang")


So the doorbell press flows through that power management channel on the thing? I find that bizarre. Could you show me your item setup, that’s where I’m stuck.

Thanks so much for your help, this would have been impossible otherwise.

I looked at the logs and realized I can just link the power management channel to a switch item using the GUI. Then ON will be when it’s pressed and OFF when it’s released.

I still find it strange that the device called this “power management.”

Thanks again for your help.

I stand corrected. It’s actually 1 when it’s pressed and 0 when it’s released.

It’s strange indeed. You’ll notice in my rule that I forcibly set it back to OFF after 15 seconds. I’ve read reports via SmartThings that it can occasionally mess itself up, so that prevents any potential issues.

in a recent post I described my setup of connecting my doorbell to openhab: Connecting a conventional doorbell to openhab

with this setup I can monitor triggering of the doorbell aswell as muting the doorbell.