Skip to content

Do It Yourself Doorbell (Custom Doorbell Button)

Ewan Dank edited this page Jun 5, 2023 · 2 revisions

Custom doorbells are a great way to use an existing camera that points at your front door with a smart connected button that can act as a Homekit secure video doorbell. Note that the same configuration can be used to tie a motion sensor to a camera, just replace the "custom doorbell button" extension with the "custom motion sensor" extension and in your mqtt handler either use the motion-sensor.ts template or replace the ScryptedInterface.BinarySensor with ScryptedInterface.MotionSensor

Requirements

  1. Camera with hardware motion alerts (or an RTSP camera with OpenCV plugin installed)
  2. Hardware switch that can send messages to Scrypted (zwave, mqtt, webhook, etc) or HomeKit The advantages of doing this are that you can use any combination of camera and button you want. The camera can be PoE and does not need to be attached to the button itself.

Steps

  1. Ensure you have the dummy-switch plugin installed.
  2. Configure your button in scrypted, below I will describe how to setup an mqtt button, but the same steps can be applied to any button.
  • Install the mqtt plugin
  • Select "add new"
  • Enter a name and select the button.ts template
  • Update the subscription url, username and password (if applicable) to be set to your mqtt server. Update the topic in the handler as well. If your on value is different to "ON" update that as well. For example, if your mqtt server is on 192.168.0.2 port 1883, and the topic your button publishes to is /stat/doorbell/button with a payload of "DING" when pressed, this is what your scrypted handler should look like.
mqtt.subscribe({
   'button': value =>   device.binaryState = value.text ===  "DING";
})
mqtt.handleTypes(ScryptedInterface.BinarySensor);
  • with the subscription url set to mqtt://192.168.0.2:1883/stat/doorbell/
  1. Go to the device page of the camera you want to add the button to.
  2. Go to the extensions tab and enable the Custom Doorbell Button extension
  3. Go to the custom doorbelll button configuration tab and select the button you just created from the dropdown.
  4. Select save and you are now all good to go. You may need to reset the homekit code and readd the device to homekit if you already added the camera to homekit.