Replies: 2 comments 2 replies
|
bonjour; Même problème ici avec le firmware v1.3.5.22. En faisant une installation minimale (Moonraker, Mainsail, Camera Settings Control), le flux caméra ne remonte plus du tout dans Mainsail, fluidd, creality mais fonctionne sur l'appli creality cloud sur Android. Merci pour le contournement avec le script d'initialisation ! |
|
Confirmed on a K1 (firmware build 2026-06-25) — your script works. Three additions that 1. Back it up outside cp /etc/init.d/S60mjpg_streamer /usr/data/After the next update, copy it back. 2. Don't let the wait loop stall the boot. start() {
(
i=0
while ! pidof cam_app >/dev/null && [ $i -lt 60 ]; do
sleep 1
i=$((i + 1))
done
sleep 5
pidof mjpg_streamer >/dev/null && exit 0
/usr/bin/mjpg_streamer -b \
-i "/usr/lib/mjpg-streamer/input_memfd.so -t 0" \
-o "/usr/lib/mjpg-streamer/output_http.so -p 8080"
) &
}3. Moonraker may have no webcam registered at all. Check with curl -X POST http://<printer>:7125/server/webcams/item \
-H "Content-Type: application/json" \
-d '{"name":"Camera","service":"mjpegstreamer-adaptive","target_fps":15,
"stream_url":"/webcam/?action=stream","snapshot_url":"/webcam/?action=snapshot"}'The helper script's nginx config already proxies |
Uh oh!
There was an error while loading. Please reload this page.
Hi, I have a K1C and use the helper script. I usually install Moonraker and Nginx, Mainsail, Klipper Gcode Shell Command, Klipper Adaptive Meshing & Purging, and Improved Shapers Calibrations.
Recently, there was a firmware update for the K1C (version 1.3.5.22), and I noticed the camera stopped working in the web interface. After researching online, I discovered that the camera component had been changed to use a different method, effectively disabling a service. I managed to work around this and get the camera running again using information found online and AI to help with the code; here is how I did it:
I created a file in the
/etc/init.d/folder namedS60mjpg_streamerFile code:
#!/bin/sh
start() {
COUNT=0
while ! pidof cam_app >/dev/null 2>&1
do
COUNT=$((COUNT + 1))
if [ "$COUNT" -ge 30 ]; then
exit 1
fi
sleep 1
done
if pidof mjpg_streamer >/dev/null 2>&1
then
exit 0
fi
exec /usr/bin/mjpg_streamer
-i "/usr/lib/mjpg-streamer/input_memfd.so -t 0"
-o "/usr/lib/mjpg-streamer/output_http.so -p 8080" &
}
stop() {
killall mjpg_streamer 2>/dev/null
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 2
start
;; esac
exit 0
After that, I used the commands:
sed -i 's/\r$//' /etc/init.d/S60mjpg_streamer
chmod 755 /etc/init.d/S60mjpg_streamer
The question is: are there any other changes needed to use the scripts I mentioned above?
One thing I noticed is that, when performing the input shaper calibration, the console ends with the commands: Klipper state: Disconnect
Input Shaper Calibration complete!
The SAVE_CONFIG command will update the printer's configuration file
with these parameters and restart the printer.
Now, more messages appear:
{"code":"key61, "msg":"Unknown command:LOAD_AI_SET_AI_CONTROL_PREFER", "values": ["LOAD_AI_SET_AI_CONTROL_PREFER"]}
{"code":"key61, "msg":"Unknown command:FILAMENT_RACK_MODIFY", "values": ["FILAMENT_RACK_MODIFY"]}
{"code":"key61, "msg":"Unknown command:BOX_ENABLE_AUTO_REFILL", "values": ["BOX_ENABLE_AUTO_REFILL"]}
{"code":"key61, "msg":"Unknown command:BOX_SET_PRE_LOADING", "values": ["BOX_SET_PRE_LOADING"]}
Klipper state: Disconnect
Input Shaper Calibration complete!
The SAVE_CONFIG command will update the printer's configuration file
with these parameters and restart the printer.
All reactions