Octoprint Raspberry Zero W and Camera V2.1 not work together!

Camera model
RASPBERRY Pi Camera Module V2

What is the problem?
Octoprint works without camera normal, if I attach camera - The OctoPrint server is currently not running.

What did you already try to solve it?

  1. pi@octopi:~ $ vcgencmd get_camera
    supported=1 detected=1

  2. Turn on P1 Camera in PuTTy

  3. Flash image, update to newest upgrade..

Logs (/var/log/webcamd.log, syslog, dmesg, ...)

CAMLOG
Starting up webcamDaemon...
--- Configuration: ----------------------------
camera: auto
usb options: -r 640x480 -f 10
raspi options: -fps 10
http options: -w ./www-octopi -n

<13>Mar 13 22:54:23 pi: Starting Raspberry Pi camera
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_raspicam.so -fps 10
MJPG Streamer Version: git rev: 8cc9d22c1e79905d529a248ccf05bbf0625e0bf3
i: fps.............: 10
i: resolution........: 640 x 480
i: camera parameters..............:

Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
o: www-folder-path......: ./www-octopi/
o: HTTP TCP port........: 8080
o: HTTP Listen Address..: (null)
o: username:password....: disabled
o: commands.............: disabled
i: Starting Camera
Encoder Buffer Size 81920
Starting up webcamDaemon...

--- Configuration: ----------------------------
camera: auto
usb options: -r 640x480 -f 10
raspi options: -fps 10
http options: -w ./www-octopi -n

<13>Mar 13 22:53:36 pi: Starting Raspberry Pi camera
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_raspicam.so -fps 10
MJPG Streamer Version: git rev: 8cc9d22c1e79905d529a248ccf05bbf0625e0bf3
i: fps.............: 10
i: resolution........: 640 x 480
i: camera parameters..............:

Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
o: www-folder-path......: ./www-octopi/
o: HTTP TCP port........: 8080
o: HTTP Listen Address..: (null)
o: username:password....: disabled
o: commands.............: disabled
i: Starting Camera
Encoder Buffer Size 81920
Starting up webcamDaemon...

--- Configuration: ----------------------------
camera: auto
usb options: -r 640x480 -f 10
raspi options: -fps 10
http options: -w ./www-octopi -n

No camera detected, trying again in two minutes
No camera detected, trying again in two minutes
No camera detected, trying again in two minutes

HAPROXY LOG
Mar 13 22:54:22 octopi haproxy-systemd-wrapper[550]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
Mar 13 22:54:22 octopi haproxy-systemd-wrapper[550]: [WARNING] 071/225422 (551) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
Mar 13 22:53:50 octopi haproxy-systemd-wrapper[489]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
Mar 13 22:53:50 octopi haproxy-systemd-wrapper[489]: [WARNING] 071/225350 (491) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
Jul 1 17:09:21 octopi haproxy-systemd-wrapper[482]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
Jul 1 17:09:21 octopi haproxy-systemd-wrapper[482]: [WARNING] 181/170921 (484) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
Jul 1 17:17:29 octopi haproxy-systemd-wrapper[477]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
Jul 1 17:17:30 octopi haproxy-systemd-wrapper[477]: [WARNING] 181/171730 (479) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
Jul 1 17:28:08 octopi haproxy-systemd-wrapper[474]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
Jul 1 17:28:09 octopi haproxy-systemd-wrapper[474]: [WARNING] 181/172809 (475) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
Jul 1 18:14:28 octopi haproxy-systemd-wrapper[474]: haproxy-systemd-wrapper: SIGTERM -> 480.
Jul 1 18:14:28 octopi haproxy-systemd-wrapper[474]: haproxy-systemd-wrapper: exit, haproxy RC=0
Jul 1 18:15:08 octopi haproxy-systemd-wrapper[446]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
Jul 1 18:15:08 octopi haproxy-systemd-wrapper[446]: [WARNING] 181/181508 (447) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.

A camera and OctoPrint on a Pi Zero W really isn't recommended at all to begin with - the 0W's WiFi chipset gobbles CPU like mad when you generate bandwidth, such as streaming from a camera.

And stuff suddenly stopping working when you connect additional peripherals also sounds like an insufficient power supply causing the Pi to brown out.

So...

  • Use a Pi3 instead
  • and get yourself a good solid power supply (5V/2.5A) for it (a phone charger is not a power supply)

So u are saying its not recommended even Prusa has tutorial...

Thank you for your react (I was hoping, that more people will react) but I really would like to make it work :frowning:

I tested this stuff myself. Prusa Research sadly didn't ask me before they started recommending this kind of usage, or I would have told them how bad of an idea it is. They didn't though, and ever since the launch of the MK3 I have had people tell me I must be mistaken about this, even though I wrote the solution in question :woman_shrugging:

Put OctoPrint on a Raspberry Pi 3B from the OctoPi image and use that Pi Zero W as a dedicated webcam as described here.

Hi GURU - thanks for advice: To understand it correctly - I dont have a Raspberry Pi 3B...I wanted camera and OctoPrint on one device - Pi Zero W.. So foosel saying replace Zero W to Pi 3B to have all in one...and you are saying I should use two devices??? One for octopi and second to standalone webcam? Am I correct? Thanks !

Both foosel and I are saying "the Zero only has one core in the processor; it won't work well for this". I would guess that she's also saying "buy a Raspberry Pi 3B and put everything on that". I differ by saying "buy a Raspberry Pi 3B and put OctoPi on that; keep the Zero and dedicate it for the webcam".

So yeah, two devices works great. I have two different cameras on my own printer (but I have a Raspi 3B of course). So I put the second camera on a dedicated Zero like this.

But of course you can put everything on the 3B and use the Zero for some other project.

1 Like