Notifications
Clear all

FYI: OctoPrint and V3 Raspberry Pi Cameras  

Stránka 1 / 2
  RSS
Extra Fox
(@extra-fox)
Reputable Member
FYI: OctoPrint and V3 Raspberry Pi Cameras

If you're going to run OctoPrint, on the Bullseye release of Raspbian, with one of the new V3 PiCams sporting Sony image sensors there's a bit of a problem getting them to work. Currently, there's an image of the install in beta that they're working out the bugs on, but it's still in progress.

More information:

Best Answer by ltlowe:

I  am the creator of the cam3install.sh, but have dropped it in favour of the test releases from Foosel on github.  While there are still people on the octoprint forums who have been helping people still using my script, I strongly recommend using the latest official test image from github.    While there are some issues being reported with the new camera stack, I have found that the test images "just work" if you only have one camera, and it is a PiCam V3.    That image is being developed by the main Octoprint developer so you will also be contributing to the future of the project by using hers as described above by @walter-layher instead of my script.  

https://github.com/OctoPrint/OctoPi-UpToDate/issues/5

@extra-fox,  It might be worthwhile updating your first post so new people visiting this thread are directed to the official development thread.

Todd

Aaron

Napsal : 19/03/2023 9:32 pm
Just Brad
(@just-brad)
Trusted Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

 

Posted by: @extra-fox

If you're going to run OctoPrint, on the Bullseye release of Raspbian, with one of the new V3 PiCams sporting Sony image sensors there's a bit of a problem getting them to work. Currently, there's an image of the install in beta that they're working out the bugs on, but it's still in progress.

More information:

fyi:  currently there is a script that might "automatically update octoprint to allow the new camera to run. see above issue 49022 for more info.

I still have to print a new camera holder + pi case to properly add the new PI camera.  I am re-running the ./cam3install.sh  script for the installation. 

It is a major patch session from what I can see - so be smart (unlike me) and make sure before you upgrade the pi to stop any prints & make sure that the wifi connection is strong.

Napsal : 07/05/2023 1:11 am
Extra Fox se líbí
Extra Fox
(@extra-fox)
Reputable Member
Topic starter answered:
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

I've been debating submitting a bug for OctoPi, but I had to redo my install 3 full times because networking (wireless & wired) would stop if I shut the system down for any amount of time. I have no idea what was wrong since there was no way to access the RPi and see any logs so I don't have any hard evidence.

I'm now running the straight Raspbian image and I've installed OctoPrint on that. Definitely a lot more work, but networking seems to be stable. So far at least.

I'll try the script though as my camera doesn't work again after all this.

Aaron

Napsal : 07/05/2023 5:15 pm
Just Brad
(@just-brad)
Trusted Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

 

Posted by: @extra-fox

I've been debating submitting a bug for OctoPi, but I had to redo my install 3 full times because networking (wireless & wired) would stop if I shut the system down for any amount of time. I have no idea what was wrong since there was no way to access the RPi and see any logs so I don't have any hard evidence.

I'm now running the straight Raspbian image and I've installed OctoPrint on that. Definitely a lot more work, but networking seems to be stable. So far at least.

I'll try the script though as my camera doesn't work again after all this.

I am in the same group as you are with the wifi going dead.  But I thought my issue was that I was at the edge of WiFi reception and that was causing the issues.

I did re-build the OctoPrint install with support of the new camera.  Due to the network traffic load at the edge of reception viewing the camera pretty much nuks the low bandwidth data connection.  I guess I will have to hard line my connection; or setup an access point that has better wifi and plug in an RJ45 cable.

Based on what got patched to update the RP it took it pretty much replaced a major chunk of the OS. 

I have not tried this fix; but it seems to be a common issue for some....

https://github.com/gpokhark/Octopi_Setting

Hmm; I left my browser hooked to OctoPrint for over 1hr and it is stable.  That might be a temp workaround is to keep a browser running.  Hmm; I am also doing some odd stuff with the access point and 75 feet of cable so that could impact the auto turn off/failure of WiFI.

 

Napsal : 07/05/2023 5:36 pm
Just Brad
(@just-brad)
Trusted Member
RE:

I tried to edit my post but by the time I saved the update I timed out to do the update.

The following is a modified version of the script to help re-activate the network interface. 

I have not validated this fix yet.  Sort of a temp workaround until the real issue is resolved.

very that no password is required if setting up the script in a crontab

#!/bin/sh
# wifi alive check
#
# Prolog
#  Access a local IP address from where the Raspberry Pi is installed.
#  use the $? return code to check for error condition
#  On error - toggle the wlan0 down & up to force network back online
#
#  This is a one shot check & fix script; common method to run forever is
#  to update script with a do - forever loop or
#  place script in a crontab. 

