-
-
Notifications
You must be signed in to change notification settings - Fork 544
Description
STOP right now, and please first look to see if the issue you're about to submit is already an open or recently closed issue at https://github.com/kizniche/Mycodo/issues
Please DO NOT OPEN AN ISSUE:
-
If your Mycodo version is not the latest release version, please update your device before submitting your issue (unless your issue is related to not being able to upgrade). Your problem might already be solved.
-
If your issue has been addressed before. If you have any new information that may aid in solving the issue, post it in the issue that already exists.
If you are going to post a new issue, next read How to Write a Good Bug Report at https://forum.radicaldiy.com/t/how-to-write-a-good-bug-report/71
Please complete as many of the sections below, if applicable, to provide the most information that may help with investigating your issue. Replace the text in brackets with your own text describing the issue. The details requested potentially affect which options to pursue. The small amount of time you spend completing the template will also help those providing assistance by reducing the time required to help you.
Describe the problem/bug
On the latest raspberry pi os the libcamera functions have been renamed so the image capture does not work.
The commands in the devices/camera.py file need to be updated to deal with this:
line 242
# Check for rpicam-still first (Bookworm), then fallback to libcamera-still
camera_cmd = None
if os.path.exists("/usr/bin/rpicam-still"):
camera_cmd = "/usr/bin/rpicam-still"
elif os.path.exists("/usr/bin/libcamera-still"):
camera_cmd = "/usr/bin/libcamera-still"
else:
logger.error("Neither /usr/bin/rpicam-still nor /usr/bin/libcamera-still found")
return None, None
line 258
cmd = f"{camera_cmd} " \
f"--width {settings.width} " \
f"--height { settings.height} " \
f"--brightness {settings.brightness} " \
f"-o {path_file}"
These changes to my local code fixed the issue.
Versions:
- Mycodo Version: 8.16.2
- Raspberry Pi Version: Raspberry Pi 5 Model B Rev 1.0
- Raspbian OS Version: Debian GNU/Linux 12 (bookworm)
Reproducibility
Please list specific setup details that are involved and the steps to reproduce the behavior:
- Upgrade devide to bookworm
- install libcamera-app
- In MyCodo go to More -> Camera -> Add (selecting libcamera)
- Click on capture still
- Error capturing still
Expected behavior
With the fix described above the still was captured
Screenshots
[If applicable, add screenshots to help explain your problem - replace this with your own text]
Additional context
happy to push this fix but I did not see a contributor guild and I cant push a branch to your repo