Amcrest AD410 Doorbell

I have integrated my AD410 doorbell into Home Assistant using the built-in amcrest integration and this helpful comment which pointed to @calisro’s bug comment with a workaround for problems with reliability in the Dahua integration.

I now have an entity for the doorbell in Home Assistant with sensors for online, doorbell pressed, human detected, and motion detected.

Here’s exactly what I did (I’m still learning Home Assistant, so please let me know if there’s something I should improve).

configuration.yaml

homeassistant:
  packages: !include_dir_named packages

amcrest: !include amcrest.yaml

secrets.yaml

amcrest_password: "PUT YOUR AMCREST AD410 PASSWORD HERE"

amcrest.yaml

- host: 192.168.XX.XX <-- PUT YOUR AD410 IP HERE
  username: admin
  password: !secret amcrest_password
  name: Front Door Bell
  resolution: high
  stream_source: rtsp
  scan_interval: 15
  binary_sensors:
    - online

Create a directory called packages under the directory that has your configuration.yaml. Put this file in the packages directory.

packages/package_amcrest_triggers.yaml

template:
  - trigger:
      - platform: event
        event_type: amcrest
        id: start
        event_data:
          camera: "Front Door Bell"
          event: CrossRegionDetection
          payload:
            Code: CrossRegionDetection
            action: Start
            data:
              Action: Appear
              Object:
                ObjectType: Human
      - platform: event
        event_type: amcrest
        id: stop
        event_data:
          camera: "Front Door Bell"
          event: CrossRegionDetection
          payload:
            Code: CrossRegionDetection
            action: Stop
            data:
              Action: Appear
              Object:
                ObjectType: Human
    binary_sensor:
      - name: Front Door Bell Human
        icon: mdi:motion-sensor
        state: >-
          {{ 'on' if trigger.id == 'start' else 'off' }}

  - trigger:
      - platform: event
        event_type: amcrest
        id: start
        event_data:
          camera: "Front Door Bell"
          event: AlarmLocal
          payload:
            Code: AlarmLocal
            action: Start
      - platform: event
        event_type: amcrest
        id: stop
        event_data:
          camera: "Front Door Bell"
          event: AlarmLocal
          payload:
            Code: AlarmLocal
            action: Stop
    binary_sensor:
      - name: Front Door Bell Ring
        icon: mdi:doorbell-video
        state: >-
          {{ 'on' if trigger.id == 'start' else 'off' }}

  - trigger:
      - platform: event
        event_type: amcrest
        id: start
        event_data:
          camera: "Front Door Bell"
          event: VideoMotion
          payload:
            Code: VideoMotion
            action: Start
      - platform: event
        event_type: amcrest
        id: stop
        event_data:
          camera: "Front Door Bell"
          event: VideoMotion
          payload:
            Code: VideoMotion
            action: Stop
    binary_sensor:
      - name: Front Door Bell Motion
        icon: mdi:motion
        state: >-
          {{ 'on' if trigger.id == 'start' else 'off' }}
3 Likes

One nice note for people who have this camera and use the camera.snapshot functionality in HA or even the picture glance (which uses the snapshot too). The Amcrest is set to terrible snapshot resolution. THis will change it. DIdn’t brick mine but i’m not responsible for any issues. :slight_smile:

http://admin:[email protected]/cgi-bin/configManager.cgi?action=setConfig&Encode[0].SnapFormat[0].Video.resolution=2560x1920

They will now by High Resolution. To put it back, I think this works:

http://admin:[email protected]/cgi-bin/configManager.cgi?action=setConfig&Encode[0].SnapFormat[0].Video.resolution=720x576

Its honestly beyond me why they cripple the camera with this low resolution crap.

1 Like