MYLOG=/tmp/network_check.txt 


ping -c3 192.168.1.1    #Local ip address to use that is always on.  Router  is
                                     # recommended.

if [ $? != 0 ]; then
    # erase old long with one > to prevent file growth issues
    #
    echo "Startup network check and keep alive" > $MYLOG

    date >> $MYLOG

    echo "No network connection, restarting wlan0" >> $MYLOG

    sudo ifconfig wlan0 down
    sleep 30
    sudo ifconfig wlan0 up
    RC=$?
    echo "Requst to turn on network = $RC" >> $MYLOG
else
    echo "Network check passed" >> $MYLOG
    date >> $MYLOG
fi
Napsal : 07/05/2023 6:01 pm
dmakogon
(@dmakogon)
Active Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

I've been using a spare Logitech C922 with my Octoprint/pi setup (which works fairly well, aside from finding a good placement for the camera). Hadn't considered the new V3 cams yet. Have you (or anyone) done a comparison between the two, in terms of low-light quality, field-of-view, etc.?

Napsal : 10/05/2023 6:50 pm
Extra Fox
(@extra-fox)
Reputable Member
Topic starter answered:
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

I haven't done any sort of comparison other than with a knock-off Pi camera and it was WAY better than that.

Aaron

Napsal : 11/05/2023 12:43 am
dmakogon se líbí
Walter Layher
(@walter-layher)
Prominent Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

Values for FOV of the different PiCam modules you can find here. I got a V3 module in the mail yesterday and plan on testing it over the weekend. I also tried an Arducam 16 Mpix V3 module a few weeks ago but could not get it to work with current OctoPi. It seems to want the drivers from a special PiOS image from Arducam. I have not had the time yet to test that. But the Original RaspiCam Module V3 should work with current OctoPi out of the box from what I have read on the Octoprint forum.

Napsal : 11/05/2023 10:22 am
Extra Fox
(@extra-fox)
Reputable Member
Topic starter answered:
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

It doesn't. I've got the latest installation for OctoPrint. I know in the next release that should be coming soon some of the issues with the V3 should be resolved.

Aaron

Napsal : 12/05/2023 12:55 am
Just Brad
(@just-brad)
Trusted Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

 

Posted by: @walter-layher

 I have not had the time yet to test that. But the Original RaspiCam Module V3 should work with current OctoPi out of the box from what I have read on the Octoprint forum.

Nope; that camera will not work out of the box with the current non-release candidate out of the box.   It can be made to work running some scripts that is referenced in the first post of this thread.    I did get the V3 camera to work following the steps linked in the original post.  I goofed and managed to break the $25 dollar V3 camera when trying to fit  a V3 camera case I had made.  So another camera one is on order and I will be printing a new case for the PI #4 that has a cut out for the camera cable.  

Right now I am working on a ground up build of the current PI OS install with V3 camera support.  I have managed the OS to indicate that the camera was seen, but I have at least one more modification to the config file before the driver is loaded correctly.  If you don't keep the Raspberry PI in a good case, it can be easy to damage the hardware.    Final testing will wait until I have the necessary hardware in hand which should arrive in about a week.

 

 

 

Napsal : 12/05/2023 4:27 am
Walter Layher
(@walter-layher)
Prominent Member
RE:

Here is what I just did after a bit of research on the Octoprint forum:

  • Backup of my octoprint config via the Octoprint GUI
  • Downloaded the latest image with the new camera-streamer based webcam stack
  • Wrote the image to a new sdcard and booted the system
  • Went through the setup steps
  • Checked if the PiCam V3 was working: it was!
  • Updated Octoprint to the latest rc I was on before. The image mentioned above is a lower version, so I could not restore my settings right away but had to use the normal setup steps first.
  • Restored my backup
  • Now my config is as before and the PiCam V3 is working, including AF.
Napsal : 12/05/2023 10:15 am
ltlowe
(@ltlowe)
Active Member
RE:

I  am the creator of the cam3install.sh, but have dropped it in favour of the test releases from Foosel on github.  While there are still people on the octoprint forums who have been helping people still using my script, I strongly recommend using the latest official test image from github.    While there are some issues being reported with the new camera stack, I have found that the test images "just work" if you only have one camera, and it is a PiCam V3.    That image is being developed by the main Octoprint developer so you will also be contributing to the future of the project by using hers as described above by @walter-layher instead of my script.  

https://github.com/OctoPrint/OctoPi-UpToDate/issues/5

