Setting up OctoPrint on a Raspberry Pi running Raspberry Pi OS (Debian)

Well, I was able to get the webcamd service working. You were right about where to add the -d /dev/video1.

I also stripped out everything for the Raspberry pi in webcamDaemon.

MJPGSTREAMER_HOME=/usr/bin/
MJPGSTREAMER_INPUT_USB="input_uvc.so"

# init configuration
camera="auto"
camera_usb_options="-r 640x480 -f 30 -d /dev/video1"

# runs MJPG Streamer, using the provided input plugin + configuration
function runMjpgStreamer {
    input=$1
    pushd $MJPGSTREAMER_HOME
    echo Running ./mjpg_streamer -o "output_http.so -w ./www" -i "$input"
    LD_LIBRARY_PATH=/usr/lib/ ./mjpg_streamer -o "output_http.so -w ./www" -i "$input"
    popd
}

# starts up the USB webcam
function startUsb {
    logger "Starting USB webcam"
    runMjpgStreamer "$MJPGSTREAMER_INPUT_USB $camera_usb_options"
}

# echo configuration
echo camera: $camera
echo usb options: $camera_usb_options

# keep mjpg streamer running if some camera is attached
while true; do
    if [ -e "/dev/video1" ] && { [ "$camera" = "auto" ] || [ "$camera" = "usb" ] ; }; then
        startUsb
    fi

    sleep 120

done

I moved mjpg_streamer to /usr/bin/, input_uvc.so and output_http.so to /usr/lib/,
and webcamDaemon script to /usr/local/bin.

/etc/systemd/system/webcamd.service I changed to

[Unit]
Description=Camera streamer for OctoPrint
After=network-online.target OctoPrint.service
Wants=network-online.target

[Service]
Type=simple
User=pi
ExecStart=/usr/local/bin/webcamDaemon

[Install]
WantedBy=multi-user.target

I probably would have left everything where it was if I had not need to move to get the rc.local file to work. I did work that way, but I wanted to get the service to work so I commented out everything in rc.local and made the changes above and then reloaded the service. Works like I wanted it to now.

Thanks for that suggestion on how to specify the correct video device.