How to Set Up a Smart Doorbell with Camera Streaming

Hi everyone! I wanted to share a quick and easy way to set up a smart doorbell using Node-RED. I’ve been meaning to try this out for a while, and finally got it working last weekend. Here’s how I did it!

First, I connected my doorbell button to a Raspberry Pi using GPIO. When the button is pressed, it triggers a Node-RED flow. From there, I used the MQTT binding to send a signal to my Google Home Hub, which acts as a media player. The flow also adjusts the volume of the media player to ensure the announcement is loud and clear.

I found that using multiple devices for streaming worked best. I set one device to announce a message like, ‘Someone is at the door!’ and another to stream the camera feed to my TV. This way, I can see who’s there without missing the announcement.

Here’s the flow I used:

[
{
“id”: “c965ac72.bcba8”,
“type”: “api-call-service”,
“z”: “23c1d9da.d6d746”,
“name”: “Stream Camera”,
“server”: “72b2e838.1f3c58”,
“version”: 1,
“debugenabled”: false,
“service_domain”: “camera”,
“service”: “play_stream”,
“entityId”: “camera.blueiris_driveway”,
“data”: “{"media_player":"media_player.living_room_display"}”,
“dataType”: “jsonata”,
“mergecontext”: “”,
“output_location”: “”,
“output_location_type”: “none”,
“mustacheAltTags”: false,
“x”: 720,
“y”: 160,
“wires”: [
“75e4c1fc.6ddfd”
]
}
]

I also added a delay node to ensure the camera feed starts before the announcement. This was a bit tricky at first, but after a few adjustments, it works perfectly!

If anyone has tips or improvements, I’d love to hear them. Happy coding! :rocket: