dgreif / ring

Unofficial packages for Ring Doorbells, Cameras, Alarm System, and Smart Lighting
MIT License
1.18k stars 158 forks source link

Option to start recording on ring doorbell camera #1159

Closed deferato closed 1 year ago

deferato commented 1 year ago

Feature Request

Description

I want to include an option from the ring doorbell camera, that, when an action happens, it records and save an event

Describe the solution you'd like

I have an yale smart lock, and I want that when someone unlocks it, it sends a signal to ring to save that video

Describe alternatives you've considered

Ring should record moviments, but most of the times, when people leave or arrive, it doesn’t record

Device data

A new switch for the ring camera that allows to record the video and save

dgreif commented 1 year ago

I understand the motivation, but this is not a feature I'd care to create and maintain long term. I get a lot of requests for hiding things, and adding more switches will just make configuration that much more complicated. You are welcome to fork the plugin and add this for your specific use case though!

deferato commented 1 year ago

Do you know the service on the api that would be used for this? I don't mind creating the PR. Thanks

tsightler commented 1 year ago

I'm actually not aware of anything to just start a recording. In ring-mqtt there is a switch that can be used, but what it actually does is start a dummy livestream. Since Ring records any livestream this works to create a recording on Ring servers, which can be downloaded, assuming you have a scubscription. Others that don't have a Ring subscription have also used the automations to instead triggers ffmpeg to records the stream to a file for X number of seconds, for example.

deferato commented 1 year ago

Right, I imagine that switch would work, because when you start a live view, it records it, if you have, could you share the information on that switch, please? Thank you

tsightler commented 1 year ago

I maintain the ring-mqtt project, all code is available here: https://github.com/tsightler/ring-mqtt

However, the switch itself triggers ring-mqtt to start a local ffmpeg which connects to the local RTSP stream and just dumps the output to null. I haven't found any way to trigger a recording without actually triggering a livestream.

tsightler commented 1 year ago

Note however, that there are already examples right here in this project of recording the live stream to a file:

https://github.com/dgreif/ring/blob/main/packages/examples/record-example.ts

deferato commented 1 year ago

Thank you guys, I will take a look and see if I can make a PR for this feature.

Thanks