Platform error: camera - Requirements for ezviz not found: ['pyezviz==0.1.5']

How to send snapshot notification by telegram, by using the last_alarm_pic sensor provided by this integration?

I was considering something like

service: notify.marco
data_template:
message: pics
data:
photo:
url:
{{states (‘sensor.camera.sala.last_alarm_pic’)}}

But it seems wrong. Can somebody drive me in the correct direction?

Guys in hassio I am able to add ezviz but it says invalid authentication. I have logged on the mobile device to ensure password worked. However, maybe the region could be wrong. any ideas?

Same for me. I turned off 2-factor auth too. It always says invalid authentication. I think it has something to do with the region, even though EU seems correct, since I’m in Italy. I found nothing relevant in the logs.

I have my EZVIZ DB1 already working through Frigate, but I wanted to check if with @RenierM’s integration I could have the ring event for the doorbell in HA. Right now I’m using a zigbee device to intercept when someone rings the DB1 so I can stream the video on Echo devices.

Got it to work, under the API URL.
Apiius.ezvizlife.com and it worked

1 Like

Read your post, reconfigured, and selected “customize” for the url. apiieu.ezvizlfe.com appeared, and finally it worked.

@RenierM I finally got the component configured. I have a DB1. I checked the list of sensors/entities available, but I can’t find what I was looking for: a sensor to detect when someone rings the doorbell, pressing the button on the DB1. Is there such an event in the API that could be implemented?

Thanks a lot.

Hi @RenierM,
Apologies if I have missed this further up this thread but I see the official integration is back, seems to be working and you are including some of your code in it so was wondering how this fit with your Beta one please. Is it a case of just using one of the other and are effectively merging now? Thanks

Hi @pete101,

The Beta is where I test new features and where people can log requests etc. The goal is always to improve the official integration. At the moment the only difference is the alarm integration but I will soon be testing MQTT alarm push notifications. It’s mostly trial/error/reverse engineering as there’s no official API for consumers.

1 Like

Just and update to let you know that the snapshot service is working now on latest HA, with same service call as per original referenced message.

Cheers

I have 4 same cams, tring to integrate in Frigate, but video is blurry, any idea?


  living:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected]:554/h.264
          roles:
            - detect
            - rtmp
            - clips
            - record
    width: 1920
    height: 1080
    fps: 5

Hey @alexdelprete, are you using the main or sub stream with Frigate?, do you mind sharing your Frigate config for the DB1?

I was able to get it working using the sub stream for live and snapshots but it won’t work with the main stream.

Sub Stream Config:-

cameras:
  frontdoor:
    ffmpeg:
      hwaccel_args:
        - -c:v
        - h264_v4l2m2m
      inputs:
        - path: rtsp://admin:[email protected]:554/streaming/channels/102/
          roles:
            - detect
            - clips
    width: 384
    height: 512
    fps: 5

Main Stream Config:-

cameras:
  frontdoor:
    ffmpeg:
      hwaccel_args:
        - -c:v
        - h264_v4l2m2m
      inputs:
        - path: rtsp://admin:[email protected]:554/streaming/channels/101/
          roles:
            - detect
            - clips
    width: 1536
    height: 2048
    fps: 5

As per frigate documentation, for detection I used the substream and for recording/clips I use the main stream.

This is my full cameras config (with comments etc.)

cameras:
  # Required: name of the camera
  citofono:
    # Required: ffmpeg settings for the camera
    ffmpeg:
      # Required: A list of input streams for the camera. See documentation for more information.
      inputs:
        # Required: the path to the stream
        # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}
        - path: rtsp://admin:admin:[email protected]:554/Streaming/Channels/102
          # Required: list of roles for this stream. valid values are: detect,record,clips,rtmp
          # NOTICE: In addition to assigning the record, clips, and rtmp roles,
          # they must also be enabled in the camera config.
          roles:
            - detect
        - path: rtsp://admin:[email protected]:554/Streaming/Channels/101
          roles:
            - rtmp
            - clips
            - record
    # Required: width of the frame for the input with the detect role
    width: 384
    # Required: height of the frame for the input with the detect role
    height: 512
    # Optional: desired fps for your camera for the input with the detect role
    # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
    #       Frigate will attempt to autodetect if not specified.
    fps: 5

    # Optional: camera level motion config
    motion:
      # Optional: motion mask
      # NOTE: see docs for more detailed info on creating masks
      mask: 0,0,1000,0,1000,200,0,200

    # Optional: timeout for highest scoring image before allowing it
    # to be replaced by a newer image. (default: shown below)
    best_image_timeout: 60

    # Optional: zones for this camera
    zones:
      # Required: name of the zone
      # NOTE: This must be different than any camera names, but can match with another zone on another
      #       camera.
      front_steps:
        # Required: List of x,y coordinates to define the polygon of the zone.
        # NOTE: Coordinates can be generated at https://www.image-map.net/
        coordinates: 545,1077,747,939,788,805
        # Optional: Zone level object filters.
        # NOTE: The global and camera filters are applied upstream.
        filters:
          person:
            min_area: 5000
            max_area: 100000
            threshold: 0.7

    # Optional: Camera level detect settings
    detect:
      # Optional: enables detection for the camera (default: True)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: double the frame rate)
      max_disappeared: 10

    # Optional: save clips configuration
    clips:
      # Required: enables clips for the camera (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: Number of seconds before the event to include in the clips (default: shown below)
      pre_capture: 30
      # Optional: Number of seconds after the event to include in the clips (default: shown below)
      post_capture: 30
      # Optional: Objects to save clips for. (default: all tracked objects)
      # objects:
      #   - person
      #   - car
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 5
        # Optional: Per object retention days
        objects:
          person: 5

    # Optional: 24/7 recording configuration
    record:
      # Optional: Enable recording (default: global setting)
      enabled: False
      # Optional: Number of days to retain (default: global setting)
      retain_days: 5

    # Optional: RTMP re-stream configuration
    rtmp:
      # Required: Enable the live stream (default: True)
      enabled: True

    # Optional: Configuration for the jpg snapshots written to the clips directory for each event
    snapshots:
      # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: True
      # Optional: print a timestamp on the snapshots (default: shown below)
      timestamp: False
      # Optional: draw bounding box on the snapshots (default: shown below)
      bounding_box: False
      # Optional: crop the snapshot (default: shown below)
      crop: False
      # Optional: height to resize the snapshot to (default: original size)
      height: 270
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 5
        # Optional: Per object retention days
        objects:
          person: 5

