Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real time update and sensor excluding #157

Closed
valenteemanuele opened this issue Jan 21, 2025 · 4 comments
Closed

Real time update and sensor excluding #157

valenteemanuele opened this issue Jan 21, 2025 · 4 comments
Assignees
Labels
duplicate This issue or pull request already exists invalid This doesn't seem right wontfix This will not be worked on

Comments

@valenteemanuele
Copy link

Hi, I would like to raise a problem and/or improvement. I noticed that the status of the sensors updates every 30 seconds. it would be useful to update it in real time or near real time (for example, if the state of the magnetic opening sensor was real time as it happens on the original app, I could use that sensor for other uses). I also noticed that if I set the alarm control unit to respond to the European warning and confirmation requirement in the event of sensor exclusion (essentially when you try to arm the alarm and you have an open window, it asks you for confirmation on the exclusion), the integration stops . it would therefore be advisable to expressly ask to exclude a sensor before arming the alarm.

@petrleocompel
Copy link
Owner

  1. Part of this is a problem PIR trigger sensor - AX Pro event handling #2
    Real-time updates not really possible since there is not "streaming" of all events from LAN API.

  2. Exclusion is also not possible due missing API again.
    If there is API it is undocumented an HikVision closed API under "login" and "partner" account.

I am basically going with my "free-time" and testing and trying (kinda reverse engineering) the device API.

  • Documents found around the internet.

I do not know how to more react because of lacking API documentation and HikVision LAN support.

@valenteemanuele
Copy link
Author

ok, thanks. but in the code in init and I see that it inherits SCAN INTERVAL which is precisely 30 seconds. Is it not possible to reduce it to 5 seconds? because currently the status of the sensors is updated anyway... the only problem is that it requires updating every 30 seconds.

@petrleocompel
Copy link
Owner

It is not an init but configuration / settings.

We should call it more of like "refresh interval" instead of "scan interval"

And it does not matter why number you put in the end. You always can end up in situation as described in #124.

Replace 30 sec with any number

Image

So... If somebody opens and closes a window in this 30 sec interval precisely between the pull you will never get that state.

Yes you can lower the number. But !!!! It can increase system instability !!!
I know about people having this number as low as 1 second. But it can cause "reboots" / "timeouts" / "system stalls" of the HikAxPro device.

This is why the interval is set to 30 sec. Not to overload the system.

Still it does not solve the original 1. point of the issue.

All this info you can find in this repository. Contributions are welcome even to improve docs to make others understand why some things has to be done some way.

I have in "development" one thing and that is "streamed event handling". But it works only in "armed mode" and cannot currently tell more because since there is "multiple model support" I cant promise anything.

@petrleocompel
Copy link
Owner

@valenteemanuele I do not know how to proceed with this.
You kinda put 2 issues in to one and First part is being tracked by other issues so it is duplicate.
Second part cannot be done because there is no API.

I am going to close this. You can subscribe about the streaming events to previous issues.
But until "Excluding" has any API and documentation it cannot be implemented + UI on HA side would also not allow this "confirmation".

Feel free to discuss more but I think I got more clarity to the whole situation.

@petrleocompel petrleocompel added duplicate This issue or pull request already exists invalid This doesn't seem right wontfix This will not be worked on labels Jan 27, 2025
@petrleocompel petrleocompel self-assigned this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists invalid This doesn't seem right wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants