Raspberry Pi Camera Module 3 - Configuration Issues

Camera model
Raspberry Pi Camera Module 3 (imx708)

What is the problem?

My Camera is recognized by the OS, but OctoPrint is not able to connect to it. I suspect this is a configuration issue, but I'm struggling to find the information that will show me what I need to do.

When I run libcamera-hello I get the following;

Libcamera Output
[10:36:30.061883897] [3037] INFO Camera camera_manager.cpp:299 libcamera v0.0.4+22-923f5d70

[10:36:30.200776433] [3038] INFO RPI raspberrypi.cpp:1476 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media2 and ISP device /dev/media3

[10:36:30.201647446] [3037] INFO Camera camera.cpp:1028 configuring streams: (0) 2304x1296-YUV420

[10:36:30.201950944] [3038] INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/imx708@1a - Selected sensor format: 2304x1296-SBGGR10_1X10 - Selected unicam format: 2304x1296-pBAA

#0 (0.00 fps) exp 29981.00 ag 1.49 dg 1.05
#1 (30.01 fps) exp 29981.00 ag 1.49 dg 1.05
#2 (30.01 fps) exp 29981.00 ag 1.55 dg 1.01
#3 (30.01 fps) exp 29981.00 ag 1.56 dg 1.01
#4 (30.01 fps) exp 29981.00 ag 1.57 dg 1.00
#5 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#6 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#7 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#8 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#9 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#10 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#11 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#12 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#13 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#14 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#15 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#16 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#17 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#18 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#19 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#20 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#21 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#22 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#23 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#24 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#25 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#26 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#27 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#28 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#29 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#30 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#31 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#32 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#33 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#34 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#35 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#36 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#37 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#38 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#39 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#40 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#41 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#42 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#43 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#44 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#45 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#46 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#47 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#48 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#49 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#50 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#51 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#52 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#53 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#54 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#55 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#56 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#57 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#58 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#59 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#60 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#61 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#62 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#63 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#64 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#65 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#66 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#67 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#68 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#69 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#70 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#71 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#72 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#73 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#74 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#75 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#76 (30.01 fps) exp 29981.00 ag 1.60 dg 1.00
#77 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#78 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#79 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#80 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#81 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#82 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#83 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#84 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#85 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#86 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#87 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#88 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#89 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#90 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#91 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#92 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#93 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#94 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#95 (30.01 fps) exp 29981.00 ag 1.60 dg 1.00
#96 (30.01 fps) exp 29981.00 ag 1.60 dg 1.00
#97 (30.01 fps) exp 29981.00 ag 1.61 dg 1.00
#98 (30.01 fps) exp 29981.00 ag 1.62 dg 1.00
#99 (30.01 fps) exp 29981.00 ag 1.63 dg 1.00
#100 (30.01 fps) exp 29981.00 ag 1.64 dg 1.00
#101 (30.01 fps) exp 29981.00 ag 1.64 dg 1.00
#102 (30.01 fps) exp 29981.00 ag 1.63 dg 1.00
#103 (30.01 fps) exp 29981.00 ag 1.62 dg 1.00
#104 (30.01 fps) exp 29981.00 ag 1.61 dg 1.00
#105 (30.01 fps) exp 29981.00 ag 1.61 dg 1.00
#106 (30.01 fps) exp 29981.00 ag 1.63 dg 1.00
#107 (30.01 fps) exp 29981.00 ag 1.62 dg 1.00
#108 (30.01 fps) exp 29981.00 ag 1.62 dg 1.00
#109 (30.01 fps) exp 29981.00 ag 1.61 dg 1.00
#110 (30.01 fps) exp 29981.00 ag 1.60 dg 1.00
#111 (30.01 fps) exp 29981.00 ag 1.60 dg 1.00
#112 (30.01 fps) exp 29981.00 ag 1.60 dg 1.00
#113 (30.01 fps) exp 29981.00 ag 1.60 dg 1.00
#114 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#115 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#116 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#117 (30.00 fps) exp 29981.00 ag 1.59 dg 1.00
#118 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#119 (30.01 fps) exp 29981.00 ag 1.59 dg 1.00
#120 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#121 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#122 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#123 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#124 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#125 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#126 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#127 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#128 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#129 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#130 (30.01 fps) exp 29981.00 ag 1.57 dg 1.00
#131 (30.01 fps) exp 29981.00 ag 1.57 dg 1.00
#132 (30.01 fps) exp 29981.00 ag 1.57 dg 1.00
#133 (30.01 fps) exp 29981.00 ag 1.57 dg 1.00
#134 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#135 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#136 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#137 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#138 (30.01 fps) exp 29981.00 ag 1.58 dg 1.00
#139 (30.01 fps) exp 29981.00 ag 1.57 dg 1.00
#140 (30.01 fps) exp 29981.00 ag 1.57 dg 1.00
#141 (30.01 fps) exp 29981.00 ag 1.57 dg 1.00
#142 (30.01 fps) exp 29981.00 ag 1.57 dg 1.00

