Autofocusing webcams may struggle with the constant movement of the bed. To manually disable autofocus:
ssh pi@octopi.local
sudo v4l2-ctl --set-ctrl=focus_auto=0
sudo v4l2-ctl --set-ctrl=focus_absolute=40
Note: The “v4l2” includes the letter l, not the numeral 1
To re-enable autofocus:
sudo v4l2-ctl --set-ctrl=focus_auto=1
ssh pi@octopi.local
sudo nano /boot/octopi.txt
Uncomment and edit the following line:
camera_usb_options="-r 640x480 -f 15"
-r
: resolution
-f
: framerate