From 0369d6bcdbfc84c98f9a5d91bb4e5ceaff6789cc Mon Sep 17 00:00:00 2001 From: klipper-bakckup Date: Sat, 28 Dec 2024 10:03:45 +0100 Subject: [PATCH] New backup from 12/28/2024 - 10:03:45 AM --- .gitignore | 9 ++ README.md | 4 + printer_data/config/klack_probe.cfg | 106 +++++++++++++ printer_data/config/macro.cfg | 59 ++++++++ printer_data/config/moonraker.conf | 54 +++++++ printer_data/config/printer.cfg | 222 ++++++++++++++++++++++++++++ 6 files changed, 454 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 printer_data/config/klack_probe.cfg create mode 100644 printer_data/config/macro.cfg create mode 100644 printer_data/config/moonraker.conf create mode 100644 printer_data/config/printer.cfg diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e55ca4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.env +secrets.conf +*.swp +*.tmp +printer-[0-9]*_[0-9]*.cfg +*.bak +*.bkp +*.csv +*.zip diff --git a/README.md b/README.md new file mode 100644 index 0000000..c975ae8 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Klipper-Backup 💾 +Klipper backup script for manual or automated GitHub backups + +This backup is provided by [Klipper-Backup](https://github.com/Staubgeborener/klipper-backup). diff --git a/printer_data/config/klack_probe.cfg b/printer_data/config/klack_probe.cfg new file mode 100644 index 0000000..260f5ac --- /dev/null +++ b/printer_data/config/klack_probe.cfg @@ -0,0 +1,106 @@ + +# ##################################################################### +# # KlackEnder- Macros +# ##################################################################### + +[homing_override] +# set_position_z:0 # Make printer think Z axis is at zero, so we can force a move upwards away from build plate +# axes: z #will only call override if x is involved in the homing call +gcode: + {% set svv = printer.save_variables.variables %} + {% if svv.probe_attached == True %} + { action_raise_error("Probe is attached!") } + {% else %} + G28 {rawparams} + {% endif %} + +[gcode_macro SCREWS_TILT_CALCULATE] +rename_existing: _SCREWS_TILT_CALCULATE +gcode: + G28 ; Should always home before calculation even if already homed + PROBE_ATTACH + _SCREWS_TILT_CALCULATE + PROBE_DOCK + +[gcode_macro FORCE_PROBE_ATTACH] +gcode: + SAVE_VARIABLE VARIABLE=probe_attached VALUE={ True } + +[gcode_macro FORCE_PROBE_DOCK] +gcode: + SAVE_VARIABLE VARIABLE=probe_attached VALUE={ False } + +[gcode_macro TEST_IF] +gcode: + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home Axis First!") } + {% endif %} + + { action_respond_info("osie wyzerowane") } + +[gcode_macro PROBE_ATTACH] +gcode: + {% set svv = printer.save_variables.variables %} + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home Axis First!") } + {% endif %} + + {% if svv.probe_attached == True %} + { action_respond_info("Probe is already attached!") } + {% else %} + G90 + G1 Z20 + G1 X244 F8000 + G1 Z5 + G1 Z20 + G1 X0 F8000 + SAVE_VARIABLE VARIABLE=probe_attached VALUE={ True } + {% endif %} + +[gcode_macro PROBE_DOCK] +gcode: + {% set svv = printer.save_variables.variables %} + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home Axis First!") } + {% endif %} + + {% if svv.probe_attached == False %} + { action_respond_info("Probe is already docked!") } + {% else %} + G90 + G1 Z20 + G1 X244 F8000 + G1 Z1 + G1 X0 F8000 + SAVE_VARIABLE VARIABLE=probe_attached VALUE={ False } + {% endif %} + +[gcode_macro BED_MESH_CALIBRATE] #macro with parameter passing +rename_existing: _BED_MESH_CALIBRATE +gcode: + PROBE_ATTACH + _BED_MESH_CALIBRATE {rawparams} + PROBE_DOCK + +[gcode_macro G29] #reliant on the macro above +gcode: + BED_MESH_CALIBRATE + +[gcode_macro PROBE_CALIBRATE] +rename_existing: _PROBE_CALIBRATE +gcode: + PROBE_ATTACH + G90 + G1 Z20 + G1 X95 Y86 F8000 ; Readjust for center of bed adjusted for probe offset + _PROBE_CALIBRATE + TESTZ Z=20 + +[gcode_macro PROBE_ACCURACY] +rename_existing: _PROBE_ACCURACY +gcode: + PROBE_ATTACH + G90 + G1 X95 Y86 F8000 ; Readjust for center of bed adjusted for probe offset + _PROBE_ACCURACY + PROBE_DOCK diff --git a/printer_data/config/macro.cfg b/printer_data/config/macro.cfg new file mode 100644 index 0000000..4dcb019 --- /dev/null +++ b/printer_data/config/macro.cfg @@ -0,0 +1,59 @@ +[gcode_macro START_PRINT] +gcode: + {% set bed_temp = params.BED_TEMP|default(50)|float %} + {% set ext_temp = params.EXTRUDER_TEMP|default(200)|float %} + # use absolute coordinates + G90 + # extruder relative mode + M83 + # set final bed temp + M140 S{bed_temp} + # set temporary nozzle temp to prevent oozing during homing + M104 S150 + # allow partial nozzle warmup + G4 S10 + # home all axis + G28 + # load bed mesh profile + BED_MESH_PROFILE LOAD=hot + + G1 Z50 F240 + G1 X2 Y10 F3000 + + # set final nozzle temp + M104 S{ext_temp} + # wait for bed temp to stabilize + M190 S{bed_temp} + # wait for nozzle temp to stabilize + M109 S{ext_temp} + + G1 Z0.28 F240 + + # prime the nozzle + G92 E0 + G1 Y140 E10 F1500 + G1 X2.3 F5000 + + # prime the nozzle + G92 E0 + G1 Y10 E10 F1200 + + G92 E0 + +[gcode_macro END_PRINT] +gcode: + {% set print_height = params.MAX_HEIGHT|default(1)|float %} + {% set printable_height = printer.toolhead.axis_maximum.z|default(250)|float %} + # { action_respond_info( printable_height|string ) } + G91 + G1 E-3 + G90 + {% if print_height < printable_height %} + {% set height = [print_height+2, printable_height]|min %} + G1 Z{height} F600 + {% endif %} + G1 X0 Y220 + M140 S0 ; turn off heatbed + M104 S0 ; turn off temperature + M107 ; turn off fan + M84 ; disable motors \ No newline at end of file diff --git a/printer_data/config/moonraker.conf b/printer_data/config/moonraker.conf new file mode 100644 index 0000000..5d8c3bd --- /dev/null +++ b/printer_data/config/moonraker.conf @@ -0,0 +1,54 @@ +[server] +host: 0.0.0.0 +port: 7125 +klippy_uds_address: /home/bartool/printer_data/comms/klippy.sock + +[authorization] +trusted_clients: + 10.0.0.0/8 + 127.0.0.0/8 + 169.254.0.0/16 + 172.16.0.0/12 + 192.168.0.0/16 + FE80::/10 + ::1/128 +cors_domains: + *.lan + *.local + *://localhost + *://localhost:* + *://my.mainsail.xyz + *://app.fluidd.xyz + +[octoprint_compat] + +[history] + +[update_manager] +channel: dev +refresh_interval: 168 + +[update_manager mainsail-config] +type: git_repo +primary_branch: master +path: ~/mainsail-config +origin: https://github.com/mainsail-crew/mainsail-config.git +managed_services: klipper + +[update_manager mainsail] +type: web +channel: stable +repo: mainsail-crew/mainsail +path: ~/mainsail + +[power printer_switch] +type: homeassistant +protocol: http +address: 192.168.1.120 +port: 8123 +device: switch.power_strip_relay_3 +token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIyNzJmMzA2ODcwYzI0ZWQyOTI0ODBkZWI4ZTg3NzBkMiIsImlhdCI6MTcxNjEwNDk4NywiZXhwIjoyMDMxNDY0OTg3fQ.WqQrI413D--RrWEsIhhukXbJdW6zXaoPY9WnmHRZpnw +domain: switch +locked_while_printing: True +restart_klipper_when_powered: True +restart_delay: 1. diff --git a/printer_data/config/printer.cfg b/printer_data/config/printer.cfg new file mode 100644 index 0000000..bfed802 --- /dev/null +++ b/printer_data/config/printer.cfg @@ -0,0 +1,222 @@ +# This file contains pin mappings for the stock 2020 Creality Ender 3 +# V2. To use this config, during "make menuconfig" select the +# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9) +# communication. + +# If you prefer a direct serial connection, in "make menuconfig" +# select "Enable extra low-level configuration options" and select +# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC +# cable used for the LCD module as follows: +# 3: Tx, 4: Rx, 9: GND, 10: VCC + +# Flash this firmware by copying "out/klipper.bin" to a SD card and +# turning on the printer with the card inserted. The firmware +# filename must end in ".bin" and must not match the last filename +# that was flashed. + +# See docs/Config_Reference.md for a description of parameters. +[include mainsail.cfg] +[include macro.cfg] +[include klack_probe.cfg] + +[save_variables] +filename: ~/variables.cfg + +[force_move] +enable_force_move = true + +[stepper_x] +step_pin: PC2 +dir_pin: PB9 +enable_pin: !PC3 +microsteps: 16 +rotation_distance: 40 +endstop_pin: ^PA5 +position_endstop: 0 +position_max: 245 +homing_speed: 50 + +[stepper_y] +step_pin: PB8 +dir_pin: PB7 +enable_pin: !PC3 +microsteps: 16 +rotation_distance: 40 +endstop_pin: ^PA6 +position_endstop: -10 +position_min: -10 +position_max: 220 +homing_speed: 50 + +[stepper_z] +step_pin: PB6 +dir_pin: !PB5 +enable_pin: !PC3 +microsteps: 16 +rotation_distance: 8 +endstop_pin: ^PA7 +position_endstop: -0.775 +position_min: -1 +position_max: 250 + +[extruder] +max_extrude_only_distance: 100.0 +step_pin: PB4 +dir_pin: PB3 +enable_pin: !PC3 +microsteps: 16 +# rotation_distance: 34.406 +rotation_distance: 7.531 +nozzle_diameter: 0.400 +filament_diameter: 1.750 +heater_pin: PA1 +sensor_type: EPCOS 100K B57560G104F +sensor_pin: PC5 +#control: pid +# tuned for stock hardware with 200 degree Celsius target +#pid_Kp: 21.527 +#pid_Ki: 1.063 +#pid_Kd: 108.982 +min_temp: 0 +max_temp: 300 + +[heater_bed] +heater_pin: PA2 +sensor_type: EPCOS 100K B57560G104F +sensor_pin: PC4 +#control: pid +# tuned for stock hardware with 50 degree Celsius target +#pid_Kp: 54.027 +#pid_Ki: 0.770 +#pid_Kd: 948.182 +min_temp: 0 +max_temp: 130 + +[fan] +pin: PA0 + +[mcu] +serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 +restart_method: command + +[printer] +kinematics: cartesian +max_velocity: 300 +max_accel: 3000 +max_z_velocity: 5 +max_z_accel: 100 + + +[bed_screws] +screw1_name: rear left screw +screw1: 27, 194 # Using rear left to take measurements as harder to reach +screw2_name: rear right screw +screw2: 194, 194 +screw3_name: front right screw +screw3: 194, 23 +screw4_name: front left screw +screw4: 27, 23 + +[screws_tilt_adjust] +screw1_name: rear left screw +screw1: 11, 171 +screw2_name: rear right screw +screw2: 181, 171 +screw3_name: front right screw +screw3: 181, 0 +screw4_name: front left screw +screw4: 11, 0 +horizontal_move_z: 10 +speed: 50 +screw_thread: CW-M4 # Use CW for Clockwise and CCW for Counter Clockwise + +# [bltouch] +# sensor_pin: ^PB1 +# control_pin: PB0 +# x_offset: 35 +# y_offset: 1 +# z_offset: 1.472 +# samples: 5 +# sample_retract_dist: 5.0 + +[probe] +pin: ^PB1 +x_offset: 15.7 +y_offset: 23.0 +z_offset: 4.0 +samples: 5 +sample_retract_dist: 2.0 +speed: 10 +lift_speed: 20 +samples_result: median +# activate_gcode: PROBE_ATTACH +# deactivate_gcode: PROBE_DETTACH + +[bed_mesh] +speed: 120 +horizontal_move_z: 10 +mesh_min: 20,20 +mesh_max: 205,200 +probe_count: 7,7 +algorithm: bicubic +fade_start: 1 +fade_end: 10 +# fade_target: 0 +zero_reference_position: 112.5, 110 + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 20.304 +#*# pid_ki = 1.074 +#*# pid_kd = 95.937 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 70.500 +#*# pid_ki = 1.158 +#*# pid_kd = 1073.363 +#*# +#*# [bed_mesh hot] +#*# version = 1 +#*# points = +#*# -0.037506, -0.027506, -0.005006, 0.007494, 0.009994, 0.009994, 0.019994 +#*# -0.050006, -0.035006, -0.007506, 0.007494, 0.017494, 0.009994, 0.024994 +#*# -0.050006, -0.032506, -0.007506, 0.012494, 0.022494, 0.014994, 0.019994 +#*# -0.062506, -0.052506, -0.017506, -0.000006, 0.019994, 0.007494, 0.017494 +#*# -0.047506, -0.037506, -0.000006, 0.022494, 0.022494, 0.017494, 0.022494 +#*# -0.032506, -0.010006, 0.012494, 0.029994, 0.032494, 0.027494, 0.039994 +#*# 0.002494, 0.009994, 0.032494, 0.042494, 0.047494, 0.042494, 0.037494 +#*# x_count = 7 +#*# y_count = 7 +#*# mesh_x_pps = 2 +#*# mesh_y_pps = 2 +#*# algo = bicubic +#*# tension = 0.2 +#*# min_x = 20.0 +#*# max_x = 204.98 +#*# min_y = 20.0 +#*# max_y = 200.0 +#*# +#*# [bed_mesh tescik] +#*# version = 1 +#*# points = +#*# -0.027502, -0.035002, -0.032502, -0.030002, -0.040002, -0.045002, -0.035002 +#*# -0.027502, -0.027502, -0.017502, -0.010002, -0.015002, -0.032502, -0.030002 +#*# -0.030002, -0.027502, -0.010002, -0.002502, 0.002498, -0.010002, -0.010002 +#*# -0.030002, -0.030002, -0.002502, -0.000002, 0.004998, -0.015002, -0.012502 +#*# -0.020002, -0.020002, 0.007498, 0.024998, 0.014998, 0.007498, 0.007498 +#*# -0.012502, -0.010002, 0.019998, 0.034998, 0.042498, 0.024998, 0.027498 +#*# 0.027498, 0.032498, 0.044998, 0.044998, 0.069998, 0.024998, 0.019998 +#*# x_count = 7 +#*# y_count = 7 +#*# mesh_x_pps = 2 +#*# mesh_y_pps = 2 +#*# algo = bicubic +#*# tension = 0.2 +#*# min_x = 20.0 +#*# max_x = 204.98 +#*# min_y = 20.0 +#*# max_y = 200.0