Thanks, do you get high resolution clips?, with this same config I only get low resolution clips, below is my initial config, if I specify a higher width x height there is no image.

cameras:
  frontdoor:
    ffmpeg:
      hwaccel_args:
        - -c:v
        - h264_v4l2m2m
      inputs:
        - path: rtsp://admin:[email protected]:554/streaming/channels/102
          roles:
            - detect
        - path: rtsp://admin:[email protected]:554/streaming/channels/101/
          roles:
            - clips
    width: 384
    height: 512
    fps: 5

Before last update of frigate, I had high-res clips, since latest update I noticed I had NO CLIPS at all, but I guess it’s my fault because I’ve upgraded without reading the changelog, so probably something’s changed. I was busy on other projects, but I’ll see what changed and try to fix it, but it’s not related to the settings I believe because I have detection events but no clips.

I’m on Frigate 1.13 integration with the 1.1.2 component.

I have had the Ezviz LC1 added through integrations and it has come a great way since the beginning. The problem I am having is every time there is a motion trigger the alarm is sounded automatically without any automation etc.

Does anyone else have the same issue

Hi Marco, not sure if you found a solution, but I send a notification including the last_alarm_pic image using script below. Error might be related to single and double single quotes or the name of the sensor:

service: notify.mobile_app_iphone
data:
  title: Alarm
  message: >-
    Alarm {{now().strftime("%H:%M:%S %d/%m/%Y")}}
  data:
    image: '{{states(''sensor.db1_c8XXXXX_last_alarm_pic'')}}'

Hi, I notice the DB1 last_alarm_pic sensor url contains a jpg of the actual motion which is most relevant (triggered the alarm). This image seems more relevant compared to the snapshots taken with my HA automations which get triggered as soon as a motion is detected.
In order to allow local storage of this last_alarm_pic, I have found a way to setup a generic camera based on the Ezviz last_alarm_pic sensor, including overcoming the http 302 AWS S3 redirection:

configuration.yaml :

camera:
  - platform: generic
    name: Voordeur DB1 last alarm pic
    still_image_url: "{{ state_attr('sensor.voordeur_last_alarm_pic_curl', 'location') }}"
    limit_refetch_to_url_change: true
    #verify_ssl: false
sensor:
  - platform: command_line
    name: Voordeur last alarm pic curl
    command: 'curl -I -s "{{states("sensor.db1_cXXXXXX_last_alarm_pic")}}" | grep Location: | awk {''print "{\"location\": \""$2"\"}"''}'
    scan_interval: 30
    json_attributes:
         - "location"
    value_template: 'ok'

Based on this new generic camera, every new last_alarm_pic can be stored with an automation similar to:

alias: Voordeur DB1 save last alarm pic snapshot
description: ''
trigger:
  - platform: state
    entity_id: sensor.db1_cXXXXXX_last_alarm_pic
    to:
condition: []
action:
  - service: camera.snapshot
    entity_id: camera.voordeur_db1_last_alarm_pic
    data:
      filename: >-
        /config/recordings/{{ now().strftime("%Y%m%d-%H%M%S")
        }}_1voordeur_last_alarm_pic.jpg
mode: single

Hi, Just got my 2nd Eziviz camera, a TY1. Has anyone been able to turn the auto tracking feature on and off fro HA please as I don’t seem to be able to find a way (I only what it to auto track when it is armed) . The Integration can read the mobile_tracking field, which is the correct Ezviz setting, as a switch but it seems to be read only as updating the switch in HA does not turn it On/Off in Ezviz. Thanks

Hi @alexdelprete , I’m from Italy too… but I’m not able to login.
I turned off 2-factor, I double check my credentials (I’m able to login from app) and I use the eu api.

how did you solve?

I uninstalled it. :slight_smile: