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
4.24k stars 345 forks source link

Module HomeKit with motion sensors #812

Open piscinas opened 9 months ago

piscinas commented 9 months ago

I use go2rtc with frigate. I add my cameras to HomeKit with frigate using HomeKit bridge on homeassistant, to append motion sensor to the camera. But the played video with motion detected on Apple TV as a big latency. Since I add them directly from go2rtc the video played very smoothly, but I can’t add the motion sensor… So it is possible to add this feature?

AlexxIT commented 9 months ago

Your setup not very clear for me

piscinas commented 9 months ago

I use Homeassistant and Frigate with the go2rtc addon. I configure the cameras through Homeassistant using homekit bridge. But the video on AppleTv when motion is detected has a lot of lag. When I started using go2rtc's Homekit module, the video delay improved, but I miss the addition of the motion sensors.

AlexxIT commented 9 months ago

Do you have motion sensors when using homekit bridge?

piscinas commented 9 months ago

I use linked sensor to camera. This is my HomeKit.yaml.

  include_entities:
        - camera.frente
        - camera.entrada
        - camera.traseiras
        - binary_sensor.frente_person_occupancy
        - binary_sensor.entrada_person_occupancy
        - binary_sensor.traseiras_person_occupancy
        - binary_sensor.porta_lavandaria
        - binary_sensor.porta_cozinha
        - binary_sensor.porta_entrada_porta
    entity_config:
      camera.frente:
        support_audio: True
        linked_motion_sensor: binary_sensor.frente_person_occupancy
      camera.entrada:
        support_audio: True
        linked_motion_sensor: binary_sensor.entrada_person_occupancy
      camera.traseiras:
        support_audio: True
        linked_motion_sensor: binary_sensor.traseiras_person_occupancy

All camera and occupancy sensors are from frigate.

AlexxIT commented 9 months ago

Well. It's a big issues. Related to the support HKSV.