Easier camera settings management
geerlingguy opened this issue · comments
Is your feature request related to a problem? Please describe.
I use this UI for checking up on 3D prints when I'm away, but I shut down the Pi when I'm not using the 3D Printer. I would like to make it so when I boot up the Pi and launch the app, it uses my default settings for things like manual focus, auto exposure, and resolution.
Right now using a Camera Module v3 it always defaults to 4K resolution, which is choppy, and autofocus, which gets a bit confused depending on how my print is going.
Describe the solution you'd like
I'd love to be able to set a few things in a YAML or JSON config file like defaults.json
(which is not tracked in this repo, so I could write my own file within... or maybe a file path I could pass in when running python app.py
?).
Describe alternatives you've considered
Manually clicking through settings every time I restart my Pi.
Additional context
N/A
Ah... just found this on the main screen:
![Screenshot 2024-06-10 at 6 39 32 PM](https://private-user-images.githubusercontent.com/481677/338382923-0002ccf4-acdc-46e0-996b-cc1ab0151c13.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5MjA0MDMsIm5iZiI6MTcyMTkyMDEwMywicGF0aCI6Ii80ODE2NzcvMzM4MzgyOTIzLTAwMDJjY2Y0LWFjZGMtNDZlMC05OTZiLWNjMWFiMDE1MWMxMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyNVQxNTA4MjNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05ZGQyN2E2NWQ1NGYyMTNiYmVkOWFjMzc0ZTBmZTZlNThjMzQ3OTdkYWM2YjA1OGMyNjkyOTEzNTFiNzQ4NzBhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.epmYjKFMLQhhH-WdA9Av_AuWuV7VsjTwxljz-0AClTY)
When I click save, it overwrites camera-config.json
with the new values:
pi@pistream:~/picamera2-WebUI-Lite $ git status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: camera-config.json
It may be good to have a set of repository defaults ('camera-defaults.json', maybe?), and the application could merge in any defaults from a camera-config.json
file if it exists—and add camera-config.json
to .gitignore
so a user could save their own config without overriding the git tracked file.
This is considered for the next release
This has been improved in the Beta pre release and could use some testing - https://github.com/monkeymademe/picamera2-WebUI/releases/tag/v0.1.0-beta
This was released in v1.0.0 but also had issues or suggestions... latest release should be what your looking for @geerlingguy