ONVIF & Amcrest IP5M-T1179E

I am setting up my Amcrest I P5M-T1179E with HA.
The following entities are auto discovered.

I first tried using the Amcrest integration but the motion detected and connected sensor lost connection every minute or so but they did change state.

I tried the custom Amcrest integration and this worked ok for the binary sensor motion however my system was struggling, high running temp, excess mem. and CPU.

I then tried the ONVIF Integration and I get

image

problem is they never change state, I know the camera has triggered a motion alarm as I get a push notification from the Amcrest App.

The camera streams are fine with ONVIF., am I missing some setting in the camera or in my configuration?

I looked on the Amcrest website for a firmware update but nothing listed for my particular model no.

The amcrest integration will have a new option in 0.113 for the motion detection binary sensor to use the older polling method instead of the newer event streaming method. It seems some newer Amcrest camera models and/or firmware versions have changed their HTTP API and don’t work with the streaming mode. Amcrest refuses to admit this has changed, and hence will not provide an updated spec. So the best I could do was to make the older polling method available again as an option which seems to work with some camera models/versions where the streaming method does not.

I tried setting up as https://www.home-assistant.io/integrations/amcrest/ and it works apart from getting the constant disconnects.

I then tried your modified files https://github.com/pnbruckner/homeassistant-config/blob/0682cd8b69e92177942cbc3a9deb48e231eff68b/docs/amcrest.md

binary sensory motion detected worked fine but my HA was becoming unstable`.

So If I understand you correctly in 0.113 using the original integration is going to solve this? will the connected (online) sensor be available

Knowing nothing about ONVIF any ideas why the sensors are discovered but not working?

Regards,

That custom integration is so old I’m surprised it works at all.

0.113 has all the recent changes I’ve made to the amcrest integration. If something still doesn’t work for you please check any existing issues and open a new one if it isn’t covered.

However, as I’ve already said, the main problem now is that Amcrest has changed the way these cameras are controlled via the network but has not admitted that they’ve done so, and consequently will not provide an updated specification covering those changes. So there’s not much I can do about that.

Regarding ONVIF, I don’t know a lot about it, other than the Amcrest cameras, in theory, support it. I’ve not personally tried to use the onvif integration with my Amcrest cameras because they all still work with the amcrest integration.

Hi,

It is still the same in 0.113.0

my configuration.yaml

amcrest:
    host: 192.168.0.254
    username: admin
    password: redacted
    binary_sensors:
      - motion_detected
      - online
    sensors:
      - sdcard

so I get the binary sensors and Camera Okay for 1 min then disconnected for 1 minute.

Out of curiosity do you have a separate user / password in the Camera for HA ?

That’s because you haven’t changed the config to use the polled mode. This:

    binary_sensors:
      - motion_detected

should be this:

    binary_sensors:
      - motion_detected_polled

See doc.