Ninja Docs Help

Install non-creality camera

Revision

Date

Description

1.0

24.07.2024

Init Changelog

Introduction

By default, the Creality Ender3 V3 KE printer only seems to be able to use the manufacturer's Nebula camera. Thanks to the community of makers around Klipper, it is now possible to use a webcam from another brand on an Ender3 V3 KE.

Requirements

  1. Firmware v1.1.0.12 (or later) is installed on printer.

  2. Has "root" mode turn on printer (see Root mode).

  3. Has SSH access to printer.

  4. Has Guilouz's Helper Script installed (see instruction)

Instructions

Install Entware

Follow: Entware Installation guide

Installing packages

  1. Install mjpg-streamer, mjpg-streamer-input-uvc, mjpg-streamer-output-http:

    opkg install mjpg-streamer
    opkg install mjpg-streamer-input-uvc
    opkg install mjpg-streamer-output-http
  2. (optional) Install SFTP Server:

    opkg install openssh-sftp-server; ln -s /opt/libexec/sftp-server /usr/libexec/sftp-server

Setting up for a non-Creality webcam on Ender 3 V3 KE

  1. Connect webcam to a USB Port on the NebulaPad of the Ender3 V3 KE.

  2. Check that it is found by system:

    lsusb
  3. Check that v4l (video for linux) then finds a video device (command will output only video device(s)):

    v4l2-ctl --list-devices|grep -A1 usb|sed 's/^[[:space:]]*//g'|grep '^/dev'

    should output something like: /dev/video5

  4. Find out the resolutions and formats available for this video device (update with your video device):

    v4l2-ctl -d /dev/video5 --list-formats-ext
  5. Adapt the script and put it as /etc/init.d/S50non_creality_webcam.

    #!/bin/sh # S50non_creality_webcam - by destinal # Start up mjpg-streamer on port 8080 for non-creality cameras (where cam_app doesn't autostart) # Notes de PPAC : ## Source de la version original de ce script : # https://openk1.org/static/k1/scripts/multi-non-creality-webcams.sh ## pré-requis # - le résultat d'un "lsusb" doit avoir une ligne en plus quand on branche la Webcam sur l'un des ports USB du NebulaPad. # - installer Entware via le script de Guilouz pour avoir la commande "opkg" cf https://github.com/Guilouz/Creality-K1-and-K1-Max/wiki/Entware # - opkg install mjpg-streamer # - opkg install mjpg-streamer-input-uvc # - opkg install mjpg-streamer-output-http # - Adapter la resolution cf argument '-r' de mjpg_streamer ( cf "v4l2-ctl --list-devices|grep -A1 usb|sed 's/^[[:space:]]*//g'|grep '^/dev'" et "v4l2-ctl -d /dev/video4 --list-formats-ext" ) # Fin des notes de PPAC. case "$1" in start) # V4L_DEV=$(v4l2-ctl --list-devices|grep -A1 usb|tail -1|sed 's/^[[:space:]]*//g') V4L_DEVS=$(v4l2-ctl --list-devices|grep -A1 usb|sed 's/^[[:space:]]*//g'|grep '^/dev') CREALITY_CAMS=$(v4l2-ctl --list-devices|grep CREALITY|wc -l) if [ "x$V4L_DEVS" = "x" -o $CREALITY_CAMS -gt 0 ]; then echo "No third party webcams found or we have a creality camera. Bailing!" exit 1 fi # Otherwise we're all set up and have a device ID PORT=8080 for V4L_DEV in $V4L_DEVS; do /opt/bin/mjpg_streamer -b -i "/opt/lib/mjpg-streamer/input_uvc.so -d $V4L_DEV -r 640x360 -f 15" -o "/opt/lib/mjpg-streamer/output_http.so -p $PORT" PORT=`expr $PORT + 1` done ;; stop) killall mjpg_streamer ;; restart|reload) "$0" stop "$0" start ;; *) echo "Usage:" echo " $0 {start|stop|restart}" exit 1 esac exit $? # Fin de mon ficher /etc/init.d/S50non_creality_webcam
  6. Make script executable:

    chmod u+x /etc/init.d/S50non_creality_webcam
  7. Launch the script:

    /etc/init.d/S50non_creality_webcam restart

Camera access

To access video just paste http://<ip_address>:8080/?action=stream in your web browser.

If you are using Mainsail web interface (`http://<ip_address>:4409), there may be a need to create or recreate a webcam config using:

  • streaming URL: /webcam/?action=stream

  • snapshot URL: /webcam/?action=snapshot

Last modified: 17 February 2025