Printer.cfg for Anycubic Kobra 2 Plus/Pro/Max

I’m using the latest version 3.0.9. Unfortunately, your last solution is still not working for me. I prefer patching. The main app does not need camera access at all. AC may want to video spy us with this constant connection to their cloud. I don’t need that.

It needed just this:
sed -i ‘s/video4linux/videoXlinux/g’ /app/app && sync && reboot

and now all is working, no more camera icon on the top right corner of the screen, no more cloud <> video communication.

Under auto detect a camera I mean something like this:

# Function to continuously capture images
def capture_images():
    while True:
        # Capture an image to a temporary file
        subprocess.run(["rm", "-f", TEMP_IMAGE_PATH])
        subprocess.run(["fswebcam", "--no-banner", "-r", "1024x576", TEMP_IMAGE_PATH])
        # Atomically move the temporary file to the target file
        try:
            shutil.move(TEMP_IMAGE_PATH, IMAGE_PATH)
            time.sleep(2)  # Wait for 2 second before capturing the next image
        except:
            print("Couldn't connect to the camera!")
            time.sleep(10)

It is waiting for a camera, if present start generating images, if disconnected wait for connection and recover. In the exept we can add also:

shutil.copy(DEFAULT_IMAGE_PATH, IMAGE_PATH)

to show a default image on the web interface that the camera is disconnected, not the latest taken image which is no longer valid.