Pi camera doesn't work after migrating to Pi3B

Camera model: unsure (bought off ebay) but dedicated raspberry pi camera "1080p camera module board 5pm webcam video for raspberry pi 2/3"

What is the problem? Camera not working after migrating from Raspberry Pi 2 to 3B (plus leaving it for almost a year).

What did you already try to solve it?
I've done a complete update of Octoprint to 1.7.3, updated to Python 3, Octopi 0.18.0. In SSH I've gone into sudo raspi-config and turned on the webcam. Webcam is turned on in the webcam settings on the Octoprint page. I tried installing the fswebcam package within SSH and tried the fswebcam command but it comes back as "no such file or directory" (referring to /dev/video0).

When I try to view the webcam on the Octoprint page, I get the error:
Webcam stream not loaded

It might not be configured correctly or require authentication. You can change the URL of the stream under "Settings" > "Webcam & Timelapse" > "Webcam" > "Stream URL". If you don't have a webcam you can also just disable webcam support there.
Currently configured stream URL: webcam/?action=stream

Under webcam settings, the stream url test comes back with a broken link. The light on the webcam is on so it's at least getting power. I suppose it could have broken but I'm thinking there's a wrong setting somewhere.

In octopi.txt I've set it to raspi camera only in an attempt to fix it but didn't solve the problem.

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)
octoprint-systeminfo-20220327051536.zip (96.2 KB)

Additional information about your setup (OctoPrint version, OctoPi version, ...)
See above.

Hope someone can offer assistance! Thanks heaps.
Brett

try /webcam/?action=stream

Apologies, I copied/pasted wrong. It does have the slash before webcam. Thank you though!

bump Don't suppose anyone has any other suggestions...?

Please if anyone has any suggestions, I'm at a loss here.

I was hoping someone had a solution to this. I upgraded to OctoPi 0.18.0 with OctoPrint 1.8.0rc3 (build 20220329115556) and this issue popped up. :frowning: . My webcamd.log has the same file not error but I donโ€™t know where the file should be.

I'm afraid I don't have any suggestions but I can say that my RPi camera is working with OctoPi 0.18.0 and OctoPrint 1.8.0rc3.

What does vcgencmd get_camera report?

Edit: @ScottDIrwin as well

pi@DJango:~ $ vcgencmd get_camera
supported=1 detected=1

Test snapshots using the command line work, so the OS is seeing the camera.

In that case, can you upload the /var/log/webcamd.log file?

Here you go. I included haproxy.log as I see 404 and 503 errors related to the webcam. I was going to sleuth down where ./www-octopi was but life happened. I suspect file locations changed and my config needs to be updated (I never touched it before - it just worked, lol).

haproxy.log (49.2 KB)
webcamd.log (363.4 KB)

It is showing in the webcamd.log that there is no such file or directory for mjpg-streamer. Could you check what the results of ls -l /home/pi/mjpg-streamer/ are?

Not sure how that could have got changed/deleted on your install, but we will debug it I guess...

Edit: This is actually a different issue to the one @zdallin has - they have no detected video devices on the Pi, yours has issues with the software. It may be wise to continue in a different thread to avoid confusion.

I'm sorry...I didn't meant to hijack this thread. I'll start a new one (or move this once I figure out how to move a group of posts to a new thread).

pi@DJango:~/mjpg-streamer $ ls -l
total 8
drwxr-xr-x 7 pi pi 4096 Mar 29 19:19 mjpg-streamer-experimental
-rw-r--r-- 1 pi pi 4034 Feb 27 19:30 README.md

I got it working....

I edited /bin/run/webcamd and set the streamer home directory variable to:

MJPGSTREAMER_HOME=/home/pi/mjpg-streamer/mjpg-streamer-experimental

it was

MJPGSTREAMER_HOME=/home/pi/mjpg-streamer

Not sure what/how things changed, but I'm good now. Apologies for the hijack.