Reolink E1 Zoom and/or Pro in HA

Hello @Chaoscontrol could you please share the configuration you set in Frigate to integrate E1 Pro?
Thanks

Here you go @GitWally. I also left the config of the Reolink Doorbell in case it’s useful for anyone.

go2rtc:
  log:

  # AAC Audio required for recordings and detection, Opus required only for webRTC Live View (2-way audio)
  streams:
    doorbell: # Reolink Doorbell WiFi
      - rtsp://admin:[email protected]:554/h264Preview_01_main
      - ffmpeg:doorbell#audio=aac#audio=volume
      - ffmpeg:doorbell#audio=opus#audio=volume # Opus required for 2-way audio
    reolink: # Reolink E1 Pro broken night vision
      - rtsp://admin:[email protected]:554/h264Preview_01_main
      - ffmpeg:reolink#audio=aac#audio=volume

  ## Frigate docs recommend HTTP+FLV connection for Reolink Doorbell, but only RTSP allows for 2-way audio AFAIK, need testing
  ## #video=copy is needed for a single line ffmpeg config when using audio tags, or else video stream is dropped

## THIS INCREASES VOL AND PREVENTS THE AUDIO COMING OUT FROM THE CAMERA SOUNDING MUFFLED
## Source https://www.youtube.com/watch?v=upXyBVMR4RM

  ffmpeg:
    volume: -af "volume=30dB"

cameras:

  doorbell:
    # enabled: false
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/doorbell
          roles:
            - record
            - detect
            - audio
    live:
      stream_name: doorbell
    detect:
      width: 1280
      height: 960
      fps: 5
    #birdseye:
    #  order: 1
    zones:
      Front_garden:
        coordinates: 0.131,0.582,0.373,0.584,0.631,0.586,0.63,0.613,1,0.751,1,1,0.002,0.999,0,0.647
        loitering_time: 0
      Drivewayfront:
        coordinates: 0.773,0.579,0.838,0.596,1,0.636,1,0.757,0.621,0.61,0.63,0.597,0.734,0.578
        # objects:
        #   - person
        #   - car
        loitering_time: 0
    review:
      alerts:
        labels:
          - person
          - car
        required_zones:
          - Front_garden
          - Drivewayfront

    motion:
      mask: 
        0,0.429,0.13,0.433,0.201,0.337,0.565,0.341,0.568,0.433,0.871,0.412,0.896,0.389,0.975,0.436,0.999,0.436,0.999,0.003,0.002,0

  reolink:
    # enabled: false
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/reolink
          roles:
            - record
            - detect
            - audio
    live:
      stream_name: reolink
    detect:
      width: 1280
      height: 720
      fps: 5
    #birdseye:
    #  order: 2
    onvif:
      host: 192.168.1.138
      port: 8000
      user: admin
      password: redacted
    zones:
      Drivewayside:
        coordinates: 0,0.59,0.273,0.577,0.658,0.889,0.722,0.006,1,0,1,1,0.257,1
        inertia: 25
    review:
      alerts:
        labels:
          - person
          - car
        required_zones:
          - Drivewayside

Thanks for sharing!
The problem I have now is why I don’t see PTZ controls even if I added ONVIF.

May be E1 PRO is not ONVIF conformant since it is not listed?

I tried also to add it with ONVIF integration but I cannot see controls anyhow to move around the camera from HA, while it can be managed by its own app.

I think it’s a matter of your own setup. I can assure you it works. Buttons show in Frigate for me (last beta, but they also did in 0.14), and they work just fine. Also in the Frigate card.

Check your logs to make sure there’s no ONVIF related error. I think I had to enable ONVIF through the Reolink PC app. In the mobile app the option didn’t show IIRC.

1 Like

Many thanks!
Now I can PTZ buttons!

Hello @Chaoscontrol you say:

Could you paste also the configuration you use?
Frigate card documentation says it should be “out of the box”, if the engine is Frigate itself, and in Frigate you see PTZ controls.

But in my card I can’t see any PTZ control!
Thanks again

Since Frigate updated to 0.14 I haven’t been using the card itself, as I prefer using the Frigate UI, but here it is, and it still works.

The PTZ is used by using HA action calls. I don’t remember why and I think I originally had it a different way, but I believe it was more reliable (or I just liked the buttons more) this way so I changed it.

type: custom:frigate-card
cameras:
  - live_provider: go2rtc
    camera_entity: camera.reolink
view:
  default: live
  camera_select: live
  scan:
    enabled: true
