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

Add support for line crossing events #69

Open
ep1cman opened this issue Dec 30, 2022 · 3 comments
Open

Add support for line crossing events #69

ep1cman opened this issue Dec 30, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@ep1cman
Copy link
Owner

ep1cman commented Dec 30, 2022

Unifi protect at some point added "Line crossing" events that are separate from motion or smart detect events. This tool should handle those too.

@ep1cman ep1cman added the enhancement New feature or request label Dec 30, 2022
@ep1cman ep1cman self-assigned this Dec 30, 2022
@ep1cman
Copy link
Owner Author

ep1cman commented Apr 21, 2023

It seems new detection types have been added too: alarms, packages

@adidalal
Copy link

adidalal commented Apr 6, 2024

First off, amazing package, thanks very much! Just set this up recently for an offsite backup.

I'm happy to attempt a PR for this - wanted to check here first if my understanding is correct.

New Types to add: "package", "animal", "smartDetectLine". There's a whole bunch of sound alarm types as well now too, but I'm not sure how much specificity is useful.


Oh interesting, I see for smart detections to work, you must enable remote access

@ep1cman
Copy link
Owner Author

ep1cman commented Apr 6, 2024

That sounds about right, and would definitely appreciate a PR!

I can see the audio events being useful, they're just not something I've tested yet within unifi protect. I'm not sure if they are sent in the same structure so it would need some investigation.

That function has a lot of conditions in it, I'm open to suggestions on how to improve it if you have any. It was done this way to try and keep the filtering of events readable and easy to reason about. Pattern matching might be a potential alternative approach but I worry with that many conditions it might become less readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants