Amcrest AD410 no changes to entities

I have my amcrest AD410 doorbell connected through ONVIF. Video comes through just fine but I’m not seeing any updates to the entities when it detects a human or someone pushes the doorbell. I’ve rebooted the doorbell and still not seeing any activity show up. Has anyone experienced this? I noticed one other post about this but it never went anywhere. Is there any way to debug this and see if its the camera or HA? Also, everything comes through fine on the phone app, all alerts show up right away.

Yes I have. Now I use the ‘amcrest’ integration and I simply did this and it works great. You could do the same for onvif I’d guess.

amcrest:
  - host: 10.100.1.143
    username: admin
    password: xxxxxx
    name: Front Door Bell
    resolution: high
    stream_source: rtsp
    scan_interval: 15
    binary_sensors:
      - online
    switches:
      - privacy_mode
  - host: 10.100.1.143
    username: admin
    password: xxxxxxx
    name: Front Door Bell Sub
    resolution: low
    stream_source: rtsp
    scan_interval: 305
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: CallNoAnswered
          payload:
            code: CallNoAnswered
            action: Start
      - platform: event
        event_type: amcrest
        id: stop
        event_data:
          camera: "Front Door Bell"
          event: CallNoAnswered
          payload:
            code: CallNoAnswered
            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
            data:
              Action: Appear
              object:
      - platform: event
        event_type: amcrest
        id: stop
        event_data:
          camera: "Front Door Bell"
          event: VideoMotion
          payload:
            code: VideoMotion
            action: Stop
            data:
              Action: Appear
    binary_sensor:
      - name: Front Door Bell Motion
        icon: mdi:motion
        state: >-
          {{ 'on' if trigger.id == 'start' else 'off' }}

and I removed those sensors from the integration. So now I alert off the events instead directly. i think the integration wasn’t built for the AD410. BTW, this isn’t ESPHome?

1 Like

Upping your logging level on onvif and its other logging tags is the first thing.

The loggers are here https://github.com/home-assistant/core/blob/3166d4895ffcbc3c26703dc65d84feec6e83f96c/homeassistant/components/onvif/manifest.json

And see Logger - Home Assistant

1 Like

I’ll give this template a try. i was looking at the amcrest specific template when i saw a post where they added digital button binary was added specifically for the AD410.

Weird i didn’t even realize i posted in ESP home. I hate the ui for this forum, navigation sucks. Hugo and flipperone use it too. If an @admin see’s this feel free to move it.

@calisro

How did you install the Amcrest integration? It doesn’t come up in the integrations list when I try to add it in HA. I currently;y have the dahua integration installed and I am having the same issue with entities as the OP.

@nickrout

So this would be a manual integration? Not something that loads itself automatically from the integrations page?

It is configured in yaml not gui. I haven’t heard the word ‘manual’ used in that context.

@nickrout Thanks. I’ll give it a shot. I’m new to HA.

So I put all that information above into my configuration.yaml. I did find the entities and put them on a card in the dashboard. However, only one seems to show the state of the sensor. The others indicate “unknown”. The stream from the camera works.

@calisro

Thank you for this, working excellent! However, human detection is stuck on “unknown” on latest firmware. Have you seen this? Thanks!

No I haven’t seen this but I haven’t updated? What firmware and when did you update?

If you go to developer tools, and you go to the events tab and you listen on ‘amcrest’, you should be able to trigger the human detection and see the events that it creates. Perhaps they changed something? If you can post those events, I can take a look. I’m guessing the stop event is triggering differently. I don’t want to update mine yet so I can compare new vs old and come up with a event listener that is common to both.

@calisro

Restarted my camera and human detection started working, turns out it wasn’t working in-app either.
The firmware version I have is: 1.000.0000000.7.R.210220

1 Like

@calisro

Something else I discovered is that the once a human is detected, the binary sensor remains on until the HA is restarted. Is it possible to set a timeout for the template? Meaning if a human has not been detected for X amount of time, then the binary sensor reverts to off.

I don’t have this issue. You need to look at the events tab listening on “amcrest” and capture a human detected start and stop.

Yeah, I see the stop come through but the binary sensor is stuck on. Even after restart it’s stuck on. Very strange.

START

