Skip to content

Automations and Polling Interval Variability #143

@5ur3n

Description

@5ur3n

Hi there

After a bit of messing about with my AX Pro, I have discovered a way to get motion detection events even when the alarm is not armed. This has spectacular automation and energy saving potential. I have described it here: https://community.home-assistant.io/t/hikvision-ax-pro-alarm/541882/5?u=5ur3n

However, to do something like turn the lights on when motion is detected, I've had to set the polling interval down to 1-2 seconds, but this causes the alarm to behave erratically, for instance,

  • I sometimes have to try multiple times to open gates or disarm, even with the keyfob.
  • The latency of loading the web ui or refreshing the app is a lot higher
  • Sometimes the alarm refuses to respond to a silence alarm for a minute or more.
  • PIRCam picture on demand times out in the HikConnect app.

My assumption here is that with 45-odd devices on the AX Pro, refreshing frequently might be maxing out the CPU or other resources and worsening latency.

I'm not very familiar with the ISAPI interfaces, but is it possible to create a workaround for this problem? Some ideas that could perhaps work:

  • have an asynchronous update back to Hass for a specific sensor
  • perhaps a group of sensors that are polled with higher frequency than the others
  • I'm not sure if the implementation is refreshing all configs when it refreshes or merely updating statuses for sensors it is already aware of, but perhaps minimizing the volume of calls will help.
  • I'm not sure if there is something like a CPU usage call but there isn't anything obvious in HikConnect to help with this.

My hypothesis here is that load reduction would mitigate the erratic behavior by reducing load on the hub with frequent calls. Of course, I have very little data to support this since there are no errors in the logs that I have seen.

What are your thoughts? Is this worth thinking about given the potential for smart automation?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions