Frigate Lovelace Card + Camera Detection Switch Overlay

I know this is a very old topic. But I switched to the native frigate card PTZ implementation.

Config of card can be found here: dermotduffy/frigate-hass-card: A Lovelace card for Frigate in Home Assistant (github.com)
Most config examples are explained here: PTZ Config Examples · AlexxIT/WebRTC Wiki (github.com)

My config for an IMOU camera:

cameras:
  - camera_entity: camera.fynncam_highres
    live_provider: ha
view:
  default: live
menu:
  style: none
live:
  zoomable: true
elements:
  - type: custom:frigate-card-conditional
    conditions:
      media_loaded: true
      view:
        - live
        - image
    elements:
      - type: custom:frigate-card-ptz
        orientation: horizontal
        style:
          right: 85%
          top: 75%
          transform: scale(3, 3)
        service: imou_life.ptz_move
        data_left:
          device_id: 409787523270cd6a136ece46e403f8fa
          duration: 250
          operation: LEFT
        data_right:
          device_id: 409787523270cd6a136ece46e403f8fa
          duration: 250
          operation: RIGHT
        data_up:
          device_id: 409787523270cd6a136ece46e403f8fa
          duration: 250
          operation: UP
        data_down:
          device_id: 409787523270cd6a136ece46e403f8fa
          duration: 250
          operation: DOWN

Which looks like this:

image

Just figured out how to enable frigate-card to handle PTZ. I have Amcrest cameras. Following are my setups.
1, you need to create Amcrest integration, which must be done in config/config.yml Amcrest - Home Assistant This creates amcrest.ptz_control service. If you have other camera brand, you need to figure out how to get ptz control service. frigate card need to use this service to handle PTZ control of the camera.
2, follow GitHub - dermotduffy/frigate-hass-card: A Lovelace card for Frigate in Home Assistant frigate-card-ptz to complete the setup. Note, you need frigate-card-conditional to tell the cameras apart.

My setup also uses go2rtc. I am posting it below for your reference. Note, I have one camera capable to handle two-way audio and the other one doesn’t

type: custom:frigate-card
cameras:
  - camera_entity: camera.great_room
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc
      stream: great_roomFeed
  - camera_entity: camera.study
    live_provider: go2rtc
    go2rtc:
      stream: studyFeed
menu:
  buttons:
    timeline:
      enabled: false
    microphone:
      enabled: true
    download:
      enabled: false
    cameras:
      enabled: false
live:
  controls:
    next_previous:
      style: none
  microphone:
    always_connected: false
elements:
  - type: custom:frigate-card-conditional
    conditions:
      camera:
        - camera.great_room
    elements:
      - type: custom:frigate-card-ptz
        service: amcrest.ptz_control
        style:
          right: 0%
          top: 70%
          background: rgba(255, 255, 255, 0.0)
        data_left:
          entity_id: camera.great_room_ptz
          movement: left
        data_right:
          entity_id: camera.great_room_ptz
          movement: right
        data_up:
          entity_id: camera.great_room_ptz
          movement: up
        data_down:
          entity_id: camera.great_room_ptz
          movement: down
  - type: custom:frigate-card-conditional
    conditions:
      camera:
        - camera.study
    elements:
      - type: custom:frigate-card-ptz
        service: amcrest.ptz_control
        style:
          right: 0%
          top: 70%
          background: rgba(255, 255, 255, 0.0)
        data_left:
          entity_id: camera.study_ptz
          movement: left
        data_right:
          entity_id: camera.study_ptz
          movement: right
        data_up:
          entity_id: camera.study_ptz
          movement: up
        data_down:
          entity_id: camera.study_ptz
          movement: down
2 Likes

Thanks benchen. Your config example really helped me get my Reolink E1 Pros going.

I added the Onvif integration and configured my camera there then was able to use the service: onvif.ptz.

Then I referenced this configuration as well to guide me: PTZ Config Examples · AlexxIT/WebRTC Wiki · GitHub

Does anyone know what the controls of frigate.ptz are?

    elements:
      - type: custom:frigate-card-ptz
        orientation: horizontal
        style:
          right: 85%
          top: 75%
          transform: scale(3, 3)
        service: frigate.ptz
        data_left:
          entity_id: camera.fynncam
          action: move
          argument: left

Works but keeps on going left. I don’t know how to stop or set a duration. Adding duration gives an error.