@extra-fox,  It might be worthwhile updating your first post so new people visiting this thread are directed to the official development thread.

Todd

This post was modified před 2 years by ltlowe
Napsal : 12/05/2023 11:03 pm
Just Brad a Extra Fox se líbí
Extra Fox
(@extra-fox)
Reputable Member
Topic starter answered:
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

I marked you as the answer so hopefully that'll be enough of a clue for them.

Aaron

Napsal : 12/05/2023 11:35 pm
ltlowe se líbí
Walter Layher
(@walter-layher)
Prominent Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

I just tried the same process with my other Octoprint Pi and an ArduCam 16MP AF module. I followed the tips here and after booting the camera works.

After writing the Octopi-image to my sdcard I added the following to the end of the file /boot/config.txt:

dtoverlay=vc4-kms-v3d,cma-128
gpu_mem=128 # preferred 160 or 256MB
dtoverlay=imx519

I checked the file for earlier occurences of the new entries and added a hash (#) in front of those lines, which are not exactly the same as the lines I added, so the new ones should be used. The third line above is not already present, it is the driver for the ArduCam module.

I also added a hash in front of the last line of the file /boot/camera-streamer/libcamera.conf like described in the posting I mentioned above.

The camera works without AF. But via the Octoprint plugin "Camera Settings" you can adjust the focus manually. In the settings for the plugin is a preview window with a dropdown list on the right. It has three entries: rpivid, ak7375..., imx519.... Select the entry beginning with "ak7375"  and you see a slider for focus. Put some focussing aid on the print bed, e.g. a box with text on it and adjust your focus. Then click on "Save" for the plugin settings.

Napsal : 13/05/2023 12:46 am
Just Brad
(@just-brad)
Trusted Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

 

Posted by: @ltlowe

I  am the creator of the cam3install.sh, .....

https://github.com/OctoPrint/OctoPi-UpToDate/issues/5

@extra-fox,  It might be worthwhile updating your first post so new people visiting this thread are directed to the official development thread.

Todd

Thanks; it did get my V3 camera online with the use of your script and the results were good.  I am going down the road for built from scratch configuration for the current OS to allow me to use the Pi for other things than just OctoPrint.   I use my Pi for 3 things, printing, reading, and playing music, but not all at the same time.

 

Napsal : 13/05/2023 3:08 am
Walter Layher
(@walter-layher)
Prominent Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

I wanted to show two short octolapses with the Arducam 16MP AF on an MK3S+ and another with the RaspiCam V3 Module on an MK4, to compare the FOV of the two. And yes, Octolapse works on the MK4! 🙂

I uploaded the videos into my media gallery and tried to insert them into this post, about 5 MB each, but I can't figure out how to do that. I have done this with jpgs, but mp4 is either not supported or it does not work for another reason. I'll try to post links to my nextcloud. Also I cannot find how to delete a file once it is uploaded to the media gallery here! All your files are belong to us or what? Strange! I also tried to attach them, but that did not really work either.

 

Napsal : 13/05/2023 8:16 pm
Walter Layher
(@walter-layher)
Prominent Member
RE:

So, let's see if this works.

The embedded link does not seem to work.

Here is the link to my nextcloud for the clip from the MK3S with the Arducam:

https://nextcloud.walterlayher.de/s/xaf89ob7LStpxab

And this is from the MK4 with the PiCam V3:

https://nextcloud.walterlayher.de/s/t9JFpk5PtDTgBAP

Napsal : 13/05/2023 8:22 pm
Just Brad
(@just-brad)
Trusted Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

FYI:  OctoPrint software RC 1.9 is now an official release. So doing odd things to get the V3 camera to work "should" be a thing of the past.

I have upgraded the OctoPI base OS "sudo apt-get upgrade" and added the gui desktop, now to check out if I broke things 😉

Napsal : 27/05/2023 5:38 pm
Walter Layher
(@walter-layher)
Prominent Member
RE:

You need to install the version with the "new libcamera stack" (there are two versions, the other one is just called "stable"). On the version with the new libcamera stack the new V3 camera module works out of the box.

Napsal : 27/05/2023 5:42 pm
Just Brad
(@just-brad)
Trusted Member
RE: FYI: OctoPrint and V3 Raspberry Pi Cameras

 

Posted by: @walter-layher

You need to install the version with the "new libcamera stack" (there are two versions, the other one is just called "stable"). On the version with the new libcamera stack the new V3 camera module works out of the box.

I thought upgrading the OS would get me the new stack - so lost a few hours for the patches and config...unless I want to dust off the low light V2 camera I found in a box last week. 

Napsal : 27/05/2023 5:52 pm
Stránka 1 / 2
Share: