diff --git a/Firmware/OpenWrt_snapshot/fluiddWrt-FACTORY-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin b/Firmware/OpenWrt_snapshot/fluiddWrt-FACTORY-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin deleted file mode 100644 index 8a67083d..00000000 Binary files a/Firmware/OpenWrt_snapshot/fluiddWrt-FACTORY-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin and /dev/null differ diff --git a/Firmware/OpenWrt_snapshot/fluiddWrt-SYSUPGRADE-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin b/Firmware/OpenWrt_snapshot/fluiddWrt-SYSUPGRADE-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin deleted file mode 100644 index f10f03a3..00000000 Binary files a/Firmware/OpenWrt_snapshot/fluiddWrt-SYSUPGRADE-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin and /dev/null differ diff --git a/Firmware/OpenWrt_snapshot/MainsailWrt-FACTORY-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin b/Firmware/OpenWrt_snapshot/openwrt_snapshot_wb-01_k5.10.127-factory.bin similarity index 52% rename from Firmware/OpenWrt_snapshot/MainsailWrt-FACTORY-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin rename to Firmware/OpenWrt_snapshot/openwrt_snapshot_wb-01_k5.10.127-factory.bin index ae9e2d42..5da736f6 100644 Binary files a/Firmware/OpenWrt_snapshot/MainsailWrt-FACTORY-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin and b/Firmware/OpenWrt_snapshot/openwrt_snapshot_wb-01_k5.10.127-factory.bin differ diff --git a/Firmware/OpenWrt_snapshot/MainsailWrt-SYSUPGRADE-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin b/Firmware/OpenWrt_snapshot/openwrt_snapshot_wb-01_k5.10.127-sysupgrade.bin similarity index 53% rename from Firmware/OpenWrt_snapshot/MainsailWrt-SYSUPGRADE-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin rename to Firmware/OpenWrt_snapshot/openwrt_snapshot_wb-01_k5.10.127-sysupgrade.bin index e2fdb0a7..db34715f 100644 Binary files a/Firmware/OpenWrt_snapshot/MainsailWrt-SYSUPGRADE-ramips-mt76x8-creality_wb-01-squashfs-k5.10.46.bin and b/Firmware/OpenWrt_snapshot/openwrt_snapshot_wb-01_k5.10.127-sysupgrade.bin differ diff --git a/README.md b/README.md index 24f671df..87c9ed11 100644 --- a/README.md +++ b/README.md @@ -130,9 +130,9 @@ This method uses 2 scripts to foramt an sd card and make it extroot and another #### STEPS: - Make sure you've flahsed/sysupgraded latest `.bin` file from `/Firmware/OpenWrt_snapshot/` or from latest release. -- Connect to the `KlipperWrt` access point +- Connect to the `OpenWrt` access point - Access LuCi web interface and log in on `192.168.1.1:81` -- _(**optional** but recommended)_ Add a password to the `KlipperWrt` access point: `Wireless` -> Under wireless overview `EDIT` the `KlipperWrt` interface -> `Wireless Security` -> Choose an encryption -> set a password -> `Save` -> `Save & Apply` +- _(**optional** but recommended)_ Add a password to the `OpenWrt` access point: `Wireless` -> Under wireless overview `EDIT` the `OpenWrt` interface -> `Wireless Security` -> Choose an encryption -> set a password -> `Save` -> `Save & Apply` - _(**optional** but recommended)_ Add a password: `System` -> `Administration` -> `Router Password` - ❗If your home network subnet is on 1 (192.168.1.x), in order to avoid any ip conflicts, change the static ip of the box LAN from 192.168.1.1 to something like 192.168.3.1. To do that access the luci webinterface -> `Network` -> `Interfaces` and edit the static ip -> `Save` -> press the down arow on the Save&Apply button -> `Apply Unchecked`. You can now access luci on the new ip and continue configureing Client setup. - Connect as a client to your Internet router: `Network` -> `Wireless` -> `SCAN` -> `Join Network` -> check `Lock to BSSID` -> `Create/Assign Firewall zone` then under `custom` type `wwan` enter -> `Submit` -> `Save` -> `Save & Apply` @@ -160,7 +160,7 @@ This method uses 2 scripts to foramt an sd card and make it extroot and another - remove the scripts when done: `rm -rf /root/*.sh` - Done! -- When done and rebooted use `http://klipperwrt.local` or `http://box-ip`to access the Klipper client +- When done and rebooted use `http://openwrt.local` or `http://box-ip`to access the Klipper client - Done! @@ -170,7 +170,7 @@ This method uses 2 scripts to foramt an sd card and make it extroot and another - add these lines inside your `printer.cfg` depending on your klipper client (mainsail/fluidd): - **Fluidd:** `[include fluidd.cfg]` -`[include fluidd_macros.cfg] # include your macros inside this file` +`[include timelapse.cfg]` - **Mainsail:** `[include mainsail.cfg]` @@ -184,7 +184,7 @@ This method uses 2 scripts to foramt an sd card and make it extroot and another _____________________________________________ *Notes:* - If the box doesn't connect back to your router wirelessly connect to it with an ethernet cable and setup/troubleshoot wifi. -- timelapse is set to autorender which might take a while to finish after a long print. You might set it to ` autorender: False` under `[timelapse]` block inside `moonraker.conf`. Check [here](https://github.com/FrYakaTKoP/moonraker/blob/dev-timelapse/docs/configuration.md#add-the-macro-to-your-slicer) for how to set your `TIMELAPSE_TAKE_FRAME` macro or `TIMELAPSE_TAKE_PARKED_FRAME` inside your slicer layer change. +- Check [here](https://github.com/mainsail-crew/moonraker-timelapse/blob/main/docs/configuration.md#slicer-setup) for how to set your `TIMELAPSE_TAKE_FRAME` macro inside your slicer layer change. diff --git a/klipper_config/fluidd_macros.cfg b/klipper_config/fluidd_macros.cfg deleted file mode 100644 index 94f47e43..00000000 --- a/klipper_config/fluidd_macros.cfg +++ /dev/null @@ -1,47 +0,0 @@ -# These macros are required for Fluidd to correctly function. -# You can copy these entries into your printer.cfg. -# -# Alternatively, import this file by adding -# this line into your printer.cfg; -# -# [include client_macros.cfg] - - - - - - -##################################################################### -######################## TIMELAPSE ################################## -##################################################################### - - -#this macro is called by the slicer layer change command -[gcode_macro TIMELAPSE_TAKE_FRAME] -gcode: - {action_call_remote_method("timelapse_newframe")} - -#this macro will take snapshots with the printerhead parked. If you want that, add this in your slicer layer cahnge instead -[gcode_macro TIMELAPSE_TAKE_PARKED_FRAME] -gcode: - SAVE_GCODE_STATE NAME=SNAPSHOT - G1 E-10 F2100 ;Retract - G91 ;Relative - G1 Z5 ;move up 5 - G90 ;Absolute coordinates - G1 X5 Y205 F6000 ;Move away from the print - - G4 P500 ;Wait for 500ms - TIMELAPSE_TAKE_FRAME ;Take frame - G4 P500 ;Wait for 500ms - G1 E10 F2100 ;Extrude back - - RESTORE_GCODE_STATE NAME=SNAPSHOT MOVE=1 MOVE_SPEED=6000 - - - - -#this macro allows you to render the timelapse if the print has failed or if `autorender` is set to `False` -[gcode_macro TIMELAPSE_RENDER] -gcode: - {action_call_remote_method("timelapse_render")} \ No newline at end of file diff --git a/klipper_config/mainsail.cfg b/klipper_config/mainsail.cfg index 9ffcb630..fa0db87f 100644 --- a/klipper_config/mainsail.cfg +++ b/klipper_config/mainsail.cfg @@ -4,7 +4,7 @@ # # This file may be distributed under the terms of the GNU GPLv3 license # -# Version 1.7 +# Version 1.11 # add [include mainsail.cfg] to your printer.cfg to include it to your printer.cfg # modify x_park, y_park, z_park_delta and extrude value at the macro _TOOLHEAD_PARK_PAUSE_CANCEL if needed @@ -13,6 +13,8 @@ [virtual_sdcard] path: /root/gcode_files +on_error_gcode: + CANCEL_PRINT [pause_resume] @@ -28,6 +30,7 @@ gcode: _TOOLHEAD_PARK_PAUSE_CANCEL {% endif %} TURN_OFF_HEATERS + M106 S0 CANCEL_PRINT_BASE [gcode_macro PAUSE] @@ -56,7 +59,7 @@ gcode: {% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %} {% else %} {action_respond_info("Extruder not hot enough")} - {% endif %} + {% endif %} RESUME_BASE {get_params} [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] diff --git a/moonraker/fluidd_moonraker.conf b/moonraker/fluidd_moonraker.conf index 6ed547ce..0eb48e3a 100644 --- a/moonraker/fluidd_moonraker.conf +++ b/moonraker/fluidd_moonraker.conf @@ -43,6 +43,24 @@ trusted_clients: # enables moonraker to track and store print history. [history] +# this enables moonraker announcements for fluidd +[announcements] +subscriptions: + fluidd + +[timelapse] +## Following basic configuration is default to most images and don't need +## to be changed in most scenarios. Only uncomment and change it if your +## Image differ from standart installations. In most common scenarios +## a User only need [timelapse] in there configuration. +output_path: /root/timelapse/ +## Directory where the generated video will be saved +frame_path: /root/timelapse/snapshots/ +## Directory where the temporary frames are saved +ffmpeg_binary_path: /usr/bin/ffmpeg +## Directory where ffmpeg is installed + + # this enables moonraker's update manager #[update_manager] #enable_auto_refresh: True @@ -51,43 +69,4 @@ trusted_clients: #[update_manager client fluidd] #type: web #repo: cadriel/fluidd -#path: ~/fluidd - - -[timelapse] -enabled: True -## If this set to False the Gcode macros are ignored and -## the autorender is disabled at the end of the print. -## The idea is to disable the plugin by default and only activate -## it during runtime via the http endpoint if a timelapse is desired. -autorender: False -## If this is set to False, the autorender is disabled at the end of the print. -constant_rate_factor: 23 -## The range of the CRF scale is 0–51, where 0 is lossless, -## 23 is the default, and 51 is worst quality possible. -## A lower value generally leads to higher quality, and a -## subjectively sane range is 17–28. -## more info: https://trac.ffmpeg.org/wiki/Encode/H.264 -#output_framerate: 30 -## Output framerate of the generated video -output_path: /root/timelapse/ -## Path where the generated video will be saved -frame_path: /root/timelapse/snapshots/ -## Path where the temporary frames are saved -ffmpeg_binary_path: /usr/bin/ffmpeg -## set location of ffmpeg binary -time_format_code: %Y%m%d_%H%M -## Manipulates datetime format of the output filename -## see: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes -snapshoturl: http://localhost:8080/?action=snapshot -## url to your webcamstream -pixelformat: yuv420p -## set pixelformat for output video -## default to yuv420p because eg. yuvj422p will not play on -## on most smartphones or older media players -#extraoutputparams: -## here you can extra output parameters to FFMPEG -## further info: https://ffmpeg.org/ffmpeg.html -## eg rotate video by 180° "-vf transpose=2,transpose=2" -## or repeat last frame for 5 seconds: -## -filter_complex "[0]trim=0:5[hold];[0][hold]concat[extended];[extended][0]overlay" +#path: ~/fluidd \ No newline at end of file diff --git a/moonraker/mainsail_moonraker.conf b/moonraker/mainsail_moonraker.conf index 17287dce..f0f9b946 100644 --- a/moonraker/mainsail_moonraker.conf +++ b/moonraker/mainsail_moonraker.conf @@ -37,14 +37,10 @@ trusted_clients: # enables moonraker to track and store print history. [history] -# this enables moonraker's update manager -#[update_manager] - -#[update_manager client mainsail] -#type: web -#repo: meteyou/mainsail -#path: ~/mainsail - +# this enables moonraker announcements for mainsail +[announcements] +subscriptions: + mainsail [timelapse] ## Following basic configuration is default to most images and don't need @@ -59,40 +55,12 @@ ffmpeg_binary_path: /usr/bin/ffmpeg ## Directory where ffmpeg is installed -#[timelapse] -#enabled: True -## If this set to False the Gcode macros are ignored and -## the autorender is disabled at the end of the print. -## The idea is to disable the plugin by default and only activate -## it during runtime via the http endpoint if a timelapse is desired. -#autorender: False -## If this is set to False, the autorender is disabled at the end of the print. -#constant_rate_factor: 23 -## The range of the CRF scale is 0–51, where 0 is lossless, -## 23 is the default, and 51 is worst quality possible. -## A lower value generally leads to higher quality, and a -## subjectively sane range is 17–28. -## more info: https://trac.ffmpeg.org/wiki/Encode/H.264 -#output_framerate: 30 -## Output framerate of the generated video -#output_path: /root/timelapse/ -## Path where the generated video will be saved -#frame_path: /root/timelapse/snapshots/ -## Path where the temporary frames are saved -#ffmpeg_binary_path: /usr/bin/ffmpeg -## set location of ffmpeg binary -#time_format_code: %Y%m%d_%H%M -## Manipulates datetime format of the output filename -## see: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes -#snapshoturl: http://localhost:8080/?action=snapshot -## url to your webcamstream -#pixelformat: yuv420p -## set pixelformat for output video -## default to yuv420p because eg. yuvj422p will not play on -## on most smartphones or older media players -#extraoutputparams: -## here you can extra output parameters to FFMPEG -## further info: https://ffmpeg.org/ffmpeg.html -## eg rotate video by 180° "-vf transpose=2,transpose=2" -## or repeat last frame for 5 seconds: -## -filter_complex "[0]trim=0:5[hold];[0][hold]concat[extended];[extended][0]overlay" +# this enables moonraker's update manager +#[update_manager] +#refresh_interval: 168 + +#[update_manager client mainsail] +#type: web +#repo: meteyou/mainsail +#path: ~/mainsail + diff --git a/scripts/2_script_manual.sh b/scripts/2_script_manual.sh index 78899832..d381cf6d 100755 --- a/scripts/2_script_manual.sh +++ b/scripts/2_script_manual.sh @@ -70,32 +70,10 @@ echo "############################" echo " " echo "Installing klipper dependencies..." -### Backup no working distfeed.conf and opkg.conf for future use -mv /etc/opkg/distfeeds.conf /etc/opkg/distfeeds.conf_snapshot; -mv /etc/opkg.conf /etc/opkg.conf_orig; - -## create new distfeeds.conf using 21.02.1 releases -cat << "EOF" > /etc/opkg/distfeeds.conf -src/gz openwrt_core https://downloads.openwrt.org/releases/21.02.1/targets/ramips/mt76x8/packages -src/gz openwrt_base https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/base -src/gz openwrt_luci https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/luci -src/gz openwrt_packages https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/packages -src/gz openwrt_routing https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/routing -src/gz openwrt_telephony https://downloads.openwrt.org/releases/21.02.1/packages/mipsel_24kc/telephony -EOF - -## create new opkg.conf with check_signature disable -cat << "EOF" > /etc/opkg.conf -dest root / -dest ram /tmp -lists_dir ext /var/opkg-lists -option overlay_root /overlay -#option check_signature -EOF -opkg update && opkg install git-http unzip htop zram-swap gcc; +opkg update && opkg install git-http unzip htop gcc patch; -opkg install python3 python3-pip python3-cffi python3-dev python3-greenlet gcc; +opkg install python3 python3-pip python3-cffi python3-dev python3-greenlet; /usr/bin/python3 -m pip install --upgrade pip; pip install jinja2 python-can markupsafe configparser @@ -115,27 +93,14 @@ echo " " echo "Installing moonraker python3 packages..." -opkg install python3 python3-pip python3-pillow python3-tornado python3-distro python3-curl libcurl4 libsodium libffi ip-full --force-overwrite; - - -echo "Fixing libffi symlinks..." -ln -s /usr/lib/libffi.so.8 /usr/lib/libffi.so.7; -ln -s /usr/lib/libffi.so.8 /usr/lib/libffi.so.7.1.0; +opkg install python3-tornado python3-pillow python3-distro python3-curl ip-full libsodium; echo "Upgrading setuptools..." pip install --upgrade setuptools; echo "Installing pip3 packages..." -pip install inotify-simple python-jose libnacl paho-mqtt==1.5.1 dbus-next zeroconf preprocess-cancellation jinja2; - - -echo "Downloading lmdb and streaming-form-data package..." - -wget https://github.com/ihrapsa/KlipperWrt/raw/main/packages/python3-lmdb%2Bstreaming-form-data_packages_1.0-1_mipsel_24kc.ipk -P /root/; +pip install pyserial-asyncio lmdb streaming-form-data inotify-simple libnacl paho-mqtt==1.5.1 zeroconf preprocess-cancellation apprise ldap3 dbus-next; -echo "Installing lmdb and streaming-form-data package..." -opkg install /root/*ipk; -rm -rf *ipk; echo " " echo "###############" @@ -169,7 +134,7 @@ echo "### Moonraker ###" echo "#################" echo " " -git clone https://github.com/ihrapsa/moonraker.git /root/moonraker; +git clone https://github.com/Arksine/moonraker.git /root/moonraker; wget https://raw.githubusercontent.com/ihrapsa/KlipperWrt/main/Services/moonraker -P /etc/init.d/ chmod 755 /etc/init.d/moonraker /etc/init.d/moonraker enable @@ -208,7 +173,7 @@ choose(){ wget -q -O /root/klipper_config/moonraker.conf https://raw.githubusercontent.com/ihrapsa/KlipperWrt/main/moonraker/fluidd_moonraker.conf; wget -q -O /etc/nginx/conf.d/fluidd.conf https://raw.githubusercontent.com/ihrapsa/KlipperWrt/main/nginx/fluidd.conf; wget https://github.com/ihrapsa/KlipperWrt/raw/main/klipper_config/fluidd.cfg -P /root/klipper_config/ - wget https://github.com/ihrapsa/KlipperWrt/raw/main/klipper_config/fluidd_macros.cfg -P /root/klipper_config/ + echo "***************************" echo "** Done! **" @@ -322,7 +287,6 @@ rm -rf /root/ffmpeg; echo "Installing Timelapse packages..." -#wget https://raw.githubusercontent.com/FrYakaTKoP/moonraker/c9ec89ca8a633501b200bce8748538b77b085a57/moonraker/components/timelapse.py -P /root/moonraker/moonraker/components; git clone https://github.com/ihrapsa/moonraker-timelapse.git /root/moonraker-timelapse; /root/moonraker-timelapse/install.sh;