steilerDev / homebridge-openhab2-complete

A homebridge plugin for openHAB, that has the expectation to fully support all Services offered by Apple's Homekit Accessory Protocol (HAP)
GNU General Public License v3.0
52 stars 16 forks source link

Doorbell #16

Closed danricho closed 5 years ago

danricho commented 5 years ago

I think adding a doorbell type would be great as in my example I use a 433MHz bushbutton which publishes it’s unique code of MQTT when pressed. This triggers an OpenHAB rule which sets a switch item to “ON” for a second then back to “OFF” (the same rule timestamps a datetime item so I know when it wasn’t last pressed).

From the HAP accessory description, it appears to be similar to a switch although probably will only trigger on the rising edge?

I’d love to hear your thoughts.

Thanks for all your great work!

steilerDev commented 5 years ago

Hi @danricho ,

there is a doorbell type defined by the HAP protocol, however the implementation is not trivial, since it requires a video feed, that is not supported by openHAB and therefore I decided against the implementation of this type in the context of this plugin.

The way you could implement it using the current features of this add-on is by declaring it as contact sensor, that can be set to send you notifications inside the Home.app. Unfortunately it will then send you notification when "ON" and "OFF" is received, but I don't see another way.

Regards,

Frank

danricho commented 5 years ago

I didn’t realise that the video stream was mandatory. I currently use a contact sensor for this, so that’s fine!

Thanks again