However, when I try to access the Camera in OctoPrint I'm told it's inaccessible.

Error Messages displayed using the "TimeLapse+" plugin. I'm showing the first message when I tried using "Localhost" in the URL, then again using IP equivalent.

Error Messages
Could not retrieve Webcam Snapshot: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /?action=snapshot (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xef5b59b8>: Failed to establish a new connection: [Errno 111] Connection refused'))

Could not retrieve Webcam Snapshot: HTTPConnectionPool(host='127.0.0.1', port=8080): Max retries exceeded with url: /?action=snapshot (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xef551640>: Failed to establish a new connection: [Errno 111] Connection refused'))

When I use the built-in OctoPrint tools, none of them can connect to the camera.

Snapshot Error Message

Snapshot test failed

Could not retrieve snapshot URL, please double check the URL

Streaming Error Message

Stream test

If you see your webcam stream below, the entered stream URL is ok.! :x:

What did you already try to solve it?
Reading through all the release notes about the new release has a lot of information, but I think I'm looking for something specific about how to configure OctoPrint to have access to the camera connected to the RPi. I think there's something about the "Virtual" install that may be at play, but I just can't seem to find that information that would crack this open for me.

Logs

Additional information about your setup (OctoPrint version, OctoPi version, ...)
OctoPrint: 1.9.0
Raspberry Pi OS Lite: Bullseye

I'm running OctoPrint on a Raspberry Pi OS installation. Long story short, every time I've used the OctoPi image my networking (wireless & wired) stops working after the system has been restarted after having been shut down rendering the RPi completely inaccessible. Networking has been completely reliable so far in this current setup.

Which webcam streamer server are you using and how did you configure it?

That's the normal behavior? The Pi is shut down - what did you expect would happen?

Maybe a bit more information on the webcam streamer server. I don't know that I've set one up if it wasn't part of 1.9.0 or the base OS.

As for the networking issue, please see my correction. The problem occurred after the system was turned back on after having been completely shut down.

OctoPrint itself doesn't come with any kind of webcam streaming software. It's included in the OctoPi image so it's easier for newbies.
Because you're using the v3 cam you need something like the camera streamer which is used in the latest version of the OctoPi image.
Afaik there isn't a guide on how to install it right now, but if you want to try it I can give you the raw steps from the image creation tool
You need the middle part of this script

and here is the link to the camera streamer stack on github

I heard of wifi issues, but I never encountered a not working ethernet connection after reboot.
Did you try a fresh image and just ethernet yet?

I got it sorted out, but looking at your response it seems I took the difficult-to-me path. After much searching I eventually figured out that I needed to install,

  1. GitHub - ayufan/camera-streamer: High-performance low-latency camera streamer for Raspberry PI's

  2. And create a service for the IMX708 following @ltlowe's advice; systemd unit configuration file for Pi Camera Module V3 Β· Issue #39 Β· ayufan/camera-streamer Β· GitHub

Through a good deal of trial and error I finally got things configured and working. What remains is to sort out how to control the resolution which seems to be on the lower end by default.

Side-note:
The networking issue I was having with the OctoPi image seemed to render both wired and wireless connectivity non-functional. I reinstalled the image about three times before I gave up and just installed the latest Raspberry Pi OS image and manually installed OctoPrint. I haven't had the network drop since.

I suppose the one thing I didn't try is plugging in a monitor, keyboard, and mouse to the RPi. I kind of wish I'd thought of that earlier. I'm just used to accessing it via terminal I guess.

1 Like

Glad you found a solution that works for you.

I hope the will be solution for your networking problem in the future.
Right now I have unfortunately no idea what caused it.

1 Like