menu:
  style: hover-card
  position: top
  buttons:
    microphone:
      enabled: true
      type: toggle
      priority: 49
    mute:
      enabled: true
      priority: 50
    download:
      enabled: false
    fullscreen:
      priority: 45
    media_player:
      priority: 40
    frigate:
      enabled: false
    live:
      priority: 100
    recordings:
      enabled: true
    cameras:
      enabled: false
    clips:
      enabled: false
    snapshots:
      enabled: false
live:
  lazy_load: true
  controls:
    builtin: false
    title:
      mode: none
    next_previous: {}
    thumbnails:
      mode: none
  transition_effect: none
  draggable: true
media_gallery:
  controls:
    thumbnails:
      show_details: true
      show_download_control: false
      size: 75
elements:
  - type: state-badge
    entity: sensor.wiser_lts_temperature_kitchen
    style:
      right: "-20px"
      bottom: "-100px"
      color: rgba(0,0,0,0)
      opacity: 0.5
  - type: custom:frigate-card-conditional
    conditions:
      camera:
        - camera.reolink
    elements:
      - type: custom:frigate-card-ptz
        style:
          transform: none
          left: 42%
          bottom: 5%
        actions_left:
          start_tap_action:
            action: call-service
            service: frigate.ptz
            service_data:
              entity_id: camera.reolink
              action: move
              argument: left
          end_tap_action:
            action: call-service
            service: frigate.ptz
            service_data:
              entity_id: camera.reolink
              action: stop
        actions_right:
          start_tap_action:
            action: call-service
            service: frigate.ptz
            service_data:
              entity_id: camera.reolink
              action: move
              argument: right
          end_tap_action:
            action: call-service
            service: frigate.ptz
            service_data:
              entity_id: camera.reolink
              action: stop
        actions_down:
          start_tap_action:
            action: call-service
            service: frigate.ptz
            service_data:
              entity_id: camera.reolink
              action: move
              argument: down
          end_tap_action:
            action: call-service
            service: frigate.ptz
            service_data:
              entity_id: camera.reolink
              action: stop
        actions_up:
          start_tap_action:
            action: call-service
            service: frigate.ptz
            service_data:
              entity_id: camera.reolink
              action: move
              argument: up
          end_tap_action:
            action: call-service
            service: frigate.ptz
            service_data:
              entity_id: camera.reolink
              action: stop
dimensions:
  aspect_ratio: "4:3"

Also I like much more the Frigate UI, but since I am the only admin and I need other people to do some things, I still use the Frigate Card.

As far as I can see to get buttons in the Frigate Card you have to add PTZ controls adding elements.

But in the documentation I found:

The card supports using PTZ controls to conveniently control pan, tilt and zoom for cameras. If you’re using a Frigate camera, and Frigate itself shows PTZ controls, this should work straight out of the box without any extra configuration:

That’s why I was wondering what was wrong in my card.

Anyhow, thanks again for big time saving!

EDIT

I was wrong, and happened across the answer buried above in the thread.

If you’re not getting presets to work with only the ONVIF integration, check logs. You should have an error related to presets, and it should list available presets:. If not reload the ONVIF integration. That was my problem, I hadn’t reloaded the integration. At that point when I tried an action: I got a list of presets in the error log which I input into the action, and all works with just ONVIF.

Original Comment

Just wanted to give a report on the E1 Pro.

I was able to gain the control I wanted with a combination of the ONVIF integration and Frigate, although I suppose all you need is Frigate. (I think there area few extra sensors exposed to HA with the ONVIF integration).

Screenshot of ONVIF device with sensors showing (these are the motion / person / etc sensors from the E1 Pro)

I wasn’t able to get pan/tilt presets working with just the HA ONVIF integration however Frigate can handle the presets, and you can use a HA action to send a MQTT to Frigate to tell the camera to go to its preset.

HA Action to Publish MQTT to control Frigate which controls E1 Pro

action: mqtt.publish
data:
  evaluate_payload: false
  qos: 0
  retain: false
  topic: frigate/frigate_reolink_e1/ptz
  payload: preset_1

Frigate Config Entry

  frigate_reolink_e1:
    ffmpeg:
      inputs:
        - path: rtsp://admin:<password>@192.168.XXX.XXX:554/Preview_01_sub
          roles:
            - detect
        - path: rtsp://admin:<password>@192.168.XXX.XXX:554/Preview_01_main
          roles:
            - record
    detect:
      enabled: true # <---- turn on detection
    onvif:
      host: 192.168.XXX.XXX
      user: admin
      password: <password>

and a script to send the MQTT

alias: Send E1 - Shop to Center
sequence:
  - action: mqtt.publish
    data:
      evaluate_payload: false
      qos: 0
      retain: false
      topic: frigate/frigate_reolink_e1/ptz
      payload: preset_1

Cheers!