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

getSnapshot method only returning snapshot of current time even when setting a timestamp in the past #29

Closed
hammocktester opened this issue Aug 15, 2024 · 4 comments

Comments

@hammocktester
Copy link

Describe The Problem:

Unable to use the getSnapshot method to get historical timestamps. I am able to log in and get camera list and pass the camera info into the getSnapshot method but the method is only returning the live snapshot and not historical ones. Is there a bug here or did I miss a setting on the unifi side or something on the javascript side?

To Reproduce:

var image = await ufp.getSnapshot(cam, 1280, 720, 1721019600000, false)
fs.createWriteStream('b.jpeg').write(image);

Logs:

Show the UniFi Protect API logs here.

Not seeing anything relevant in the logs besides the logins from the api user

Screenshots:

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 19, 2024
@hammocktester
Copy link
Author

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

still an issue

@github-actions github-actions bot removed the stale label Aug 21, 2024
@hjdhjd
Copy link
Owner

hjdhjd commented Aug 21, 2024

UniFi’s deprecated the snapshot API by and large for reasons they have stated in their support forums. Grabbing the current snapshot is as good as it gets for the time being. Thanks for raising it to my attention.

@hjdhjd hjdhjd closed this as completed Aug 21, 2024
Copy link

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants