HM-SEN-DB-PCB Doorbell Sensor

Hello,
I have a RPi3 with the HM-MOD-RPI-PCB to control a light switch via Apple’s Home app (HomeKit). To complete this setup I use openhab2 with homegear and the HomeKit add-on. Everything works great.
Now, I want to work on my doorbell. I want to get notified, when someone uses the doorbell, lets say through a push notification on my iPhone. I thought, I could just use the HM-SEN-DB-PCB Doorbell sensor since I already have an Homematic setup ready. So I got that doorbell sensor and succeeded with putting it together and pairing it with homegear.

Here is my Problem now:
How can I proceed to get what I initially wanted. I added the device as switch, since this device doesn’t do, just sense two kind of states. But what is the proper configuration to let the sensor tell another device to do something? How can I get openhab2 to recognise that the doorbell has been used and send a notification? What else do I need? Unfortunately I could only find very little about this sensor.

I hope someone has an idea and tell me how I can proceed.
Thank you.

Hi Phineas,

i am having the same Homematic doorbell sensor and i am using a rule to notify me via Telegram if the doorbell rings in absence. Additionally a photo is being sent via telegram ( i am using a CCU2 rule here which is triggered to send me a picture from my IP DOOR CAM with the openhab2 rule but you could do this both via openhab as well ).

You need to create an item ( in my case Doorbell_Frontdoor_ring ) that is linked to the channel of the HM-MOD-RPI-PCB – the PRESS SHORT KEY CHANNEL

I hope this gives you direction for your plans.

rule "Doorbell in absence push to Telegram over CCU2"
when
    Item Doorbell_Frontdoor_ring changed from OFF to ON 
then
	var SimpleDateFormat df = new SimpleDateFormat( "HH:mm, dd.MM.YY " )
	var String Timestamp = df.format( new Date() )
		if(Iphone_Sw.state == OFF) {
			sendTelegram("xyz", "Es hat um " + Timestamp.toString() + "an der Haustuer geklingelt!")
			CCU2GATEWAYEXTRAS_2_Klingelfoto.sendCommand(ON)
			logInfo( "----doorbell rang in absence----", Timestamp )
									}	
end
1 Like

Hey.
Thanks for your reply. I assume I need to install the telegram add-on. Furthermore, where do I add this rule?

yes, you need to install the telegram add-on and configure it propperly. There are tons of howto´s available on google and in this forum that explains how to create an telegram API bot and chat ID .You need this information to configure the telegram.cfg file in your services folder. Then you can use the telegram command in a rule.

The rule needs to be placed in the existing rules folder of your openhab2 installation. I am running openhab2 on a Pi and the folder is in /etc/openhab2/rules.

On a sitenote, i am not sure about your configuration but if you just want a doorbell rule and do not have a complex configuration yet, you could consider to have telegram notification up and running via the CCU2 interface of Homematic first. Atleast in German language there is a great community out there with step by step guidance in their forum Once you have this successfully implemented, you could start to implement this into openhab. in my case this helped a lot and it was much easier to get used to openhab2 with some background knowledge from the Homematic community.

Hey. Thank you very much for your replys. I am going to try the Telegramm solution. In the meantime I was reading about MQTT. It sounds to me, that this could also be an appropriate solution. I would like to implement both solutions. And then decide what I like better. Or even use both, depending whether I am home or on the go.
Does anybody have experience with MQTT in openhab2 and homegear? How could I implement that to openhab2? What can I do with this regarding the doorbell notifications. What do I need to accomplish this.
I just started very recently to read about MQTT, so I do not yet know everything I need to know.
Can someone help me here? I used openhabian to set up the RPi. I think there is an option in openhabian-config to install Mosquito MQTT.
Do you know a good guide (for newbies) to set up MQTT?

Hey,
I have a question regarding the Telegram solution. I configured the Telegramm add-on and the Telegram bot. I tested it with a light switch. It works perfekt. I have just one problem though. I do not get it to work with the Doorbell sensor. I configured the Doorbell-sensor as switch. Maybe that is wrong. I just don’t know what would be appropriate instead.
I hope someone can help me.

Switch is correct. Can you check if you did link it to the correct channel of the thing in openhab. See my first post.

Does the doorbell work correct in CCU2?

Is the Telegram string 100% accurate? ( e.g no Umlauts allowed ) Always a source of possible errors.

I always give a log command line in rules to double check if a rule is working. You can check the log file then for the correct execution of a rule and narrow down possible mistakes.