From a08d72eeef62206539cf7c1dde22f1b747e722ef Mon Sep 17 00:00:00 2001 From: Cyril Date: Mon, 25 Mar 2024 21:59:44 +0100 Subject: [PATCH 1/8] Update M600-support.cfg --- files/macros/M600-support.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/files/macros/M600-support.cfg b/files/macros/M600-support.cfg index 2f1d66c..c174b18 100644 --- a/files/macros/M600-support.cfg +++ b/files/macros/M600-support.cfg @@ -39,6 +39,7 @@ gcode: {action_respond_info("z_safe = %s"% (z_safe))} SET_GCODE_VARIABLE MACRO=M600 VARIABLE=m600_state VALUE=1 SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=hotend_temp VALUE={printer.extruder.target} + SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=z_safe_pause VALUE={z_safe|float} RESPOND TYPE=command MSG="Print paused for filament change!" PAUSE_BASE G91 From b3205799e375dc86be4c0e5d55fdb18c8f964abe Mon Sep 17 00:00:00 2001 From: Cyril Date: Mon, 25 Mar 2024 22:32:03 +0100 Subject: [PATCH 2/8] Update M600-support.cfg --- files/macros/M600-support.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/macros/M600-support.cfg b/files/macros/M600-support.cfg index c174b18..eb9f789 100644 --- a/files/macros/M600-support.cfg +++ b/files/macros/M600-support.cfg @@ -106,6 +106,8 @@ gcode: {% set get_params = "" %} {% endif %} {% if printer["gcode_macro M600"].m600_state == 1 %} + RESPOND TYPE=command MSG="Starting hotend heating..." + M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int} {% if printer.extruder.can_extrude|lower == 'true' %} RESPOND TYPE=command MSG="Loading and purging filament..." G91 From 4b5010572aede69b4ba017bdd212e0aa740627ac Mon Sep 17 00:00:00 2001 From: Cyril Date: Thu, 28 Mar 2024 11:29:47 +0100 Subject: [PATCH 3/8] Update M600-support.cfg --- files/macros/M600-support.cfg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/files/macros/M600-support.cfg b/files/macros/M600-support.cfg index eb9f789..14d9520 100644 --- a/files/macros/M600-support.cfg +++ b/files/macros/M600-support.cfg @@ -12,7 +12,7 @@ timeout: 99999999 [filament_switch_sensor filament_sensor] -pause_on_runout: true +pause_on_runout: false switch_pin: !PC15 runout_gcode: M600 @@ -106,8 +106,6 @@ gcode: {% set get_params = "" %} {% endif %} {% if printer["gcode_macro M600"].m600_state == 1 %} - RESPOND TYPE=command MSG="Starting hotend heating..." - M109 S{printer['gcode_macro PRINTER_PARAM'].hotend_temp|int} {% if printer.extruder.can_extrude|lower == 'true' %} RESPOND TYPE=command MSG="Loading and purging filament..." G91 From ac27c6198508c4f9e9b262ab407f3ea928457d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20W=C3=BCrthner?= <5859228+crysxd@users.noreply.github.com> Date: Sat, 30 Mar 2024 15:19:23 +0100 Subject: [PATCH 4/8] Add OctoApp support --- files/moonraker/moonraker.asvc | 1 + scripts/menu/KE/info_menu_KE.sh | 1 + scripts/menu/KE/install_menu_KE.sh | 13 ++++++ scripts/menu/KE/remove_menu_KE.sh | 7 ++++ scripts/menu/info_menu.sh | 1 + scripts/menu/install_menu.sh | 13 ++++++ scripts/menu/remove_menu.sh | 7 ++++ scripts/octoapp_companion.sh | 65 ++++++++++++++++++++++++++++++ scripts/paths.sh | 4 ++ 9 files changed, 112 insertions(+) create mode 100755 scripts/octoapp_companion.sh diff --git a/files/moonraker/moonraker.asvc b/files/moonraker/moonraker.asvc index 966f16f..a30e84a 100644 --- a/files/moonraker/moonraker.asvc +++ b/files/moonraker/moonraker.asvc @@ -4,6 +4,7 @@ MoonCord KlipperScreen moonraker-telegram-bot moonraker-obico +octoapp sonar crowsnest octoeverywhere diff --git a/scripts/menu/KE/info_menu_KE.sh b/scripts/menu/KE/info_menu_KE.sh index 297129b..36b1a09 100755 --- a/scripts/menu/KE/info_menu_KE.sh +++ b/scripts/menu/KE/info_menu_KE.sh @@ -48,6 +48,7 @@ function info_menu_ui_ke() { info_line "$(check_folder_ke "$MOONRAKER_OBICO_FOLDER")" 'Obico' info_line "$(check_folder_ke "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' info_line "$(check_folder_ke "$GUPPYFLO_FOLDER")" 'GuppyFLO' + info_line "$(check_folder_ke "$OCTOAPP_FOLDER")" 'OctoApp Companion' hr subtitle '•CUSTOMIZATION:' info_line "$(check_file_ke "$CREALITY_WEB_FILE")" 'Creality Web Interface' diff --git a/scripts/menu/KE/install_menu_KE.sh b/scripts/menu/KE/install_menu_KE.sh index eb111e9..9280b7a 100755 --- a/scripts/menu/KE/install_menu_KE.sh +++ b/scripts/menu/KE/install_menu_KE.sh @@ -30,6 +30,7 @@ function install_menu_ui_ke() { menu_option '12' 'Install' 'Moonraker Obico' menu_option '13' 'Install' 'Mobileraker Companion' menu_option '14' 'Install' 'GuppyFLO' + menu_option '15' 'Install' 'OctoApp Companion' hr inner_line hr @@ -157,6 +158,18 @@ function install_menu_ke() { else run "install_guppyflo" "install_menu_ui_ke" fi;; + 15) + if [ -d "$OCTOAPP_FOLDER" ]; then + error_msg "OctoApp Companion is already installed!" + elif [ ! -d "$MOONRAKER_FOLDER" ]; then + error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then + error_msg "Fluidd or Mainsail is needed, please install it first!" + elif [ ! -f "$ENTWARE_FILE" ]; then + error_msg "Entware is needed, please install it first!" + else + run "install_octoapp" "install_menu_ui_ke" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/menu/KE/remove_menu_KE.sh b/scripts/menu/KE/remove_menu_KE.sh index f25608d..c8f733b 100755 --- a/scripts/menu/KE/remove_menu_KE.sh +++ b/scripts/menu/KE/remove_menu_KE.sh @@ -30,6 +30,7 @@ function remove_menu_ui_ke() { menu_option '12' 'Remove' 'Moonraker Obico' menu_option '13' 'Remove' 'Mobileraker Companion' menu_option '14' 'Remove' 'GuppyFLO' + menu_option '15' 'Remove' 'OctoApp Companion' hr inner_line hr @@ -153,6 +154,12 @@ function remove_menu_ke() { else run "remove_guppyflo" "remove_menu_ui_ke" fi;; + 15) + if [ ! -d "$OCTOAPP_FOLDER" ]; then + error_msg "OctoApp Companion is not installed!" + else + run "remove_octoapp" "remove_menu_ui_ke" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/menu/info_menu.sh b/scripts/menu/info_menu.sh index 2b21b02..7efdff8 100755 --- a/scripts/menu/info_menu.sh +++ b/scripts/menu/info_menu.sh @@ -56,6 +56,7 @@ function info_menu_ui() { info_line "$(check_folder "$MOONRAKER_OBICO_FOLDER")" 'Obico' info_line "$(check_folder "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' info_line "$(check_folder "$GUPPYFLO_FOLDER")" 'GuppyFLO' + info_line "$(check_folder "$OCTOAPP_FOLDER")" 'OctoApp Companion' hr subtitle '•CUSTOMIZATION:' info_line "$(check_file "$BOOT_DISPLAY_FILE")" 'Custom Boot Display' diff --git a/scripts/menu/install_menu.sh b/scripts/menu/install_menu.sh index 2d7b297..f6e95b9 100755 --- a/scripts/menu/install_menu.sh +++ b/scripts/menu/install_menu.sh @@ -38,6 +38,7 @@ function install_menu_ui() { menu_option '20' 'Install' 'Moonraker Obico' menu_option '21' 'Install' 'Mobileraker Companion' menu_option '22' 'Install' 'GuppyFLO' + menu_option '23' 'Install' 'OctoApp Companion' hr inner_line hr @@ -223,6 +224,18 @@ function install_menu() { else run "install_guppyflo" "install_menu_ui" fi;; + 23) + if [ -d "$OCTOAPP__FOLDER" ]; then + error_msg "OctoApp Companion is already installed!" + elif [ ! -d "$MOONRAKER_FOLDER" ]; then + error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then + error_msg "Fluidd or Mainsail is needed, please install it first!" + elif [ ! -f "$ENTWARE_FILE" ]; then + error_msg "Entware is needed, please install it first!" + else + run "install_octoapp" "install_menu_ui" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/menu/remove_menu.sh b/scripts/menu/remove_menu.sh index a52d71e..daae4d8 100755 --- a/scripts/menu/remove_menu.sh +++ b/scripts/menu/remove_menu.sh @@ -38,6 +38,7 @@ function remove_menu_ui() { menu_option '20' 'Remove' 'Moonraker Obico' menu_option '21' 'Remove' 'Mobileraker Companion' menu_option '22' 'Remove' 'GuppyFLO' + menu_option '23' 'Remove' 'OctoApp Companion' hr inner_line hr @@ -215,6 +216,12 @@ function remove_menu() { else run "remove_guppyflo" "remove_menu_ui" fi;; + 19) + if [ ! -d "$OCTOAPP_FOLDER" ]; then + error_msg "OctoApp Companion is not installed!" + else + run "remove_octoapp" "remove_menu_ui" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/octoapp_companion.sh b/scripts/octoapp_companion.sh new file mode 100755 index 0000000..f1f851e --- /dev/null +++ b/scripts/octoapp_companion.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +set -e + +function octoapp_message(){ + top_line + title 'OctoApp Companion' "${yellow}" + inner_line + hr + echo -e " │ ${cyan}Control your Creality printer from your phone and ${white}│" + echo -e " │ ${cyan}get notifications for your print! ${white}│" + hr + bottom_line +} + +function install_octoapp(){ + octoapp_message + local yn + while true; do + install_msg "OctoApp Companion" yn + case "${yn}" in + Y|y) + echo -e "${white}" + if [ -d "$OCTOAPP_FOLDER" ]; then + echo -e "Info: OctoApp Companion is already installed. Download skipped." + else + echo -e "Info: Downloading OctoApp Companion..." + git config --global http.sslVerify false + git clone "$OCTOAPP_URL" "$OCTOAPP_FOLDER" + fi + echo -e "Info: Running OctoApp Companion installer..." + cd "$OCTOAPP_FOLDER" + sh ./install.sh + ok_msg "OctoApp Companion has been installed successfully!" + return;; + N|n) + error_msg "Installation canceled!" + return;; + *) + error_msg "Please select a correct choice!";; + esac + done +} + +function remove_octoapp(){ + octoapp_message + local yn + while true; do + remove_msg "OctoApp Companion" yn + case "${yn}" in + Y|y) + echo -e "${white}" + echo -e "Info: Running OctoApp Companion installer..." + cd "$OCTOAPP_FOLDER" + sh ./uninstall.sh + ok_msg "OctoApp Companion has been removed successfully!" + return;; + N|n) + error_msg "Deletion canceled!" + return;; + *) + error_msg "Please select a correct choice!";; + esac + done +} \ No newline at end of file diff --git a/scripts/paths.sh b/scripts/paths.sh index c3120b7..6d697c4 100755 --- a/scripts/paths.sh +++ b/scripts/paths.sh @@ -161,6 +161,10 @@ function set_paths() { GUPPY_SCREEN_FOLDER="${USR_DATA}/guppyscreen" GUPPY_SCREEN_URL1="${HS_FILES}/guppy-screen/guppy_update.cfg" GUPPY_SCREEN_URL2="${HS_FILES}/guppy-screen/guppy-update.sh" + + # OctoApp Companion # + OCTOAPP_FOLDER="${USR_DATA}/octoapp" + OCTOAPP_URL="https://github.com/crysxd/OctoApp-Plugin.git" # Creality Dynamic Logos for Fluidd # FLUIDD_LOGO_FILE="${USR_DATA}/fluidd/logo_creality_v2.svg" From 99379f11ddc50a0596f51560cf5ee2fc73a1b687 Mon Sep 17 00:00:00 2001 From: Cyril Date: Sat, 30 Mar 2024 18:32:37 +0100 Subject: [PATCH 5/8] Update --- files/moonraker/moonraker.asvc | 2 +- scripts/menu/KE/info_menu_KE.sh | 4 ++-- scripts/menu/KE/install_menu_KE.sh | 24 ++++++++++++++---------- scripts/menu/KE/remove_menu_KE.sh | 20 ++++++++++---------- scripts/menu/info_menu.sh | 4 ++-- scripts/menu/install_menu.sh | 24 ++++++++++++++---------- scripts/menu/remove_menu.sh | 22 +++++++++++----------- scripts/octoapp_companion.sh | 26 +++++++++++++------------- scripts/octoeverywhere.sh | 2 +- scripts/paths.sh | 16 ++++++++-------- 10 files changed, 76 insertions(+), 68 deletions(-) diff --git a/files/moonraker/moonraker.asvc b/files/moonraker/moonraker.asvc index a30e84a..73771ea 100644 --- a/files/moonraker/moonraker.asvc +++ b/files/moonraker/moonraker.asvc @@ -4,12 +4,12 @@ MoonCord KlipperScreen moonraker-telegram-bot moonraker-obico -octoapp sonar crowsnest octoeverywhere ratos-configurator mobileraker +octoapp guppyscreen guppyflo Git-Backup \ No newline at end of file diff --git a/scripts/menu/KE/info_menu_KE.sh b/scripts/menu/KE/info_menu_KE.sh index 36b1a09..1f1101a 100755 --- a/scripts/menu/KE/info_menu_KE.sh +++ b/scripts/menu/KE/info_menu_KE.sh @@ -46,9 +46,9 @@ function info_menu_ui_ke() { subtitle '•REMOTE ACCESS AND AI DETECTION:' info_line "$(check_folder_ke "$OCTOEVERYWHERE_FOLDER")" 'OctoEverywhere' info_line "$(check_folder_ke "$MOONRAKER_OBICO_FOLDER")" 'Obico' - info_line "$(check_folder_ke "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' info_line "$(check_folder_ke "$GUPPYFLO_FOLDER")" 'GuppyFLO' - info_line "$(check_folder_ke "$OCTOAPP_FOLDER")" 'OctoApp Companion' + info_line "$(check_folder_ke "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' + info_line "$(check_folder_ke "$OCTOAPP_COMPANION_FOLDER")" 'OctoApp Companion' hr subtitle '•CUSTOMIZATION:' info_line "$(check_file_ke "$CREALITY_WEB_FILE")" 'Creality Web Interface' diff --git a/scripts/menu/KE/install_menu_KE.sh b/scripts/menu/KE/install_menu_KE.sh index 9280b7a..9635c0d 100755 --- a/scripts/menu/KE/install_menu_KE.sh +++ b/scripts/menu/KE/install_menu_KE.sh @@ -28,8 +28,8 @@ function install_menu_ui_ke() { subtitle '•REMOTE ACCESS AND AI DETECTION:' menu_option '11' 'Install' 'OctoEverywhere' menu_option '12' 'Install' 'Moonraker Obico' - menu_option '13' 'Install' 'Mobileraker Companion' - menu_option '14' 'Install' 'GuppyFLO' + menu_option '13' 'Install' 'GuppyFLO' + menu_option '14' 'Install' 'Mobileraker Companion' menu_option '15' 'Install' 'OctoApp Companion' hr inner_line @@ -147,19 +147,23 @@ function install_menu_ke() { run "install_moonraker_obico" "install_menu_ui_ke" fi;; 13) - if [ -d "$MOBILERAKER_COMPANION_FOLDER" ]; then - error_msg "Mobileraker Companion is already installed!" - else - run "install_mobileraker_companion" "install_menu_ui_ke" - fi;; - 14) if [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then error_msg "Moonraker and Nginx are needed, please install them first!" else run "install_guppyflo" "install_menu_ui_ke" fi;; + 14) + if [ -d "$MOBILERAKER_COMPANION_FOLDER" ]; then + error_msg "Mobileraker Companion is already installed!" + elif [ ! -d "$MOONRAKER_FOLDER" ]; then + error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then + error_msg "Fluidd or Mainsail is needed, please install it first!" + else + run "install_mobileraker_companion" "install_menu_ui_ke" + fi;; 15) - if [ -d "$OCTOAPP_FOLDER" ]; then + if [ -d "$OCTOAPP_COMPANION_FOLDER" ]; then error_msg "OctoApp Companion is already installed!" elif [ ! -d "$MOONRAKER_FOLDER" ]; then error_msg "Moonraker and Nginx are needed, please install them first!" @@ -168,7 +172,7 @@ function install_menu_ke() { elif [ ! -f "$ENTWARE_FILE" ]; then error_msg "Entware is needed, please install it first!" else - run "install_octoapp" "install_menu_ui_ke" + run "install_octoapp_companion" "install_menu_ui_ke" fi;; B|b) clear; main_menu; break;; diff --git a/scripts/menu/KE/remove_menu_KE.sh b/scripts/menu/KE/remove_menu_KE.sh index c8f733b..7708549 100755 --- a/scripts/menu/KE/remove_menu_KE.sh +++ b/scripts/menu/KE/remove_menu_KE.sh @@ -28,8 +28,8 @@ function remove_menu_ui_ke() { subtitle '•REMOTE ACCESS AND AI DETECTION:' menu_option '11' 'Remove' 'OctoEverywhere' menu_option '12' 'Remove' 'Moonraker Obico' - menu_option '13' 'Remove' 'Mobileraker Companion' - menu_option '14' 'Remove' 'GuppyFLO' + menu_option '13' 'Remove' 'GuppyFLO' + menu_option '14' 'Remove' 'Mobileraker Companion' menu_option '15' 'Remove' 'OctoApp Companion' hr inner_line @@ -143,22 +143,22 @@ function remove_menu_ke() { run "remove_moonraker_obico" "remove_menu_ui_ke" fi;; 13) - if [ ! -d "$MOBILERAKER_COMPANION_FOLDER" ]; then - error_msg "Mobileraker Companion is not installed!" - else - run "remove_mobileraker_companion" "remove_menu_ui_ke" - fi;; - 14) if [ ! -d "$GUPPYFLO_FOLDER" ]; then error_msg "GuppyFLO is not installed!" else run "remove_guppyflo" "remove_menu_ui_ke" fi;; + 14) + if [ ! -d "$MOBILERAKER_COMPANION_FOLDER" ]; then + error_msg "Mobileraker Companion is not installed!" + else + run "remove_mobileraker_companion" "remove_menu_ui_ke" + fi;; 15) - if [ ! -d "$OCTOAPP_FOLDER" ]; then + if [ ! -d "$OCTOAPP_COMPANION_FOLDER" ]; then error_msg "OctoApp Companion is not installed!" else - run "remove_octoapp" "remove_menu_ui_ke" + run "remove_octoapp_companion" "remove_menu_ui_ke" fi;; B|b) clear; main_menu; break;; diff --git a/scripts/menu/info_menu.sh b/scripts/menu/info_menu.sh index 7efdff8..60b180f 100755 --- a/scripts/menu/info_menu.sh +++ b/scripts/menu/info_menu.sh @@ -54,9 +54,9 @@ function info_menu_ui() { subtitle '•REMOTE ACCESS AND AI DETECTION:' info_line "$(check_folder "$OCTOEVERYWHERE_FOLDER")" 'OctoEverywhere' info_line "$(check_folder "$MOONRAKER_OBICO_FOLDER")" 'Obico' - info_line "$(check_folder "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' info_line "$(check_folder "$GUPPYFLO_FOLDER")" 'GuppyFLO' - info_line "$(check_folder "$OCTOAPP_FOLDER")" 'OctoApp Companion' + info_line "$(check_folder "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' + info_line "$(check_folder "$OCTOAPP_COMPANION_FOLDER")" 'OctoApp Companion' hr subtitle '•CUSTOMIZATION:' info_line "$(check_file "$BOOT_DISPLAY_FILE")" 'Custom Boot Display' diff --git a/scripts/menu/install_menu.sh b/scripts/menu/install_menu.sh index f6e95b9..add1f4b 100755 --- a/scripts/menu/install_menu.sh +++ b/scripts/menu/install_menu.sh @@ -36,8 +36,8 @@ function install_menu_ui() { subtitle '•REMOTE ACCESS AND AI DETECTION:' menu_option '19' 'Install' 'OctoEverywhere' menu_option '20' 'Install' 'Moonraker Obico' - menu_option '21' 'Install' 'Mobileraker Companion' - menu_option '22' 'Install' 'GuppyFLO' + menu_option '21' 'Install' 'GuppyFLO' + menu_option '22' 'Install' 'Mobileraker Companion' menu_option '23' 'Install' 'OctoApp Companion' hr inner_line @@ -213,19 +213,23 @@ function install_menu() { run "install_moonraker_obico" "install_menu_ui" fi;; 21) - if [ -d "$MOBILERAKER_COMPANION_FOLDER" ]; then - error_msg "Mobileraker Companion is already installed!" - else - run "install_mobileraker_companion" "install_menu_ui" - fi;; - 22) if [ ! -d "$MOONRAKER_FOLDER" ] && [ ! -d "$NGINX_FOLDER" ]; then error_msg "Moonraker and Nginx are needed, please install them first!" else run "install_guppyflo" "install_menu_ui" fi;; + 22) + if [ -d "$MOBILERAKER_COMPANION_FOLDER" ]; then + error_msg "Mobileraker Companion is already installed!" + elif [ ! -d "$MOONRAKER_FOLDER" ]; then + error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then + error_msg "Fluidd or Mainsail is needed, please install it first!" + else + run "install_mobileraker_companion" "install_menu_ui" + fi;; 23) - if [ -d "$OCTOAPP__FOLDER" ]; then + if [ -d "$OCTOAPP_COMPANION_FOLDER" ]; then error_msg "OctoApp Companion is already installed!" elif [ ! -d "$MOONRAKER_FOLDER" ]; then error_msg "Moonraker and Nginx are needed, please install them first!" @@ -234,7 +238,7 @@ function install_menu() { elif [ ! -f "$ENTWARE_FILE" ]; then error_msg "Entware is needed, please install it first!" else - run "install_octoapp" "install_menu_ui" + run "install_octoapp_companion" "install_menu_ui" fi;; B|b) clear; main_menu; break;; diff --git a/scripts/menu/remove_menu.sh b/scripts/menu/remove_menu.sh index daae4d8..efc0f62 100755 --- a/scripts/menu/remove_menu.sh +++ b/scripts/menu/remove_menu.sh @@ -36,8 +36,8 @@ function remove_menu_ui() { subtitle '•REMOTE ACCESS AND AI DETECTION:' menu_option '19' 'Remove' 'OctoEverywhere' menu_option '20' 'Remove' 'Moonraker Obico' - menu_option '21' 'Remove' 'Mobileraker Companion' - menu_option '22' 'Remove' 'GuppyFLO' + menu_option '21' 'Remove' 'GuppyFLO' + menu_option '22' 'Remove' 'Mobileraker Companion' menu_option '23' 'Remove' 'OctoApp Companion' hr inner_line @@ -205,22 +205,22 @@ function remove_menu() { run "remove_moonraker_obico" "remove_menu_ui" fi;; 21) - if [ ! -d "$MOBILERAKER_COMPANION_FOLDER" ]; then - error_msg "Mobileraker Companion is not installed!" - else - run "remove_mobileraker_companion" "remove_menu_ui" - fi;; - 22) if [ ! -d "$GUPPYFLO_FOLDER" ]; then error_msg "GuppyFLO is not installed!" else run "remove_guppyflo" "remove_menu_ui" fi;; - 19) - if [ ! -d "$OCTOAPP_FOLDER" ]; then + 22) + if [ ! -d "$MOBILERAKER_COMPANION_FOLDER" ]; then + error_msg "Mobileraker Companion is not installed!" + else + run "remove_mobileraker_companion" "remove_menu_ui" + fi;; + 23) + if [ ! -d "$OCTOAPP_COMPANION_FOLDER" ]; then error_msg "OctoApp Companion is not installed!" else - run "remove_octoapp" "remove_menu_ui" + run "remove_octoapp_companion" "remove_menu_ui" fi;; B|b) clear; main_menu; break;; diff --git a/scripts/octoapp_companion.sh b/scripts/octoapp_companion.sh index f1f851e..bd499d5 100755 --- a/scripts/octoapp_companion.sh +++ b/scripts/octoapp_companion.sh @@ -2,34 +2,34 @@ set -e -function octoapp_message(){ +function octoapp_companion_message(){ top_line title 'OctoApp Companion' "${yellow}" inner_line hr - echo -e " │ ${cyan}Control your Creality printer from your phone and ${white}│" - echo -e " │ ${cyan}get notifications for your print! ${white}│" + echo -e " │ ${cyan}OctoApp Companion allows you to control your printer from ${white}│" + echo -e " │ ${cyan}OctoApp and get notifications for your prints. ${white}│" hr bottom_line } -function install_octoapp(){ - octoapp_message +function install_octoapp_companion(){ + octoapp_companion_message local yn while true; do install_msg "OctoApp Companion" yn case "${yn}" in Y|y) echo -e "${white}" - if [ -d "$OCTOAPP_FOLDER" ]; then + if [ -d "$OCTOAPP_COMPANION_FOLDER" ]; then echo -e "Info: OctoApp Companion is already installed. Download skipped." else echo -e "Info: Downloading OctoApp Companion..." git config --global http.sslVerify false - git clone "$OCTOAPP_URL" "$OCTOAPP_FOLDER" + git clone "$OCTOAPP_URL" "$OCTOAPP_COMPANION_FOLDER" fi echo -e "Info: Running OctoApp Companion installer..." - cd "$OCTOAPP_FOLDER" + cd "$OCTOAPP_COMPANION_FOLDER" sh ./install.sh ok_msg "OctoApp Companion has been installed successfully!" return;; @@ -42,17 +42,17 @@ function install_octoapp(){ done } -function remove_octoapp(){ - octoapp_message +function remove_octoapp_companion(){ + octoapp_companion_message local yn while true; do remove_msg "OctoApp Companion" yn case "${yn}" in Y|y) echo -e "${white}" - echo -e "Info: Running OctoApp Companion installer..." - cd "$OCTOAPP_FOLDER" - sh ./uninstall.sh + echo -e "Info: Running OctoApp Companion uninstaller..." + cd "$OCTOAPP_COMPANION_FOLDER" + sh ./uninstall.sh ok_msg "OctoApp Companion has been removed successfully!" return;; N|n) diff --git a/scripts/octoeverywhere.sh b/scripts/octoeverywhere.sh index ce23817..e60cfda 100755 --- a/scripts/octoeverywhere.sh +++ b/scripts/octoeverywhere.sh @@ -51,7 +51,7 @@ function remove_octoeverywhere(){ case "${yn}" in Y|y) echo -e "${white}" - echo -e "Info: Running OctoEverywhere installer..." + echo -e "Info: Running OctoEverywhere uninstaller..." cd "$OCTOEVERYWHERE_FOLDER" sh ./uninstall.sh ok_msg "OctoEverywhere has been removed successfully!" diff --git a/scripts/paths.sh b/scripts/paths.sh index 6d697c4..d05d5a2 100755 --- a/scripts/paths.sh +++ b/scripts/paths.sh @@ -139,13 +139,17 @@ function set_paths() { MOONRAKER_OBICO_FOLDER="${USR_DATA}/moonraker-obico" MOONRAKER_OBICO_URL="https://github.com/TheSpaghettiDetective/moonraker-obico.git" - # Mobileraker Companion # - MOBILERAKER_COMPANION_FOLDER="${USR_DATA}/mobileraker_companion" - MOBILERAKER_COMPANION_URL="https://github.com/Clon1998/mobileraker_companion.git" - # GuppyFLO # GUPPYFLO_FOLDER="${USR_DATA}/guppyflo" GUPPYFLO_URL="https://github.com/ballaswag/guppyflo/releases/latest/download/guppyflo_mipsle.zip" + + # Mobileraker Companion # + MOBILERAKER_COMPANION_FOLDER="${USR_DATA}/mobileraker_companion" + MOBILERAKER_COMPANION_URL="https://github.com/Clon1998/mobileraker_companion.git" + + # OctoApp Companion # + OCTOAPP_COMPANION_FOLDER="${USR_DATA}/octoapp" + OCTOAPP_COMPANION_URL="https://github.com/crysxd/OctoApp-Plugin.git" # Custom Boot Display # BOOT_DISPLAY_FOLDER="/etc/boot-display" @@ -161,10 +165,6 @@ function set_paths() { GUPPY_SCREEN_FOLDER="${USR_DATA}/guppyscreen" GUPPY_SCREEN_URL1="${HS_FILES}/guppy-screen/guppy_update.cfg" GUPPY_SCREEN_URL2="${HS_FILES}/guppy-screen/guppy-update.sh" - - # OctoApp Companion # - OCTOAPP_FOLDER="${USR_DATA}/octoapp" - OCTOAPP_URL="https://github.com/crysxd/OctoApp-Plugin.git" # Creality Dynamic Logos for Fluidd # FLUIDD_LOGO_FILE="${USR_DATA}/fluidd/logo_creality_v2.svg" From 04ad1fc88747d507f845d6dd039f77b2149a7b1c Mon Sep 17 00:00:00 2001 From: Cyril Date: Sat, 30 Mar 2024 18:39:28 +0100 Subject: [PATCH 6/8] Update octoapp_companion.sh --- scripts/octoapp_companion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/octoapp_companion.sh b/scripts/octoapp_companion.sh index bd499d5..c19a729 100755 --- a/scripts/octoapp_companion.sh +++ b/scripts/octoapp_companion.sh @@ -26,7 +26,7 @@ function install_octoapp_companion(){ else echo -e "Info: Downloading OctoApp Companion..." git config --global http.sslVerify false - git clone "$OCTOAPP_URL" "$OCTOAPP_COMPANION_FOLDER" + git clone "$OCTOAPP_COMPANION_URL" "$OCTOAPP_COMPANION_FOLDER" fi echo -e "Info: Running OctoApp Companion installer..." cd "$OCTOAPP_COMPANION_FOLDER" From 041223591fef8271fc529dd68ee7e17235111bc0 Mon Sep 17 00:00:00 2001 From: Cyril Date: Sun, 31 Mar 2024 15:54:13 +0200 Subject: [PATCH 7/8] Update --- scripts/menu/KE/info_menu_KE.sh | 2 +- scripts/menu/KE/install_menu_KE.sh | 2 +- scripts/menu/KE/remove_menu_KE.sh | 2 +- scripts/menu/info_menu.sh | 2 +- scripts/menu/install_menu.sh | 2 +- scripts/menu/remove_menu.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/menu/KE/info_menu_KE.sh b/scripts/menu/KE/info_menu_KE.sh index 1f1101a..c597908 100755 --- a/scripts/menu/KE/info_menu_KE.sh +++ b/scripts/menu/KE/info_menu_KE.sh @@ -43,7 +43,7 @@ function info_menu_ui_ke() { subtitle '•CAMERA:' info_line "$(check_file_ke "$TIMELAPSE_FILE")" 'Moonraker Timelapse' hr - subtitle '•REMOTE ACCESS AND AI DETECTION:' + subtitle '•REMOTE ACCESS:' info_line "$(check_folder_ke "$OCTOEVERYWHERE_FOLDER")" 'OctoEverywhere' info_line "$(check_folder_ke "$MOONRAKER_OBICO_FOLDER")" 'Obico' info_line "$(check_folder_ke "$GUPPYFLO_FOLDER")" 'GuppyFLO' diff --git a/scripts/menu/KE/install_menu_KE.sh b/scripts/menu/KE/install_menu_KE.sh index 9635c0d..2a2e2ec 100755 --- a/scripts/menu/KE/install_menu_KE.sh +++ b/scripts/menu/KE/install_menu_KE.sh @@ -25,7 +25,7 @@ function install_menu_ui_ke() { subtitle '•CAMERA:' menu_option '10' 'Install' 'Moonraker Timelapse' hr - subtitle '•REMOTE ACCESS AND AI DETECTION:' + subtitle '•REMOTE ACCESS:' menu_option '11' 'Install' 'OctoEverywhere' menu_option '12' 'Install' 'Moonraker Obico' menu_option '13' 'Install' 'GuppyFLO' diff --git a/scripts/menu/KE/remove_menu_KE.sh b/scripts/menu/KE/remove_menu_KE.sh index 7708549..0a52f31 100755 --- a/scripts/menu/KE/remove_menu_KE.sh +++ b/scripts/menu/KE/remove_menu_KE.sh @@ -25,7 +25,7 @@ function remove_menu_ui_ke() { subtitle '•CAMERA:' menu_option '10' 'Remove' 'Moonraker Timelapse' hr - subtitle '•REMOTE ACCESS AND AI DETECTION:' + subtitle '•REMOTE ACCESS:' menu_option '11' 'Remove' 'OctoEverywhere' menu_option '12' 'Remove' 'Moonraker Obico' menu_option '13' 'Remove' 'GuppyFLO' diff --git a/scripts/menu/info_menu.sh b/scripts/menu/info_menu.sh index 60b180f..351543d 100755 --- a/scripts/menu/info_menu.sh +++ b/scripts/menu/info_menu.sh @@ -51,7 +51,7 @@ function info_menu_ui() { info_line "$(check_file "$TIMELAPSE_FILE")" 'Moonraker Timelapse' info_line "$(check_file "$CAMERA_SETTINGS_FILE")" 'Camera Settings Control' hr - subtitle '•REMOTE ACCESS AND AI DETECTION:' + subtitle '•REMOTE ACCESS:' info_line "$(check_folder "$OCTOEVERYWHERE_FOLDER")" 'OctoEverywhere' info_line "$(check_folder "$MOONRAKER_OBICO_FOLDER")" 'Obico' info_line "$(check_folder "$GUPPYFLO_FOLDER")" 'GuppyFLO' diff --git a/scripts/menu/install_menu.sh b/scripts/menu/install_menu.sh index add1f4b..ff77f4a 100755 --- a/scripts/menu/install_menu.sh +++ b/scripts/menu/install_menu.sh @@ -33,7 +33,7 @@ function install_menu_ui() { menu_option '17' 'Install' 'Moonraker Timelapse' menu_option '18' 'Install' 'Camera Settings Control' hr - subtitle '•REMOTE ACCESS AND AI DETECTION:' + subtitle '•REMOTE ACCESS:' menu_option '19' 'Install' 'OctoEverywhere' menu_option '20' 'Install' 'Moonraker Obico' menu_option '21' 'Install' 'GuppyFLO' diff --git a/scripts/menu/remove_menu.sh b/scripts/menu/remove_menu.sh index efc0f62..3d0c226 100755 --- a/scripts/menu/remove_menu.sh +++ b/scripts/menu/remove_menu.sh @@ -33,7 +33,7 @@ function remove_menu_ui() { menu_option '17' 'Remove' 'Moonraker Timelapse' menu_option '18' 'Remove' 'Camera Settings Control' hr - subtitle '•REMOTE ACCESS AND AI DETECTION:' + subtitle '•REMOTE ACCESS:' menu_option '19' 'Remove' 'OctoEverywhere' menu_option '20' 'Remove' 'Moonraker Obico' menu_option '21' 'Remove' 'GuppyFLO' From 9e9081e4ccbf45fa8df067570e4fca985bdbbec3 Mon Sep 17 00:00:00 2001 From: Cyril Date: Sun, 31 Mar 2024 23:35:16 +0200 Subject: [PATCH 8/8] Update --- scripts/menu/KE/info_menu_KE.sh | 9 ++++ scripts/menu/KE/install_menu_KE.sh | 11 +++++ scripts/menu/KE/remove_menu_KE.sh | 7 +++ scripts/menu/info_menu.sh | 9 ++++ scripts/menu/install_menu.sh | 11 +++++ scripts/menu/remove_menu.sh | 7 +++ scripts/octoapp_companion.sh | 1 + scripts/simplyprint.sh | 71 ++++++++++++++++++++++++++++++ 8 files changed, 126 insertions(+) create mode 100755 scripts/simplyprint.sh diff --git a/scripts/menu/KE/info_menu_KE.sh b/scripts/menu/KE/info_menu_KE.sh index c597908..627b4c5 100755 --- a/scripts/menu/KE/info_menu_KE.sh +++ b/scripts/menu/KE/info_menu_KE.sh @@ -20,6 +20,14 @@ function check_file_ke() { fi } +function check_simplyprint_ke() { + if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then + echo -e "${green}✓" + else + echo -e "${red}✗" + fi +} + function info_menu_ui_ke() { top_line title '[ INFORMATIONS MENU ]' "${yellow}" @@ -49,6 +57,7 @@ function info_menu_ui_ke() { info_line "$(check_folder_ke "$GUPPYFLO_FOLDER")" 'GuppyFLO' info_line "$(check_folder_ke "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' info_line "$(check_folder_ke "$OCTOAPP_COMPANION_FOLDER")" 'OctoApp Companion' + info_line "$(check_simplyprint_ke)" 'SimplyPrint' hr subtitle '•CUSTOMIZATION:' info_line "$(check_file_ke "$CREALITY_WEB_FILE")" 'Creality Web Interface' diff --git a/scripts/menu/KE/install_menu_KE.sh b/scripts/menu/KE/install_menu_KE.sh index 2a2e2ec..e3bbc8a 100755 --- a/scripts/menu/KE/install_menu_KE.sh +++ b/scripts/menu/KE/install_menu_KE.sh @@ -31,6 +31,7 @@ function install_menu_ui_ke() { menu_option '13' 'Install' 'GuppyFLO' menu_option '14' 'Install' 'Mobileraker Companion' menu_option '15' 'Install' 'OctoApp Companion' + menu_option '16' 'Install' 'SimplyPrint' hr inner_line hr @@ -174,6 +175,16 @@ function install_menu_ke() { else run "install_octoapp_companion" "install_menu_ui_ke" fi;; + 16) + if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then + error_msg "SimplyPrint is already installed!" + elif [ ! -d "$MOONRAKER_FOLDER" ]; then + error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then + error_msg "Fluidd or Mainsail is needed, please install it first!" + else + run "install_simplyprint" "install_menu_ui_ke" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/menu/KE/remove_menu_KE.sh b/scripts/menu/KE/remove_menu_KE.sh index 0a52f31..74ee2e4 100755 --- a/scripts/menu/KE/remove_menu_KE.sh +++ b/scripts/menu/KE/remove_menu_KE.sh @@ -31,6 +31,7 @@ function remove_menu_ui_ke() { menu_option '13' 'Remove' 'GuppyFLO' menu_option '14' 'Remove' 'Mobileraker Companion' menu_option '15' 'Remove' 'OctoApp Companion' + menu_option '16' 'Remove' 'SimplyPrint' hr inner_line hr @@ -160,6 +161,12 @@ function remove_menu_ke() { else run "remove_octoapp_companion" "remove_menu_ui_ke" fi;; + 16) + if ! grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then + error_msg "SimplyPrint is not installed!" + else + run "remove_simplyprint" "remove_menu_ui" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/menu/info_menu.sh b/scripts/menu/info_menu.sh index 351543d..d6e9a23 100755 --- a/scripts/menu/info_menu.sh +++ b/scripts/menu/info_menu.sh @@ -20,6 +20,14 @@ function check_file() { fi } +function check_simplyprint() { + if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then + echo -e "${green}✓" + else + echo -e "${red}✗" + fi +} + function info_menu_ui() { top_line title '[ INFORMATIONS MENU ]' "${yellow}" @@ -57,6 +65,7 @@ function info_menu_ui() { info_line "$(check_folder "$GUPPYFLO_FOLDER")" 'GuppyFLO' info_line "$(check_folder "$MOBILERAKER_COMPANION_FOLDER")" 'Mobileraker Companion' info_line "$(check_folder "$OCTOAPP_COMPANION_FOLDER")" 'OctoApp Companion' + info_line "$(check_simplyprint)" 'SimplyPrint' hr subtitle '•CUSTOMIZATION:' info_line "$(check_file "$BOOT_DISPLAY_FILE")" 'Custom Boot Display' diff --git a/scripts/menu/install_menu.sh b/scripts/menu/install_menu.sh index ff77f4a..e2fa220 100755 --- a/scripts/menu/install_menu.sh +++ b/scripts/menu/install_menu.sh @@ -39,6 +39,7 @@ function install_menu_ui() { menu_option '21' 'Install' 'GuppyFLO' menu_option '22' 'Install' 'Mobileraker Companion' menu_option '23' 'Install' 'OctoApp Companion' + menu_option '24' 'Install' 'SimplyPrint' hr inner_line hr @@ -240,6 +241,16 @@ function install_menu() { else run "install_octoapp_companion" "install_menu_ui" fi;; + 24) + if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then + error_msg "SimplyPrint is already installed!" + elif [ ! -d "$MOONRAKER_FOLDER" ]; then + error_msg "Moonraker and Nginx are needed, please install them first!" + elif [ ! -d "$FLUIDD_FOLDER" ] && [ ! -d "$MAINSAIL_FOLDER" ]; then + error_msg "Fluidd or Mainsail is needed, please install it first!" + else + run "install_simplyprint" "install_menu_ui" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/menu/remove_menu.sh b/scripts/menu/remove_menu.sh index 3d0c226..71c2206 100755 --- a/scripts/menu/remove_menu.sh +++ b/scripts/menu/remove_menu.sh @@ -39,6 +39,7 @@ function remove_menu_ui() { menu_option '21' 'Remove' 'GuppyFLO' menu_option '22' 'Remove' 'Mobileraker Companion' menu_option '23' 'Remove' 'OctoApp Companion' + menu_option '24' 'Remove' 'SimplyPrint' hr inner_line hr @@ -222,6 +223,12 @@ function remove_menu() { else run "remove_octoapp_companion" "remove_menu_ui" fi;; + 24) + if ! grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then + error_msg "SimplyPrint is not installed!" + else + run "remove_simplyprint" "remove_menu_ui" + fi;; B|b) clear; main_menu; break;; Q|q) diff --git a/scripts/octoapp_companion.sh b/scripts/octoapp_companion.sh index c19a729..3bcccbe 100755 --- a/scripts/octoapp_companion.sh +++ b/scripts/octoapp_companion.sh @@ -53,6 +53,7 @@ function remove_octoapp_companion(){ echo -e "Info: Running OctoApp Companion uninstaller..." cd "$OCTOAPP_COMPANION_FOLDER" sh ./uninstall.sh + rm -f /root/update-OctoApp.sh ok_msg "OctoApp Companion has been removed successfully!" return;; N|n) diff --git a/scripts/simplyprint.sh b/scripts/simplyprint.sh new file mode 100755 index 0000000..2aaaad5 --- /dev/null +++ b/scripts/simplyprint.sh @@ -0,0 +1,71 @@ +#!/bin/sh + +set -e + +function simplyprint_message(){ + top_line + title 'SimplyPrint' "${yellow}" + inner_line + hr + echo -e " │ ${cyan}SimplyPrint allows you to start those prints that you just ${white}│" + echo -e " │ ${cyan}need to be done sooner rather than later. You can send print ${white}│" + echo -e " │ ${cyan}jobs to your printer from anywhere in the world. ${white}│" + hr + bottom_line +} + +function install_simplyprint(){ + simplyprint_message + local yn + while true; do + install_msg "SimplyPrint" yn + case "${yn}" in + Y|y) + echo -e "${white}" + if ! grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then + echo -e "Info: Enabling SimplyPrint configurations in moonraker.conf file..." + sed -i -e '/\[simplyprint\]/!{ $s/$/\n\n[simplyprint]/;}' "$MOONRAKER_CFG" + else + echo -e "Info: SimplyPrint configurations are already enabled in moonraker.conf file..." + fi + echo -e "Info: Restarting Moonraker service..." + stop_moonraker + start_moonraker + ok_msg "SimplyPrint has been installed successfully!" + return;; + N|n) + error_msg "Installation canceled!" + return;; + *) + error_msg "Please select a correct choice!";; + esac + done +} + +function remove_simplyprint(){ + simplyprint_message + local yn + while true; do + remove_msg "SimplyPrint" yn + case "${yn}" in + Y|y) + echo -e "${white}" + if grep -q "\[simplyprint\]" "$MOONRAKER_CFG"; then + echo "Info: Removing SimplyPrint configurations in moonraker.conf file..." + sed -i -e '/\[simplyprint\]/{x;d;};x' "$MOONRAKER_CFG" + else + echo "Info: SimplyPrint configurations are already removed in moonraker.conf file." + fi + echo -e "Info: Restarting Moonraker service..." + stop_moonraker + start_moonraker + ok_msg "SimplyPrint has been removed successfully!" + return;; + N|n) + error_msg "Deletion canceled!" + return;; + *) + error_msg "Please select a correct choice!";; + esac + done +} \ No newline at end of file