Skip to content

[Support]: Frigate cameras added to Home Assistant HomeKit Bridge don't stream #8550

Description

@finishthepint

Describe the problem you are having

I've searched around and it seems like I'm not the only one that's having this problem however I haven't been able to find a solution. Everything about my frigate setup works great and I'm able to view the frigate camera streams in Home Assistant by going to the camera entity and clicking on the camera. However, when I add the Frigate Camera to the HA HomeKit Bridge, the stream never loads in HomeKit. I do however see a thumbnail when i open the Home app.

I spent a lot of time troubleshooting this and i believe it's an issue with the frigate camera entity. To test, i added a Generic Camera device to HA using the go2rtc restream URL (rtsp://192.168.1.10:8554/Front_Door_Full_Res) and added that camera to the HomeKit bridge as an Accessory. This worked as expected and I'm able to stream the camera in the Home app. However, when i add the Frigate Add-On generated camera to the HomeKit bridge in the same way, i dont get a stream in the app and the log gives me an error "Camera has no stream source". Any help would be appreciated.

I've also tried implementing the go2rtc HomeKit support but have not been successful but that's for another thread.

My setup is:
Frigate HA Addon 0.12.1/Integration v4.0.0-rc1
Supervised HA 2023.11.1

Version

0.12.1

Frigate config file

mqtt:
  # Required: host name
  host: 192.168.1.10
  # Optional: port (default: shown below)
  port: 1883
  # Optional: user
  user: mqtt
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: passwordgoeshere

detectors:
  ov:
    type: openvino
    device: AUTO
    model:
      path: /openvino-model/ssdlite_mobilenet_v2.xml

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt
    
go2rtc:
  streams:
    Front_Door_Full_Res:
      - rtsp://admin:password@192.168.1.108:554/cam/realmonitor?channel=1&subtype=0
    Front_Door_Detect:
      - rtsp://admin:password@192.168.1.108:554/cam/realmonitor?channel=1&subtype=2
  homekit:
    Front_Door_Full_Res:

ffmpeg:
  # hardware acceleration
  hwaccel_args: preset-vaapi


cameras:
  Front_Door: # <------ Name the camera
    ffmpeg:
      input_args: preset-rtsp-restream
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://192.168.1.10:8554/Front_Door_Full_Res
          roles:
            - record
        - path: rtsp://192.168.1.10:8554/Front_Door_Detect
          roles:
            - detect
    motion:
      mask:
        - 112,616,91,533,101,310,96,199,97,83,0,140,0,720,82,720,124,720,173,720,150,645
        - 236,329,348,285,411,161,473,0,530,0,604,178,458,222,455,269,491,438,572,512,365,633
        - 1120,459,1159,346,1141,319,1086,417,1049,444,991,520,1059,553
    detect:
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
      fps: 5
    objects:
      track:
        - person
    zones:
      driveway:
        coordinates: 754,316,546,190,654,130,741,97,797,101,896,120,977,171,959,260,901,321

    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain: 
        default: 5
    record:
      enabled: true
      retain: 
        days: 1
        mode: all
  Backyard: # <------ Name the camera
    ffmpeg:
      input_args: preset-http-reolink
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: http://192.168.1.123/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=password 
          roles:
            - record
        - path: http://192.168.1.123/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=password
          roles:
            - detect
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 360 # <---- update for your camera's resolution
      fps: 4
    objects:
      track:
        - person
        - dog
        - cat
        - mouse
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      retain: 
        default: 5
    record:
      enabled: true
      retain: 
        days: 1
        mode: all
  Living_Room: # <------ Name the camera
    ffmpeg:
      input_args: -c:v mjpeg -video_size 1280x720
      #input_args: -c:v mjpeg -video_size 1280x720 -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1
      inputs:
        - path: /dev/video0
    record:
      enabled: false
      retain: 
        days: 1
        mode: all
birdseye:
  enabled: False
  mode: continuous

Relevant log output

Logger: homeassistant.components.homekit.type_cameras
Source: components/homekit/type_cameras.py:364
Integration: HomeKit Bridge (documentation, issues)
First occurred: November 7, 2023 at 1:05:53 PM (23 occurrences)
Last logged: 5:20:09 PM

Camera has no stream source

Logger: pyhap.camera
Source: runner.py:188
First occurred: November 7, 2023 at 1:05:53 PM (46 occurrences)
Last logged: 5:20:39 PM

Requested to stop stream for session 0d9dd835-d0d2-474a-a11c-51a679756974, but no such session was found
[d45c5f20-ab78-4d25-9ad5-807d28c8700f] Failed to start/reconfigure stream, deleting session.
Requested to stop stream for session d45c5f20-ab78-4d25-9ad5-807d28c8700f, but no such session was found
[3797f7c0-b622-4f81-8863-48ede53e4ae2] Failed to start/reconfigure stream, deleting session.
Requested to stop stream for session 3797f7c0-b622-4f81-8863-48ede53e4ae2, but no such session was found

FFprobe output from your camera

[rtsp @ 0x5644f5c27700] method SETUP failed: 461 Unsupported transport
Input #0, rtsp, from 'rtsp://192.168.1.10:8554/Front_Door_Full_Res':
  Metadata:
    title           : go2rtc/1.2.0
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt470bg/bt470bg/bt709, progressive), 2688x1520, 15 fps, 15 tbr, 90k tbn
  Stream #0:1: Audio: aac (LC), 8000 Hz, mono, fltp

Frigate stats

No response

Operating system

Debian

Install method

HassOS Addon

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Dahua IPC-HDW5442TM-AS-LED

Any other information that may be helpful

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions