Closed nijel closed 2 years ago
Hi @nijel - thanks for reporting this issue. I'll look into it as soon as possible and provide an update. Looks like they've added quite a few new types related to the smart detections which then are no longer tracked under the more general 'motion' type.
Hi Daniel.
Cool project, thank you for the work.
I just started today, and get same issue as this. No events downloaded. Can it be that the API got changed again? I'm using newest Unifi Protect (UniFi OS 3.1.9, Protect 2.8.28).
The download command work, however I only need the motion alerts to be downloaded.
Here is my log output $ poetry run protect-archiver events --address 10.160.1.22 --username LocalUser --password XXXX --start="2023-01-01 00:00:00" --end="2024-12-20 00:00:00" ~/unifi-protect-backupper/downloads/ Getting camera list Successfully retrieved data from https://10.160.1.22:443/proxy/protect/api/cameras Cameras found:
0 motion events found for all selected cameras between 2023-01-01 00:00:00 and 2024-12-20 00:00:00 Downloading motion event video files between 2023-01-01 00:00:00 and 2024-12-20 00:00:00 from 'https://10.160.1.22:443/proxy/protect/api/video/export' 0 files downloaded (0.0 b), 0 files skipped, 0 files failed, 0 files total
Thank you in advance.
It seems that somewhere around Unifi Protect 2.0.0 the API has been changed. Unfortunately, I noticed this after months, so it's hard to tell exactly.
Following always returns no events:
https://github.com/danielfernau/unifi-protect-video-downloader/blob/a91db13ef4aed3356fac45900f00cccc5766ee94/protect_archiver/downloader/get_motion_event_list.py#L18-L21
When I change
type=motion
totypes=motion&types=smartDetectZone&types=smartDetectLine&types=ring&allCameras=true
I get what I want.The
types
parameter is also accepted as comma separated list.