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

Ability to call Snapshots via the API? #1030

Open
jarrah31 opened this issue Nov 1, 2023 · 5 comments
Open

Ability to call Snapshots via the API? #1030

jarrah31 opened this issue Nov 1, 2023 · 5 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@jarrah31
Copy link

jarrah31 commented Nov 1, 2023

Would it be possible to trigger a snapshot image via the API instead of the current method of using SNAPSHOT=RTPS within environment variables please?

I ask because I'd like to only trigger snapshots during daylight hours via a local script (or some other method) that automatically adjusts when they are taken as the days shorten. At the moment I have to manually delete all the nighttime shots before I create a Timelapse, and being able to trigger them via an API will make things easier.

I would still like to use the environment settings such as SNAPSHOT_FORMAT and IMG_DIR that hopefully the API call can utilise.

Many thanks!

@mrlt8
Copy link
Owner

mrlt8 commented Nov 2, 2023

Does the update_snapshot command work? You should be able trigger it via the API /api/<cam-name>/update_snapshot or as the topic for MQTT wyzebridge/<cam_name>/update_snapshot/get.

@jarrah31
Copy link
Author

jarrah31 commented Nov 2, 2023

Hi @mrlt8, I did see that API option but discounted it due to the description saying it only updates the WebUI snapshot for that camera, but now looking at it in a different light I see where you are coming from as it mentions the same /img/cam-name.jpg filename.
Does calling /img/cam-name.jpg take into account environment options such as SNAPSHOT_FORMAT and IMG_DIR?

@mrlt8 mrlt8 added bug Something isn't working enhancement New feature or request labels Nov 3, 2023
mrlt8 added a commit that referenced this issue Nov 4, 2023
* trigger interval snapshots via web API #1030

* Add support for V4 and Doorbell V2 #1024

* Newer auth protocol and fw11 bitrate check #1024

* Add commands for spotlight and accessories #921

* Revert "Update MediaMTX version from v1.1.1 to v1.2.1 (#1016)"

This reverts commit 8f6767a.

* Add latest fw version #1026

* changelog
@mrlt8
Copy link
Owner

mrlt8 commented Nov 5, 2023

@jarrah31 Can you try the new /api/all/update_snapshot endpoint?

@jarrah31
Copy link
Author

jarrah31 commented Nov 5, 2023

Thank you very much @mrlt8, I should be able to test this when back home tomorrow.

Just out of interest, will I be able to specify a camera name as well as the all option?

@jarrah31
Copy link
Author

jarrah31 commented Nov 6, 2023

I have tested and can confirm the /api/all/update_snapshot endpoint works.
Thank you!

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

No branches or pull requests

2 participants