event_type: amcrest
data:
  camera: Doorbell
  event: CrossRegionDetection
  payload:
    Code: CrossRegionDetection
    action: Start
    index: "0"
    data:
      Action: Cross
      CfgRuleId: 2
      Class: Normal
      CountInGroup: 0
      DetectRegion:
        - - 3293
          - 5167
        - - 2484
          - 5893
        - - 2743
          - 7647
        - - 7849
          - 7491
        - - 5012
          - 5487
        - - 4776
          - 4886
      Direction: Enter
      EventID: 10001
      EventSeq: 0
      FrameSequence: 9329
      GroupID: 0
      Mark: 0
      Name: IVS-1
      Object:
        Action: Appear
        Age: 0
        Angle: 0
        Bag: 0
        BagType: 0
        BoundingBox:
          - 3592
          - 2304
          - 5128
          - 8016
        CarrierBag: 0
        Center:
          - 4360
          - 5160
        Confidence: 0
        DownClothes: 0
        Express: 0
        FaceFlag: 0
        FaceRect:
          - 0
          - 0
          - 0
          - 0
        FrameSequence: 9329
        Gender: 0
        Glass: 0
        HairStyle: 0
        HasHat: 0
        Helmet: 0
        HumanRect:
          - 0
          - 0
          - 0
          - 0
        LowerBodyColor:
          - 0
          - 0
          - 0
          - 0
        MainColor:
          - 0
          - 0
          - 0
          - 0
        MessengerBag: 0
        ObjectID: 1
        ObjectType: Human
        Phone: 0
        RelativeID: 0
        SerialUUID: ""
        ShoulderBag: 0
        Source: 0
        Speed: 0
        SpeedTypeInternal: 0
        Umbrella: 0
        UpClothes: 0
        UpperBodyColor:
          - 0
          - 0
          - 0
          - 0
        UpperPattern: 0
      PTS: 42950682580
      Priority: 0
      RuleID: 2
      RuleId: 2
      Source: -1
      Track: []
      UTC: 1662416730
      UTCMS: 694
origin: LOCAL
time_fired: "2022-09-06T03:25:30.764413+00:00"

STOP

event_type: amcrest
data:
  camera: Doorbell
  event: CrossRegionDetection
  payload:
    Code: CrossRegionDetection
    action: Stop
    index: "0"
    data:
      Action: Cross
      CfgRuleId: 2
      Class: Normal
      CountInGroup: 0
      DetectRegion:
        - - 3293
          - 5167
        - - 2484
          - 5893
        - - 2743
          - 7647
        - - 7849
          - 7491
        - - 5012
          - 5487
        - - 4776
          - 4886
      Direction: Enter
      EventID: 10001
      EventSeq: 0
      FrameSequence: 9329
      GroupID: 0
      Mark: 0
      Name: IVS-1
      Object:
        Action: Appear
        Age: 0
        Angle: 0
        Bag: 0
        BagType: 0
        BoundingBox:
          - 3592
          - 2304
          - 5128
          - 8016
        CarrierBag: 0
        Center:
          - 4360
          - 5160
        Confidence: 0
        DownClothes: 0
        Express: 0
        FaceFlag: 0
        FaceRect:
          - 0
          - 0
          - 0
          - 0
        FrameSequence: 9329
        Gender: 0
        Glass: 0
        HairStyle: 0
        HasHat: 0
        Helmet: 0
        HumanRect:
          - 0
          - 0
          - 0
          - 0
        LowerBodyColor:
          - 0
          - 0
          - 0
          - 0
        MainColor:
          - 0
          - 0
          - 0
          - 0
        MessengerBag: 0
        ObjectID: 1
        ObjectType: Human
        Phone: 0
        RelativeID: 0
        SerialUUID: ""
        ShoulderBag: 0
        Source: 0
        Speed: 0
        SpeedTypeInternal: 0
        Umbrella: 0
        UpClothes: 0
        UpperBodyColor:
          - 0
          - 0
          - 0
          - 0
        UpperPattern: 0
      PTS: 42950682580
      Priority: 0
      RuleID: 2
      RuleId: 2
      Source: -1
      Track: []
      UTC: 1662416730
      UTCMS: 694
origin: LOCAL
time_fired: "2022-09-06T03:26:02.354033+00:00"

TEMPLATE

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

Hmmmm. Why is yours different?

Mine:

event_type: amcrest
data:
  camera: Front Door Bell
  event: CrossRegionDetection
  payload:
    Code: CrossRegionDetection
    action: Stop
    data:
      Action: Appear
      Object:
        Action: Appear
        ObjectType: Human

Yours:

event_type: amcrest
data:
  camera: Doorbell
  event: CrossRegionDetection
  payload:
    Code: CrossRegionDetection
    action: Stop
    data:
      Action: Cross
      Object:
        Action: Appear
        ObjectType: Human

It should be easy to fix but I am unclear as to why yours is different.

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

I believe the above will work for BOTH mine and yours. Give it a try.

I have the SAME firmware as you as well. What region is your firmware? Mine is Eng_N_V1 on the device info page.

This was really helpful to get my AD410 set up. I made this post to document everything I did to get the AD410 working well for me.

I didn’t use the sub stream at all, since it seemed to be the same video quality as the main stream as far as I could tell.

The sub is lower quality BUT I don’t use that either anymore. I really only use the amcrest integration for events. I then use go2rtc for all the video connections and 2-way calling with the bell. I don’t even use the camera entity that the amcrest integration creates anymore. It’s simply for events which works flawlessly in that respect.