From 5cec9213c979a803e307f5a1407f9423178e07ce Mon Sep 17 00:00:00 2001 From: seanauff Date: Tue, 29 Sep 2020 17:05:14 -0400 Subject: [PATCH 01/45] add note about reconnecting after power cycle --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index e1ca776..15090ce 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,10 @@ A sample docker-compose file is also provided. If you have any questions, feel free to log an issue on this project, and I'll see if I can help. +## Reconnecting to MCU after board power cycle + +Depending on your power situation, removing power from the printer main board will interrupt the serial connection. I had to give my container some more permissions in order to detect the coonection again without restarting the entire container. There is some discussion [here](https://github.com/moby/moby/issues/35359) and [here](https://www.losant.com/blog/how-to-access-serial-devices-in-docker). + ## Updates The easiest way to update is to pull the latest image and recreate the container. You could also build the image yourself to get the latest updates. I have had success in using the Octoprint built in updater to upgrade plugins, as well as install new ones. Any upgrades conducted in this manner will be lost upon recreation of the container. From 83d961f83163c2a95a1c377b9bf74092d98db22a Mon Sep 17 00:00:00 2001 From: seanauff Date: Sat, 5 Dec 2020 17:00:31 -0500 Subject: [PATCH 02/45] add UI customizer plugin --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 517e180..ff1f721 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,8 @@ https://github.com/marian42/octoprint-preheat/archive/master.zip \ https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip \ https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \ https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/archive/master.zip \ -https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/archive/master.zip +https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/archive/master.zip \ +https://github.com/LazeMSS/OctoPrint-UICustomizer/archive/main.zip VOLUME /home/octoprint/.octoprint From 87babde79a2f1d4384b35587edc770081779794d Mon Sep 17 00:00:00 2001 From: seanauff Date: Sat, 6 Feb 2021 12:28:54 -0500 Subject: [PATCH 03/45] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 15090ce..0a7a633 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ If you have any questions, feel free to log an issue on this project, and I'll s ## Reconnecting to MCU after board power cycle -Depending on your power situation, removing power from the printer main board will interrupt the serial connection. I had to give my container some more permissions in order to detect the coonection again without restarting the entire container. There is some discussion [here](https://github.com/moby/moby/issues/35359) and [here](https://www.losant.com/blog/how-to-access-serial-devices-in-docker). +Depending on your power situation, removing power from the printer main board will interrupt the serial connection. I had to give my container some more permissions in order to detect the connection again without restarting the entire container. There is some discussion [here](https://github.com/moby/moby/issues/35359) and [here](https://www.losant.com/blog/how-to-access-serial-devices-in-docker). ## Updates From 12ccddddb3f626f398e269952fbed142c519b7e3 Mon Sep 17 00:00:00 2001 From: seanauff Date: Mon, 15 Nov 2021 19:34:59 -0500 Subject: [PATCH 04/45] add notice --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0a7a633..75cd928 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # OctoPrint-Klipper +*I no longer use this image (using [Kiauh] instead) so this will be rarely updated.* + My version of a Docker image for running [OctoPrint] and [Klipper] in a single container. Includes a few plugins I find useful. Big thanks to [sillyfrog](https://github.com/sillyfrog) for laying the groundwork for this image. @@ -59,3 +61,4 @@ docker build -t seanauff/octoprint-klipper --no-cache -pull OctoPrint-Klipper [Octoprint]: https://github.com/foosel/OctoPrint [Klipper]: https://github.com/KevinOConnor/klipper +[Kiauh]: https://github.com/th33xitus/kiauh From 455fc1143b03067b64bfa984a67b8497644453c7 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 20:47:22 +0700 Subject: [PATCH 05/45] add Jenkinsfile --- Jenkinsfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..d235b1c --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,27 @@ +pipeline { + agent any + + stages { + stage('Clone') { + steps { + git branch: 'ender3s1', url: 'https://git.siwatsystem.com/satitchula-printfarm/octoprint-klipper-docker' + } + } + stage('Build Docker Image') { + steps { + script { + image = docker.build("siwatinc/octoprint-klipper:ender3s1") + } + } + } + stage('Publish Docker Image') { + steps { + script { + docker.withRegistry("https://ghcr.io/v2") { + image.push() + } + } + } + } + } +} \ No newline at end of file From e5f4f78560e8a4415dd16724b3b503f773d9c3d0 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 21:02:23 +0700 Subject: [PATCH 06/45] switch to siwatinc baseimage --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff1f721..6bdca9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM ubuntu:18.04 +FROM ghcr.io/siwatinc/siwat-ubuntubaseimage:focal ARG DEBIAN_FRONTEND=noninteractive -ENV TZ=America/New_York +ENV TZ=Asia/Bangkok RUN apt-get update && apt-get install -y \ cmake \ @@ -52,9 +52,8 @@ https://github.com/OllisGit/OctoPrint-PrintJobHistory/releases/latest/download/m https://github.com/marian42/octoprint-preheat/archive/master.zip \ https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip \ https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \ -https://github.com/jneilliii/OctoPrint-UltimakerFormatPackage/archive/master.zip \ https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/archive/master.zip \ -https://github.com/LazeMSS/OctoPrint-UICustomizer/archive/main.zip +https://github.com/TheSpaghettiDetective/OctoPrint-TheSpaghettiDetective/archive/master.zip VOLUME /home/octoprint/.octoprint From 1285bd850331db6177d91016d69b7e85ec35c73a Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 21:02:30 +0700 Subject: [PATCH 07/45] add printer.cfg --- printer.cfg | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 printer.cfg diff --git a/printer.cfg b/printer.cfg new file mode 100644 index 0000000..ebe9511 --- /dev/null +++ b/printer.cfg @@ -0,0 +1,198 @@ +# Ender 3 S1 Config, Satit Chula Specific + +[stepper_x] +step_pin: PC2 +dir_pin: PB9 +enable_pin: !PC3 +microsteps: 16 +rotation_distance: 40 +endstop_pin: !PA5 +position_endstop: 0 +position_max: 258 +homing_speed: 50 + +[stepper_y] +step_pin: PB8 +dir_pin: PB7 +enable_pin: !PC3 +microsteps: 16 +rotation_distance: 40 +endstop_pin: !PA6 +position_endstop: 0 +position_max: 230 +homing_speed: 50 + +[stepper_z] +step_pin: PB6 +dir_pin: !PB5 +enable_pin: !PC3 +microsteps: 16 +rotation_distance: 8 +endstop_pin: probe:z_virtual_endstop +position_max: 270 +position_min: -5 + +[extruder] +max_extrude_only_distance: 100.0 +step_pin: PB4 +dir_pin: PB3 +enable_pin: !PC3 +microsteps: 16 +rotation_distance: 7.6190 +nozzle_diameter: 0.400 +filament_diameter: 1.750 +heater_pin: PA1 +sensor_type: EPCOS 100K B57560G104F +sensor_pin: PC5 +control: pid +pid_Kp: 22.865 +pid_Ki: 1.292 +pid_Kd: 101.178 +min_temp: 0 +max_temp: 250 +pressure_advance = 0.12 + +[filament_switch_sensor RunoutSensor] +pause_on_runout: False +runout_gcode: PAUSE +insert_gcode: RESUME +switch_pin: !PC15 + +[heater_bed] +heater_pin: PA7 +sensor_type: EPCOS 100K B57560G104F +sensor_pin: PC4 +control: pid +pid_Kp: 69.139 +pid_Ki: 1.273 +pid_Kd: 938.565 +min_temp: 0 +max_temp: 130 + + +[heater_fan hotend_fan] +pin: PC0 +heater: extruder +heater_temp: 50.0 + +[fan] +pin: PA0 + +[mcu] +serial: /printerserial +restart_method: command + +[printer] +kinematics: cartesian +max_velocity: 500 +max_accel: 3000 +max_accel_to_decel: 3000 +max_z_velocity: 5 +square_corner_velocity: 5.0 +max_z_accel: 100 + +[bltouch] +sensor_pin: ^PC14 +control_pin: PC13 +x_offset: -32 +y_offset: -41 +z_offset: 2.80 +speed:10 +samples:1 +samples_result:average +probe_with_touch_mode: true +stow_on_each_sample: false + +[safe_z_home] +home_xy_position: 154,154 +speed: 100 +z_hop: 10 +z_hop_speed: 5 + +[bed_mesh] +speed: 100 +mesh_min: 10, 10 +mesh_max: 225, 189 +algorithm: bicubic +probe_count: 5,5 + +[temperature_sensor Board_MCU] +sensor_type: temperature_mcu +min_temp: 0 +max_temp: 100 + +[temperature_sensor Raspberry_Pi] +sensor_type: temperature_host +min_temp: 0 +max_temp: 100 + +[virtual_sdcard] +path: ~/gcode_files + +[display_status] + +[pause_resume] + +[gcode_macro PAUSE] +description: Pause the actual running print +rename_existing: PAUSE_BASE +# change this if you need more or less extrusion +variable_extrude: 1.0 +gcode: + ##### read E from pause macro ##### + {% set E = printer["gcode_macro PAUSE"].extrude|float %} + ##### set park positon for x and y ##### + # default is your max posion from your printer.cfg + {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} + {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} + ##### calculate save lift position ##### + {% set max_z = printer.toolhead.axis_maximum.z|float %} + {% set act_z = printer.toolhead.position.z|float %} + {% if act_z < (max_z - 2.0) %} + {% set z_safe = 2.0 %} + {% else %} + {% set z_safe = max_z - act_z %} + {% endif %} + ##### end of definitions ##### + PAUSE_BASE + G91 + {% if printer.extruder.can_extrude|lower == 'true' %} + G1 E-{E} F2100 + {% else %} + {action_respond_info("Extruder not hot enough")} + {% endif %} + {% if "xyz" in printer.toolhead.homed_axes %} + G1 Z{z_safe} F900 + G90 + G1 X{x_park} Y{y_park} F6000 + {% else %} + {action_respond_info("Printer not homed")} + {% endif %} + +[gcode_macro RESUME] +description: Resume the actual running print +rename_existing: RESUME_BASE +gcode: + ##### read E from pause macro ##### + {% set E = printer["gcode_macro PAUSE"].extrude|float %} + #### get VELOCITY parameter if specified #### + {% if 'VELOCITY' in params|upper %} + {% set get_params = ('VELOCITY=' + params.VELOCITY) %} + {%else %} + {% set get_params = "" %} + {% endif %} + ##### end of definitions ##### + {% if printer.extruder.can_extrude|lower == 'true' %} + G91 + G1 E{E} F2100 + {% else %} + {action_respond_info("Extruder not hot enough")} + {% endif %} + RESUME_BASE {get_params} + +[gcode_macro CANCEL_PRINT] +description: Cancel the actual running print +rename_existing: CANCEL_PRINT_BASE +gcode: + TURN_OFF_HEATERS + CANCEL_PRINT_BASE \ No newline at end of file From 7c3f30c6528b17fb969e62e5efbb2d578a7bfa1c Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 21:04:56 +0700 Subject: [PATCH 08/45] upgrade to python 3 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6bdca9a..a3e1bba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,9 +10,9 @@ RUN apt-get update && apt-get install -y \ unzip \ psmisc \ git \ - python-virtualenv \ + python3-virtualenv \ virtualenv \ - python-dev \ + python3-dev \ libffi-dev \ build-essential \ tzdata \ From 356af5651c0ff14d3179e33b9a9a23f8bb8608db Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 21:09:15 +0700 Subject: [PATCH 09/45] remove systemctl state --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a3e1bba..fedaa6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,7 +68,7 @@ COPY klippy.sudoers /etc/sudoers.d/klippy RUN useradd -ms /bin/bash klippy # This is to allow the install script to run without error -RUN ln -s /bin/true /bin/systemctl +#RUN ln -s /bin/true /bin/systemctl USER octoprint From 559e0f7575a3e86ba2d9b8c82815015aba58a9b8 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 21:15:37 +0700 Subject: [PATCH 10/45] systemd cleanup --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fedaa6e..c96960c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,7 +68,8 @@ COPY klippy.sudoers /etc/sudoers.d/klippy RUN useradd -ms /bin/bash klippy # This is to allow the install script to run without error -#RUN ln -s /bin/true /bin/systemctl +RUN rm -f /bin/systemctl +RUN ln -s /bin/true /bin/systemctl USER octoprint From df5d019877b6512fa456c5720401a49a209cb3bc Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 21:25:02 +0700 Subject: [PATCH 11/45] add automatic default configuration upload --- Dockerfile | 4 +++- start.sh | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 start.sh diff --git a/Dockerfile b/Dockerfile index c96960c..29011b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -86,5 +86,7 @@ RUN rm -f /bin/systemctl COPY start.py / COPY runklipper.py / +COPY start.sh / +COPY printer.cfg / -CMD ["/start.py"] +CMD bash /start.sh diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..60fbff3 --- /dev/null +++ b/start.sh @@ -0,0 +1,2 @@ +cp -n /printer.cfg /home/octoprint/.octoprint/printer.cfg +python3 /start.py \ No newline at end of file From 998f9a6ad8dee1a34e8f3cec15bbc1a81b99f26d Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 22:18:32 +0700 Subject: [PATCH 12/45] drop mjpeg streamer --- start.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/start.py b/start.py index a5ce600..e3f3a6e 100755 --- a/start.py +++ b/start.py @@ -5,37 +5,11 @@ import time import os import pwd -MJPG = [ - "/usr/local/bin/mjpg_streamer", - "-i", - "%(input)s", - "-o", - "output_http.so -p %(port)s -w /usr/local/share/mjpg-streamer/www/", -] - -MJPG_INPUT_DEFAULT = "input_uvc.so -r HD" OCTOPRINT = ["/opt/octoprint/venv/bin/octoprint", "serve"] def main(): - mjpg_processes = [] - mjpg_ports = [5000] # Reserve the OctoPrint port - for k, v in os.environ.iteritems(): - if k.startswith("MJPG") and not k.startswith("MJPG_"): - v = v.strip() - port_env = "MJPG_PORT" + k[4:] - port = int(os.environ.get(port_env, 8080)) - if port in mjpg_ports: - raise ValueError("Port %s from key %s already in use" % (port, port_env)) - if not v: - v = MJPG_INPUT_DEFAULT - subs = {'input': v, 'port': port} - cmd = [] - for part in MJPG: - cmd.append(part % subs) - print("Starting: %s" % (cmd,)) - mjpg_processes.append(subprocess.Popen(cmd)) # Start klipper klipper = subprocess.Popen(['sudo', '-u', 'octoprint', '/runklipper.py']) From 46175997e3f31e5ae3ca028c692218c28c64718f Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 22:47:54 +0700 Subject: [PATCH 13/45] add unit proxy on port 80 --- Dockerfile | 5 +++++ start.sh | 9 +++++++++ unitconfig.json | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 unitconfig.json diff --git a/Dockerfile b/Dockerfile index 29011b8..43bc899 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,11 @@ RUN apt-get update && apt-get install -y \ zlib1g-dev \ libjpeg-dev +RUN curl --output /usr/share/keyrings/nginx-keyring.gpg https://unit.nginx.org/keys/nginx-keyring.gpg && \ + echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ hirsute unit" > /etc/apt/sources.list.d/unit.list && \ + echo "deb-src [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ hirsute unit" >> /etc/apt/sources.list.d/unit.list +RUN apt-get -y update && apt-get -y install unit + EXPOSE 5000 ARG tag=master diff --git a/start.sh b/start.sh index 60fbff3..cce11e9 100644 --- a/start.sh +++ b/start.sh @@ -1,2 +1,11 @@ +#Copy over Initial Printer Config cp -n /printer.cfg /home/octoprint/.octoprint/printer.cfg + +#Start Unit +unitd --no-daemon --control unix:/var/run/control-unit.sock & + +#Apply Primary Full Configuration +curl -X PUT --data-binary @/unitconfig.json --unix-socket /var/run/control-unit.sock http://localhost/config + +#Start OctoPrint and Klipper python3 /start.py \ No newline at end of file diff --git a/unitconfig.json b/unitconfig.json new file mode 100644 index 0000000..59829c3 --- /dev/null +++ b/unitconfig.json @@ -0,0 +1,18 @@ +{ + "listeners": { + "*:80": { + "pass": "routes" + } + }, + "routes": [ + { + "match": { + "uri": "*" + }, + + "action": { + "proxy": "http://127.0.0.1:5000" + } + } + ] +} \ No newline at end of file From bde23ac4363fa3a9a3ad4acd0189219e1077aa3b Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 22:49:52 +0700 Subject: [PATCH 14/45] change tag to focal --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 43bc899..2651d0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,8 @@ RUN apt-get update && apt-get install -y \ libjpeg-dev RUN curl --output /usr/share/keyrings/nginx-keyring.gpg https://unit.nginx.org/keys/nginx-keyring.gpg && \ - echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ hirsute unit" > /etc/apt/sources.list.d/unit.list && \ - echo "deb-src [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ hirsute unit" >> /etc/apt/sources.list.d/unit.list + echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ focal unit" > /etc/apt/sources.list.d/unit.list && \ + echo "deb-src [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ focal unit" >> /etc/apt/sources.list.d/unit.list RUN apt-get -y update && apt-get -y install unit EXPOSE 5000 From 256adff870d9c9b05f717ebdb46d3d1e41be517f Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 22:54:17 +0700 Subject: [PATCH 15/45] add unit config file to container --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2651d0e..eff87f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -93,5 +93,5 @@ COPY start.py / COPY runklipper.py / COPY start.sh / COPY printer.cfg / - +COPY unitconfig.json / CMD bash /start.sh From 8c512f0515b6eee0ac57db7622abc417959ed7ef Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 7 Apr 2022 23:35:01 +0700 Subject: [PATCH 16/45] remove unit --- Dockerfile | 6 ------ start.sh | 6 ------ 2 files changed, 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index eff87f9..40ecc4f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,11 +19,6 @@ RUN apt-get update && apt-get install -y \ zlib1g-dev \ libjpeg-dev -RUN curl --output /usr/share/keyrings/nginx-keyring.gpg https://unit.nginx.org/keys/nginx-keyring.gpg && \ - echo "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ focal unit" > /etc/apt/sources.list.d/unit.list && \ - echo "deb-src [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/ubuntu/ focal unit" >> /etc/apt/sources.list.d/unit.list -RUN apt-get -y update && apt-get -y install unit - EXPOSE 5000 ARG tag=master @@ -93,5 +88,4 @@ COPY start.py / COPY runklipper.py / COPY start.sh / COPY printer.cfg / -COPY unitconfig.json / CMD bash /start.sh diff --git a/start.sh b/start.sh index cce11e9..b7722dd 100644 --- a/start.sh +++ b/start.sh @@ -1,11 +1,5 @@ #Copy over Initial Printer Config cp -n /printer.cfg /home/octoprint/.octoprint/printer.cfg -#Start Unit -unitd --no-daemon --control unix:/var/run/control-unit.sock & - -#Apply Primary Full Configuration -curl -X PUT --data-binary @/unitconfig.json --unix-socket /var/run/control-unit.sock http://localhost/config - #Start OctoPrint and Klipper python3 /start.py \ No newline at end of file From 902b9afadf9c36b09924e58022468ab56a5e5618 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Fri, 8 Apr 2022 15:44:26 +0700 Subject: [PATCH 17/45] remove temperature config for rpi cause we are not using rpi --- printer.cfg | 4 ---- 1 file changed, 4 deletions(-) diff --git a/printer.cfg b/printer.cfg index ebe9511..08de079 100644 --- a/printer.cfg +++ b/printer.cfg @@ -121,10 +121,6 @@ sensor_type: temperature_mcu min_temp: 0 max_temp: 100 -[temperature_sensor Raspberry_Pi] -sensor_type: temperature_host -min_temp: 0 -max_temp: 100 [virtual_sdcard] path: ~/gcode_files From b31b95458b945bd814baac482399bca4a5deceb5 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 9 Apr 2022 10:56:23 +0700 Subject: [PATCH 18/45] set permission on bootup --- start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/start.sh b/start.sh index b7722dd..9da995f 100644 --- a/start.sh +++ b/start.sh @@ -1,5 +1,6 @@ #Copy over Initial Printer Config cp -n /printer.cfg /home/octoprint/.octoprint/printer.cfg +chmod 777 -v ./printer.cfg #Start OctoPrint and Klipper python3 /start.py \ No newline at end of file From 4f42862a91fbd0aa4fd2feec0908dd0bcf234f45 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 9 Apr 2022 11:20:26 +0700 Subject: [PATCH 19/45] add ffmpeg to container --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 40ecc4f..33f217f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,8 @@ RUN apt-get update && apt-get install -y \ build-essential \ tzdata \ zlib1g-dev \ - libjpeg-dev + libjpeg-dev \ + ffmpeg EXPOSE 5000 From 99c949c2f9574bdc7cb56fef8e3bf50e4171e137 Mon Sep 17 00:00:00 2001 From: siwat Date: Sat, 30 Apr 2022 13:51:13 +0700 Subject: [PATCH 20/45] remove temp sensor from mcu --- printer.cfg | 6 ------ 1 file changed, 6 deletions(-) diff --git a/printer.cfg b/printer.cfg index 08de079..e820801 100644 --- a/printer.cfg +++ b/printer.cfg @@ -116,12 +116,6 @@ mesh_max: 225, 189 algorithm: bicubic probe_count: 5,5 -[temperature_sensor Board_MCU] -sensor_type: temperature_mcu -min_temp: 0 -max_temp: 100 - - [virtual_sdcard] path: ~/gcode_files From ade3118e5d03e6c478e405606e9a2b85ac3ce974 Mon Sep 17 00:00:00 2001 From: siwat Date: Sat, 30 Apr 2022 17:19:43 +0700 Subject: [PATCH 21/45] Update 'printer.cfg' --- printer.cfg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/printer.cfg b/printer.cfg index e820801..873f52b 100644 --- a/printer.cfg +++ b/printer.cfg @@ -79,9 +79,12 @@ heater_temp: 50.0 pin: PA0 [mcu] -serial: /printerserial +serial: /dev/ttyEnder restart_method: command +[palette2] +serial: /dev/ttyPalette + [printer] kinematics: cartesian max_velocity: 500 From b25fd88beae3af49cbed1fa4aa7fc6cd4b79a00b Mon Sep 17 00:00:00 2001 From: siwat Date: Sun, 1 May 2022 11:53:56 +0700 Subject: [PATCH 22/45] Update 'start.sh' --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 9da995f..529bcf6 100644 --- a/start.sh +++ b/start.sh @@ -1,6 +1,6 @@ #Copy over Initial Printer Config cp -n /printer.cfg /home/octoprint/.octoprint/printer.cfg -chmod 777 -v ./printer.cfg +chmod 777 -v /home/octoprint/.octoprint/printer.cfg #Start OctoPrint and Klipper python3 /start.py \ No newline at end of file From b31694361e8f44b311e428af8defea11123e9f46 Mon Sep 17 00:00:00 2001 From: siwat Date: Sun, 1 May 2022 11:56:33 +0700 Subject: [PATCH 23/45] Update 'Dockerfile' --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 33f217f..cb16d84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,7 +54,8 @@ https://github.com/marian42/octoprint-preheat/archive/master.zip \ https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip \ https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \ https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/archive/master.zip \ -https://github.com/TheSpaghettiDetective/OctoPrint-TheSpaghettiDetective/archive/master.zip +https://github.com/TheSpaghettiDetective/OctoPrint-TheSpaghettiDetective/archive/master.zip \ +https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/master.zip VOLUME /home/octoprint/.octoprint From 0f57a36107b4d185629eadb09011c294e0949367 Mon Sep 17 00:00:00 2001 From: siwat Date: Sun, 1 May 2022 12:00:41 +0700 Subject: [PATCH 24/45] Update 'printer.cfg' --- printer.cfg | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/printer.cfg b/printer.cfg index 873f52b..a9831df 100644 --- a/printer.cfg +++ b/printer.cfg @@ -82,9 +82,6 @@ pin: PA0 serial: /dev/ttyEnder restart_method: command -[palette2] -serial: /dev/ttyPalette - [printer] kinematics: cartesian max_velocity: 500 @@ -119,8 +116,9 @@ mesh_max: 225, 189 algorithm: bicubic probe_count: 5,5 + [virtual_sdcard] -path: ~/gcode_files +path: /home/octoprint/.octoprint/uploads [display_status] From 8667fb51851bf213f9a88e877c55b0ed323cd88b Mon Sep 17 00:00:00 2001 From: siwat Date: Sun, 1 May 2022 12:07:48 +0700 Subject: [PATCH 25/45] Update 'printer.cfg' --- printer.cfg | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/printer.cfg b/printer.cfg index a9831df..0844e3c 100644 --- a/printer.cfg +++ b/printer.cfg @@ -124,6 +124,13 @@ path: /home/octoprint/.octoprint/uploads [pause_resume] +[gcode_macro G29] +description: Mesh Bed Leveling +gcode: + G28 + BED_MESH_CALIBRATE + G0 X0Y0Z5 + [gcode_macro PAUSE] description: Pause the actual running print rename_existing: PAUSE_BASE From 819886ab8a4bd8b57550b50afa4ca51dc9ad9fa7 Mon Sep 17 00:00:00 2001 From: siwat Date: Sun, 1 May 2022 20:00:27 +0700 Subject: [PATCH 26/45] Update 'printer.cfg' --- printer.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/printer.cfg b/printer.cfg index 0844e3c..0dc4e6b 100644 --- a/printer.cfg +++ b/printer.cfg @@ -96,7 +96,7 @@ sensor_pin: ^PC14 control_pin: PC13 x_offset: -32 y_offset: -41 -z_offset: 2.80 +z_offset: 0.75 speed:10 samples:1 samples_result:average From 0389d5a53a1ac1bbb2da5e3c627b4c7a30807805 Mon Sep 17 00:00:00 2001 From: siwat Date: Tue, 3 May 2022 20:04:47 +0700 Subject: [PATCH 27/45] Update 'printer.cfg' --- printer.cfg | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/printer.cfg b/printer.cfg index 0dc4e6b..20de03d 100644 --- a/printer.cfg +++ b/printer.cfg @@ -30,7 +30,7 @@ microsteps: 16 rotation_distance: 8 endstop_pin: probe:z_virtual_endstop position_max: 270 -position_min: -5 +position_min: -1 [extruder] max_extrude_only_distance: 100.0 @@ -49,9 +49,13 @@ pid_Kp: 22.865 pid_Ki: 1.292 pid_Kd: 101.178 min_temp: 0 -max_temp: 250 +max_temp: 270 pressure_advance = 0.12 +[input_shaper] +shaper_freq_x: 40 +shaper_freq_y: 40 + [filament_switch_sensor RunoutSensor] pause_on_runout: False runout_gcode: PAUSE @@ -69,6 +73,15 @@ pid_Kd: 938.565 min_temp: 0 max_temp: 130 +[respond] +default_type: echo + +[endstop_phase stepper_x] + +[endstop_phase stepper_y] + +[gcode_arcs] +resolution: 1.0 [heater_fan hotend_fan] pin: PC0 @@ -96,7 +109,7 @@ sensor_pin: ^PC14 control_pin: PC13 x_offset: -32 y_offset: -41 -z_offset: 0.75 +z_offset: 0 speed:10 samples:1 samples_result:average From 3f034d6e3ab565b3cd74ac0f0968e2492d84f948 Mon Sep 17 00:00:00 2001 From: siwat Date: Tue, 3 May 2022 20:08:17 +0700 Subject: [PATCH 28/45] Update 'Dockerfile' --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cb16d84..7d26c77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,7 +55,9 @@ https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/m https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \ https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/archive/master.zip \ https://github.com/TheSpaghettiDetective/OctoPrint-TheSpaghettiDetective/archive/master.zip \ -https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/master.zip +https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/master.zip \ +https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/master/canvas-plugin-master.zip \ +https://github.com/costas-basdekis/MarlinGcodeDocumentation/archive/master.zip VOLUME /home/octoprint/.octoprint From b6fa2cf98a68152a35a9621d263d533942558fa3 Mon Sep 17 00:00:00 2001 From: siwat Date: Wed, 4 May 2022 12:07:46 +0700 Subject: [PATCH 29/45] Update 'Dockerfile' --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7d26c77..8063e6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,6 @@ RUN git clone --branch $tag https://github.com/foosel/OctoPrint.git /opt/octopri && ./venv/bin/pip install . RUN /opt/octoprint/venv/bin/python -m pip install \ -https://github.com/AlexVerrico/Octoprint-Display-ETA/archive/master.zip \ https://github.com/1r0b1n0/OctoPrint-Tempsgraph/archive/master.zip \ https://github.com/tpmullan/OctoPrint-DetailedProgress/archive/master.zip \ https://github.com/AliceGrey/OctoprintKlipperPlugin/archive/master.zip \ @@ -52,12 +51,12 @@ https://github.com/jneilliii/OctoPrint-Python3PluginCompatibilityCheck/archive/m https://github.com/OllisGit/OctoPrint-PrintJobHistory/releases/latest/download/master.zip \ https://github.com/marian42/octoprint-preheat/archive/master.zip \ https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip \ -https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \ -https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/archive/master.zip \ https://github.com/TheSpaghettiDetective/OctoPrint-TheSpaghettiDetective/archive/master.zip \ https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/master.zip \ https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/master/canvas-plugin-master.zip \ -https://github.com/costas-basdekis/MarlinGcodeDocumentation/archive/master.zip +https://github.com/costas-basdekis/MarlinGcodeDocumentation/archive/master.zip \ +https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip \ + VOLUME /home/octoprint/.octoprint From 95f55b9c456c5d5c5ec9e196b5faf161da1220a9 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Fri, 6 May 2022 13:59:42 +0700 Subject: [PATCH 30/45] add config and plugins --- Dockerfile | 4 ++-- octoprint_config/cancel_gcode.gcode | 14 ++++++++++++++ octoprint_config/config.txt | 3 +++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 octoprint_config/cancel_gcode.gcode create mode 100644 octoprint_config/config.txt diff --git a/Dockerfile b/Dockerfile index 33f217f..ee61135 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,12 +49,12 @@ https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/archive/master.zip \ https://github.com/OctoPrint/OctoPrint-MQTT/archive/master.zip \ https://github.com/birkbjo/OctoPrint-Themeify/archive/master.zip \ https://github.com/jneilliii/OctoPrint-Python3PluginCompatibilityCheck/archive/master.zip \ -https://github.com/OllisGit/OctoPrint-PrintJobHistory/releases/latest/download/master.zip \ https://github.com/marian42/octoprint-preheat/archive/master.zip \ https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip \ https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \ https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/archive/master.zip \ -https://github.com/TheSpaghettiDetective/OctoPrint-TheSpaghettiDetective/archive/master.zip +https://github.com/TheSpaghettiDetective/OctoPrint-TheSpaghettiDetective/archive/master.zip \ +https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip VOLUME /home/octoprint/.octoprint diff --git a/octoprint_config/cancel_gcode.gcode b/octoprint_config/cancel_gcode.gcode new file mode 100644 index 0000000..9bac45f --- /dev/null +++ b/octoprint_config/cancel_gcode.gcode @@ -0,0 +1,14 @@ +; move head out of the way +G91 +G0 Z10 +G28 X Y +G0 X0Y230 + +; disable motors +M84 + +;disable all heaters +{% snippet 'disable_hotends' %} +{% snippet 'disable_bed' %} +;disable fan +M106 S0 \ No newline at end of file diff --git a/octoprint_config/config.txt b/octoprint_config/config.txt new file mode 100644 index 0000000..757f365 --- /dev/null +++ b/octoprint_config/config.txt @@ -0,0 +1,3 @@ +OctoKlipper +config dir: /home/octoprint/.octoprint +log: /tmp/klippy.log \ No newline at end of file From d6bec18198281d7ba5e1c6df5a97c6330c92af43 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Fri, 6 May 2022 14:06:29 +0700 Subject: [PATCH 31/45] Update printer.cfg --- printer.cfg | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/printer.cfg b/printer.cfg index 20de03d..48416b4 100644 --- a/printer.cfg +++ b/printer.cfg @@ -49,8 +49,8 @@ pid_Kp: 22.865 pid_Ki: 1.292 pid_Kd: 101.178 min_temp: 0 -max_temp: 270 -pressure_advance = 0.12 +max_temp: 265 +pressure_advance = 0.045 [input_shaper] shaper_freq_x: 40 @@ -129,6 +129,13 @@ mesh_max: 225, 189 algorithm: bicubic probe_count: 5,5 +[palette2] +serial: /ttyPalette +baud: 115200 +feedrate_splice: 0.5 +feedrate_normal: 1.0 +auto_load_speed: 2 +auto_cancel_variation: 0.1 [virtual_sdcard] path: /home/octoprint/.octoprint/uploads From 167aa4c787e6e4b11b16a663b7d38bee744c4f29 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 10 May 2022 16:53:25 +0700 Subject: [PATCH 32/45] change from TSD to Obico --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a1ed7d7..7927f15 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,7 @@ https://github.com/marian42/octoprint-preheat/archive/master.zip \ https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip \ https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \ https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/archive/master.zip \ -https://github.com/TheSpaghettiDetective/OctoPrint-TheSpaghettiDetective/archive/master.zip \ +https://github.com/TheSpaghettiDetective/OctoPrint-Obico/archive/master.zip \ https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip \ https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/master.zip \ https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/master/canvas-plugin-master.zip \ From cd8178192780390286cfb441ed07397e4163fd6f Mon Sep 17 00:00:00 2001 From: siwat Date: Wed, 11 May 2022 23:33:08 +0700 Subject: [PATCH 33/45] Update 'octoprint_config/config.txt' --- octoprint_config/config.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint_config/config.txt b/octoprint_config/config.txt index 757f365..2f60481 100644 --- a/octoprint_config/config.txt +++ b/octoprint_config/config.txt @@ -1,3 +1,3 @@ OctoKlipper config dir: /home/octoprint/.octoprint -log: /tmp/klippy.log \ No newline at end of file +log: /home/octoprint/.octoprint/logs/serial.log \ No newline at end of file From 61fe2351b89d1f9c48fe23af48936d27346b026e Mon Sep 17 00:00:00 2001 From: siwat Date: Fri, 13 May 2022 13:45:18 +0700 Subject: [PATCH 34/45] Update 'printer.cfg' --- printer.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/printer.cfg b/printer.cfg index 48416b4..93a228e 100644 --- a/printer.cfg +++ b/printer.cfg @@ -130,7 +130,7 @@ algorithm: bicubic probe_count: 5,5 [palette2] -serial: /ttyPalette +serial: /dev/ttyPalette baud: 115200 feedrate_splice: 0.5 feedrate_normal: 1.0 From 93126ed352214b3a70ee4038e7201e96b1d45e4a Mon Sep 17 00:00:00 2001 From: siwat Date: Mon, 6 Jun 2022 21:47:40 +0700 Subject: [PATCH 35/45] Update 'start.py' --- start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.py b/start.py index e3f3a6e..05da961 100755 --- a/start.py +++ b/start.py @@ -6,7 +6,7 @@ import os import pwd -OCTOPRINT = ["/opt/octoprint/venv/bin/octoprint", "serve"] +OCTOPRINT = ["/opt/octoprint/venv/bin/octoprint", "serve","--port","80"] def main(): From 90484f6571068b58dc10c1c7fb8854bdecfd23ba Mon Sep 17 00:00:00 2001 From: siwat Date: Mon, 6 Jun 2022 22:01:49 +0700 Subject: [PATCH 36/45] Update 'Dockerfile' --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7927f15..0243d66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,6 @@ https://github.com/jneilliii/OctoPrint-Python3PluginCompatibilityCheck/archive/m https://github.com/marian42/octoprint-preheat/archive/master.zip \ https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip \ https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \ -https://github.com/jneilliii/OctoPrint-ConsolidateTempControl/archive/master.zip \ https://github.com/TheSpaghettiDetective/OctoPrint-Obico/archive/master.zip \ https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip \ https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/master.zip \ From c0d73a3db49663072a0d249b09a7ecf782ad82b7 Mon Sep 17 00:00:00 2001 From: siwat Date: Sun, 12 Jun 2022 02:52:52 +0700 Subject: [PATCH 37/45] add creality cloud plugin --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0243d66..ef304c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,7 +55,8 @@ https://github.com/TheSpaghettiDetective/OctoPrint-Obico/archive/master.zip \ https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip \ https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/master.zip \ https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/master/canvas-plugin-master.zip \ -https://github.com/costas-basdekis/MarlinGcodeDocumentation/archive/master.zip +https://github.com/costas-basdekis/MarlinGcodeDocumentation/archive/master.zip \ +https://github.com/crealitycloud/OctoPrint-Crealitycloud/archive/master.zip VOLUME /home/octoprint/.octoprint From 1036fb18db252b83778f10bcd4516b902ee078a2 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Fri, 25 Nov 2022 20:07:14 +0700 Subject: [PATCH 38/45] Update 'Dockerfile' --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ef304c2..8a71da2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,6 @@ https://github.com/jneilliii/OctoPrint-Python3PluginCompatibilityCheck/archive/m https://github.com/marian42/octoprint-preheat/archive/master.zip \ https://github.com/OllisGit/OctoPrint-FilamentManager/releases/latest/download/master.zip \ https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip \ -https://github.com/TheSpaghettiDetective/OctoPrint-Obico/archive/master.zip \ https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip \ https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/master.zip \ https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/master/canvas-plugin-master.zip \ From 7a0a23f604ff3631bd8eae5915fe0c3333666072 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 3 Jan 2023 00:31:13 +0700 Subject: [PATCH 39/45] Update 'README.md' --- README.md | 64 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 75cd928..589aca8 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,4 @@ # OctoPrint-Klipper -*I no longer use this image (using [Kiauh] instead) so this will be rarely updated.* - -My version of a Docker image for running [OctoPrint] and [Klipper] in a single container. Includes a few plugins I find useful. - -Big thanks to [sillyfrog](https://github.com/sillyfrog) for laying the groundwork for this image. - -This is very much written for my purposes, so you'll likely need to modify it for your setup. I've been using it for a while now and it's going well. I've successfully run it on these platforms: -* Orange Pi Zero 512MB -* AtomicPi -* Raspberry Pi 4B 1GB (current source of `arm` images) - -## Running the container - -Create a directory on your host that will persist config files. I use `/home/docker/octoprint-klipper`. - -Pull the image. Until I figure out multi platform aware images, you need to specify your arch. Both `arm` and `amd64` images are on DockerHub. If using Raspberry Pi or similar use `arm` in place of `[tag]`. - -```shell -docker pull seanauff/octoprint-klipper:[tag] -``` - -Start the container once to populate your config folder: - -``` -docker run -d --name octoprint-klipper -e TZ=America/New_York -v /home/docker/octoprint-klipper:/home/octoprint/.octoprint --device /dev/ttyUSB0:/dev/ttyUSB0 -p 5000:5000 seanauff/octoprint-klipper:[tag] -``` - -Stop the container, and modify your [Klipper] `printer.cfg` and [Octoprint] `config.yaml` in the config directory as needed. - -Restart the container. - -A sample docker-compose file is also provided. - -If you have any questions, feel free to log an issue on this project, and I'll see if I can help. - -## Reconnecting to MCU after board power cycle - -Depending on your power situation, removing power from the printer main board will interrupt the serial connection. I had to give my container some more permissions in order to detect the connection again without restarting the entire container. There is some discussion [here](https://github.com/moby/moby/issues/35359) and [here](https://www.losant.com/blog/how-to-access-serial-devices-in-docker). - -## Updates - -The easiest way to update is to pull the latest image and recreate the container. You could also build the image yourself to get the latest updates. I have had success in using the Octoprint built in updater to upgrade plugins, as well as install new ones. Any upgrades conducted in this manner will be lost upon recreation of the container. - -## Build the image yourself - -The DockerHub images may not be as up to date as the repo (`amd64` is autobuilt, but not `arm`), so you can ensure you have the latest by building yourself. - -Clone the repository and build the image: - -```shell -git clone https://github.com/seanauff/OctoPrint-Klipper.git -docker build -t seanauff/octoprint-klipper OctoPrint-Klipper -``` - -If you already have an image built and are trying to upgrade, you may need to force the build not to use cache: -```shell -docker build -t seanauff/octoprint-klipper --no-cache -pull OctoPrint-Klipper -``` - -[Octoprint]: https://github.com/foosel/OctoPrint -[Klipper]: https://github.com/KevinOConnor/klipper -[Kiauh]: https://github.com/th33xitus/kiauh +This repository contain the code required to run klipper and octoprint in a docker container +This is specifically made for Satit Chula's Ender 3 S1 Print Farm \ No newline at end of file From 2e1ec402429a6b0b3ec1f34507a7333eb9614944 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 3 Jan 2023 00:31:28 +0700 Subject: [PATCH 40/45] Update 'README.md' --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 589aca8..21dd1ef 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ # OctoPrint-Klipper -This repository contain the code required to run klipper and octoprint in a docker container -This is specifically made for Satit Chula's Ender 3 S1 Print Farm \ No newline at end of file +This repository contain the code required to run klipper and octoprint in a docker container, made specifically for Satit Chula's Ender 3 S1 Print Farm \ No newline at end of file From f442d97c1125244bfb34ee8a987d6eab8352c0a6 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 3 Jan 2023 00:35:23 +0700 Subject: [PATCH 41/45] Update 'Dockerfile' --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8a71da2..ca6f0d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,8 +55,12 @@ https://github.com/eyal0/OctoPrint-PrintTimeGenius/archive/master.zip \ https://github.com/jneilliii/OctoPrint-PrusaSlicerThumbnails/archive/master.zip \ https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/master/canvas-plugin-master.zip \ https://github.com/costas-basdekis/MarlinGcodeDocumentation/archive/master.zip \ -https://github.com/crealitycloud/OctoPrint-Crealitycloud/archive/master.zip - +https://github.com/crealitycloud/OctoPrint-Crealitycloud/archive/master.zip \ +https://github.com/crysxd/OctoApp-Plugin/archive/refs/heads/release.zip \ +https://github.com/paukstelis/OctoPrint-Cancelobject/archive/master.zip \ +https://github.com/OllisGit/OctoPrint-CostEstimation/releases/latest/download/master.zip \ +https://github.com/eyal0/OctoPrint-MultipleUpload/archive/master.zip \ +https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/3.0.3/canvas-plugin-3.0.3.zip VOLUME /home/octoprint/.octoprint From 5ac8dcb4e8dc9b92a5d49e64efd42c97dcd31bd8 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 3 Jan 2023 00:37:15 +0700 Subject: [PATCH 42/45] Update 'Jenkinsfile' --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d235b1c..7016749 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ pipeline { stage('Build Docker Image') { steps { script { - image = docker.build("siwatinc/octoprint-klipper:ender3s1") + image = docker.build("siwatinc/octoprint-klipper:ender3s1","./ --no-cache") } } } From bf4ff4114dc728a50d788275d9b19b904133b3bf Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Tue, 3 Jan 2023 00:38:52 +0700 Subject: [PATCH 43/45] Update 'Dockerfile' --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ca6f0d6..fe9c5eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,7 +60,8 @@ https://github.com/crysxd/OctoApp-Plugin/archive/refs/heads/release.zip \ https://github.com/paukstelis/OctoPrint-Cancelobject/archive/master.zip \ https://github.com/OllisGit/OctoPrint-CostEstimation/releases/latest/download/master.zip \ https://github.com/eyal0/OctoPrint-MultipleUpload/archive/master.zip \ -https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/3.0.3/canvas-plugin-3.0.3.zip +https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/3.0.3/canvas-plugin-3.0.3.zip \ +https://github.com/wgcv/RewriteM600/archive/master.zip VOLUME /home/octoprint/.octoprint From 61ab52d882c328c88ee5469866816067ca6e955a Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 5 Jan 2023 13:26:39 +0700 Subject: [PATCH 44/45] Update 'Dockerfile' --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fe9c5eb..28c68d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,8 @@ RUN apt-get update && apt-get install -y \ tzdata \ zlib1g-dev \ libjpeg-dev \ - ffmpeg + ffmpeg \ + iputils-ping EXPOSE 5000 From 2ea8df2791d043e185eb2262ba0e5170cd872e5e Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 14 Jan 2023 14:34:25 +0700 Subject: [PATCH 45/45] Update 'Dockerfile' --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 28c68d7..5668a3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,8 @@ https://github.com/paukstelis/OctoPrint-Cancelobject/archive/master.zip \ https://github.com/OllisGit/OctoPrint-CostEstimation/releases/latest/download/master.zip \ https://github.com/eyal0/OctoPrint-MultipleUpload/archive/master.zip \ https://gitlab.com/mosaic-mfg/canvas-plugin/-/archive/3.0.3/canvas-plugin-3.0.3.zip \ -https://github.com/wgcv/RewriteM600/archive/master.zip +https://github.com/wgcv/RewriteM600/archive/master.zip \ +https://github.com/TheSpaghettiDetective/OctoPrint-Obico/archive/master.zip VOLUME /home/octoprint/.octoprint