AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
3.76k stars 305 forks source link

motion / doorbell / two way audio homekit #669

Open bagobones opened 9 months ago

bagobones commented 9 months ago

Trying to keep latency as low as possible (sometimes worse than 15s in HA) having go2rtc export cameras to everything seems to be much faster and efficient than lets say going camera--->go2rtc-->homeassistant--> homekit

Any chance there are plans to support motion / doorbell type "EVENTS" passed on with the exposed homekit cameras or a functional 2 way feed with homekit to use the native GUI on apple devices? Or is that outside the project scope and better for something like HomeAssistant to handle (although the video processing sucks)?

I could see mapping like for like ONVIF-->homekit, homekit-->homekit being easier to support than say having MQTT / Webhooks being mapped. Or maybe a API that frigate could use for its existing person / motion / new custom events.

Being able to connect / map sensors for motion / doorbell would be very cool however.

AlexxIT commented 9 months ago

What model of camera are you talking about?

bagobones commented 9 months ago

This is more of a generalization about adding "motion" or "doorbell" sensors for homekit export as homekit for example automatically treats doorbells a certain way (will launch video on an Apple TV), similarly a camera with a motion sensor will have that as an option as well.

Right now I have an Amcrest AD110 and I expose it as a homekit doorbell via home assistant.. the two way talk is not supported but since I mapped the button press and motion sensors to it it will correctly trigger the special doorbell behaviors in homekit.

I have a reolink doobell on order and plan to do the same but would ALSO like to mapp the two way audio.

This may be out of scope for go2rtc... however motion sensors and doorbell buttons are a fairly common video source

IE are there any plans to support a http API, MQTT, or other method to add motion sensors or doorbell presses to cameras?

bagobones commented 8 months ago

Well I officially have the Reolink WiFi doorbell now... I have not been very happy with the mapping or video stability of passing exposing cameras from home assistant TO homekit

Would be very cool if go2rtc could map ONVIF doorbells back out as homekit doorbells, might require a config syntax that maps the sensors / events for motion and button (visitor) if they are not standard.

digaus commented 6 months ago

Well I officially have the Reolink WiFi doorbell now... I have not been very happy with the mapping or video stability of passing exposing cameras from home assistant TO homekit

Would be very cool if go2rtc could map ONVIF doorbells back out as homekit doorbells, might require a config syntax that maps the sensors / events for motion and button (visitor) if they are not standard.

Why not use Scrypted?

bagobones commented 5 months ago

Why not use Scrypted?

Seems redundant.. I am already running frigate which contains go2rtc. There is a lot of similar functionality in the tools but frigate/go2rtc already do most of what I want other than being able to link sensors.

I tried Scrypted a while ago before finding go2rtc and I prefer the clean config structure of go2rtc.. I found some of Scrypteds modularity actually confusing to use.

Given some of the great work on getting a number of 2way audio cameras working, going further and exposing these to homekit with 2-way audio, motion and doorbell support.

pfeifix commented 1 month ago

Is there any update on this? I would also be very happy if go2rtc supports a way to augment a HomeKit camery with a doorbell trigger switch. This has some useful advantages (as described above). Unfortunately I cannot be done with Scrypted as it does not have support for importing HomeKit streams or provide a HomeKit proxy like go2rtc does.

AlexxIT commented 1 month ago

Please let me know if the problem is relevant

bagobones commented 1 month ago

I would still be interested in mapping, doorbell, motion, and 2-way audio features to homekit so that the native doorbell, motion alerts worked in homekit and the native 2-way audio/video doorbell interface could be used.

ONVIF profile T device seem the most logical source to support for this with Reolink now supporting the T profile across most of its doorbells and cameras and maybe the TAPO source devices as there is already some native TAPO support in go2rtc.

pfeifix commented 1 month ago

Please let me know if the problem is relevant

Yes, it is. It would be a superb thing if the doorbell profile could be added to my native HomeKit camera which is the Logitech Circle View (outdoor) but unfortunately it has no built-in doorbell functionality.

Can the feature be added to go2rtc?

AlexxIT commented 1 month ago

This is very big task. Not in near future

pfeifix commented 1 month ago

This is very big task. Not in near future

OK, too bad. But motion and luminance sensor are already connected? I would assume it is just an additional profile to add for the doorbell button to appear in HomeKit?

AlexxIT commented 1 month ago

It's even bigger task :) I think now you using your camera in HomeKit transparent proxy mode. Go2rtc don't make changes to it spec. This issue about generic camera that should be converted to HomeKit camera with additional features. The problem is - go2rtc don't have any events logic in its core yet.

pfeifix commented 1 month ago

I see. So there seems currently no solution for the doorbell to be added to a HomeKit camera. Scrypted is not able to import HomeKit cameras at all and via the RTSP/ffmpeg import (together with the stream provided by go2rtc) the connection is not stable, too (and there is no 2-way audio).

If you find the time to implement the feature please report back. This would be kind of a game changer for me.