Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock'] Git version: 'v0.12.0-268-g0844388d-dirty' Untracked files: klippy/extras/beacon.py, klippy/extras/gcode_shell_command.py, klippy/extras/linear_movement_vibrations.py, klippy/extras/ratos.py, klippy/extras/ratos_homing.py, klippy/extras/resonance_generator.py, klippy/extras/z_offset_probe.py, klippy/kinematics/ratos_hybrid_corexy.py Branch: master Remote: origin Tracked URL: https://github.com/Klipper3d/klipper.git CPU: 4 core ? Python: '3.9.2 (default, Mar 12 2021, 04:06:34) \n[GCC 10.2.1 20210110]' Start printer at Sun Jun 30 19:59:22 2024 (1719773962.1 35.4) ===== Config file ===== [gcode_macro ECHO_RATOS_VARS] description = Echo RatOS variables to the console. gcode = {% for var, value in printer["gcode_macro RatOS"].items() %} {action_respond_info(var ~ ": " ~ value)} {% endfor %} [gcode_macro RatOS] description = RatOS variable storage macro, will echo variables to the console when run. variable_relative_extrusion = False variable_force_absolute_position = False variable_preheat_extruder = True variable_preheat_extruder_temp = 150 variable_macro_travel_speed = 150 variable_macro_travel_accel = 2000 variable_macro_z_speed = 15 variable_bed_margin_x = [0, 0] variable_bed_margin_y = [0, 0] variable_printable_x_min = 0 variable_printable_x_max = 0 variable_printable_y_min = 0 variable_printable_y_max = 0 variable_end_print_motors_off = True variable_status_color_ok = "00FF00" variable_status_color_error = "FF0000" variable_status_color_unknown = "FFFF00" variable_end_print_retract_filament = 10 gcode = ECHO_RATOS_VARS [delayed_gcode RATOS_INIT] initial_duration = 0.1 gcode = RATOS_ECHO MSG="Welcome to RatOS!" RATOS_ECHO MSG="Please setup your printer through the RatOS configurator. Use the link in the sidebar to proceed with the setup." [delayed_gcode RATOS_LOGO] initial_duration = 2 gcode = HELLO_RATOS [gcode_macro INITIAL_FRONTEND_UPDATE] gcode = {% set color_ok = printer["gcode_macro RatOS"].status_color_ok|string %} {% set color_error = printer["gcode_macro RatOS"].status_color_error|string %} {% set color_unknown = printer["gcode_macro RatOS"].status_color_unknown|string %} SET_GCODE_VARIABLE MACRO=T0 VARIABLE=color VALUE='"{color_unknown}"' {% if printer["dual_carriage"] is defined %} SET_GCODE_VARIABLE MACRO=T1 VARIABLE=color VALUE='"{color_unknown}"' {% endif %} {% if printer["filament_switch_sensor toolhead_filament_sensor_t0"] is defined %} {% if printer["filament_switch_sensor toolhead_filament_sensor_t0"].filament_detected|lower == "true" %} SET_GCODE_VARIABLE MACRO=T0 VARIABLE=color VALUE='"{color_ok}"' {% endif %} {% endif %} {% if printer["dual_carriage"] is defined and printer["filament_switch_sensor toolhead_filament_sensor_t1"] is defined %} {% if printer["filament_switch_sensor toolhead_filament_sensor_t1"].filament_detected|lower == "true" %} SET_GCODE_VARIABLE MACRO=T1 VARIABLE=color VALUE='"{color_ok}"' {% endif %} {% endif %} [gcode_macro CALCULATE_PRINTABLE_AREA] gcode = {% set bed_margin_x = printer["gcode_macro RatOS"].bed_margin_x %} {% set bed_margin_y = printer["gcode_macro RatOS"].bed_margin_y %} {% set tool = 0 if printer["gcode_macro T0"] is not defined or printer["gcode_macro T0"].active else 1 %} {% set max_x = printer.toolhead.axis_maximum.x if printer["dual_carriage"] is defined and tool == 0 else printer.toolhead.axis_maximum.x - bed_margin_x[1] %} {% if printer["dual_carriage"] is defined %} {% set max_x = printer.toolhead.axis_maximum.x %} {% endif %} DEBUG_ECHO PREFIX="CALCULATE_PRINTABLE_AREA" MSG="printer.toolhead.axis_maximum.x {printer.toolhead.axis_maximum.x}" {% set max_y = printer.toolhead.axis_maximum.y - bed_margin_y[1]%} SET_GCODE_VARIABLE MACRO=RatOS VARIABLE=printable_x_max VALUE={max_x} SET_GCODE_VARIABLE MACRO=RatOS VARIABLE=printable_y_max VALUE={max_y} DEBUG_ECHO PREFIX="CALCULATE_PRINTABLE_AREA" MSG="Printable area calculated: X: 0,{max_x} Y: 0,{max_y}" [gcode_macro CACHE_TOOLHEAD_SETTINGS] variable_cache = {"global": {"accel": 1000, "ratio": 0.5, "speed": 50, "scv": 5}} gcode = {% set key = "global" %} {% if params.KEY is defined %} {% set key = params.KEY %} {% endif %} {% set dummy = cache.__setitem__(key, {"accel": printer.toolhead.max_accel, "ratio": printer.toolhead.minimum_cruise_ratio, "speed": printer.toolhead.max_velocity, "scv": printer.toolhead.square_corner_velocity}) %} SET_GCODE_VARIABLE MACRO=CACHE_TOOLHEAD_SETTINGS VARIABLE=cache VALUE="{cache | pprint | replace("\n", "") | replace("\"", "\\\"")}" DEBUG_ECHO PREFIX="CACHE_TOOLHEAD_SETTINGS" MSG="Toolhead settings cached for {key}. {printer.toolhead.max_accel} accel, {printer.toolhead.minimum_cruise_ratio} ratio, {printer.toolhead.max_velocity} velocity, {printer.toolhead.square_corner_velocity} scv." [gcode_macro RESTORE_TOOLHEAD_SETTINGS] gcode = {% set key = "global" %} {% if params.KEY is defined %} {% set key = params.KEY %} {% endif %} {% set values = printer["gcode_macro CACHE_TOOLHEAD_SETTINGS"].cache.__getitem__(key) %} {% if values is not defined or values == 'None' %} { action_raise_error("RESTORE_TOOLHEAD_SETTINGS: Toolhead settings not cached for key '" ~ key ~ "'.") } {% endif %} SET_VELOCITY_LIMIT ACCEL={values.accel} MINIMUM_CRUISE_RATIO={values.ratio} VELOCITY={values.speed} SQUARE_CORNER_VELOCITY={values.scv} DEBUG_ECHO PREFIX="RESTORE_TOOLHEAD_SETTINGS" MSG="Toolhead settings restored. {values.accel} accel, {values.ratio} ratio, {values.speed} velocity, {values.scv} scv." [gcode_macro SET_MACRO_TRAVEL_SETTINGS] gcode = {% set speed = printer["gcode_macro RatOS"].macro_travel_speed|float * 60 %} {% set accel = printer["gcode_macro RatOS"].macro_travel_accel %} SET_VELOCITY_LIMIT ACCEL={accel} MINIMUM_CRUISE_RATIO=0.5 VELOCITY={speed} SQUARE_CORNER_VELOCITY={5} DEBUG_ECHO PREFIX="SET_MACRO_TRAVEL_SETTINGS" MSG="Macro travel settings set. {accel} accel, {speed} velocity" [gcode_macro SET_CENTER_KINEMATIC_POSITION] description = FOR DEBUGGING PURPOSES ONLY. Sets the internal printer kinematic state to the center of all axes regardless of actual physical position. gcode = {% set printable_x_max = printer["gcode_macro RatOS"].printable_x_max|float %} {% set printable_y_max = printer["gcode_macro RatOS"].printable_y_max|float %} RATOS_ECHO MSG="WARNING: ONLY USE SET_CENTER_KINEMATIC_POSITION FOR DEBUGGING PURPOSES. YOU'RE OVERRIDING THE INTERNAL POSITIONING STATE OF THE PRINTER. PROCEED WITH CAUTION AND DO A PROPER G28 WHEN DONE." SET_GCODE_VARIABLE MACRO=MAYBE_HOME VARIABLE=is_kinematic_position_overriden VALUE=True {% if printer["dual_carriage"] is not defined %} SET_KINEMATIC_POSITION X={printable_x_max / 2} Y={printable_y_max / 2} Z={printer.toolhead.axis_maximum.z / 2} {% else %} IDEX_SET_CENTER_KINEMATIC_POSITION {% endif %} [gcode_macro IDEX_SET_CENTER_KINEMATIC_POSITION] description = FOR DEBUGGING PURPOSES ONLY. Sets the internal printer kinematic state to the center of all axes regardless of actual physical position. gcode = {% set printable_x_max = printer["gcode_macro RatOS"].printable_x_max|float %} {% set printable_y_max = printer["gcode_macro RatOS"].printable_y_max|float %} RATOS_ECHO MSG="WARNING: ONLY USE SET_CENTER_KINEMATIC_POSITION FOR DEBUGGING PURPOSES. YOU'RE OVERRIDING THE INTERNAL POSITIONING STATE OF THE PRINTER. PROCEED WITH CAUTION AND DO A PROPER G28 WHEN DONE." SET_GCODE_VARIABLE MACRO=MAYBE_HOME VARIABLE=is_kinematic_position_overriden VALUE=True {% set printable_x_max = printer["gcode_macro RatOS"].printable_x_max|float %} {% set center_x = printable_x_max / 2 %} SET_DUAL_CARRIAGE CARRIAGE=0 MODE=PRIMARY SET_KINEMATIC_POSITION X={center_x - (center_x / 2)} Y={printable_y_max / 2} Z={printer.toolhead.axis_maximum.z / 2} SET_DUAL_CARRIAGE CARRIAGE=1 MODE=PRIMARY SET_KINEMATIC_POSITION X={center_x + (center_x / 2)} Y={printable_y_max / 2} Z={printer.toolhead.axis_maximum.z / 2} SET_DUAL_CARRIAGE CARRIAGE=0 MODE=PRIMARY [gcode_macro VERIFY_HYBRID_INVERTED] gcode = {% set inverted = False %} {% if printer.configfile.settings.ratos_hybrid_corexy is defined and printer.configfile.settings.ratos_hybrid_corexy.inverted is defined %} {% if printer.configfile.settings.ratos_hybrid_corexy.inverted|lower == 'true' %} {% set inverted = True %} {% endif %} {% endif %} {% if inverted == False %} { action_emergency_stop("ratos_hybrid_corexy NOT INVERTED! Inverted hybrid core-xy bugfix not detected.") } {% endif %} [gcode_macro RATOS_ECHO] gcode = {% set prefix = "RatOS" %} {% set debug = params.DEBUG|default(0)|int %} {% if params.PREFIX is defined %} {% set prefix = prefix ~ " | " ~ params.PREFIX %} {% endif %} {% set prefix = prefix ~ ":" %} {% set msg = "" %} {% if params.MSG is defined %} {% set msg = params.MSG %} {% else %} {% set msg = "No msg parameter provided (this is a bug or unintended use)." %} {% endif %} {% if not debug %} M117 {prefix} {msg} {% endif %} RATOS_LOG PREFIX="{prefix}" MSG="{msg}" {% if not debug %} RESPOND PREFIX="{prefix}" MSG="{msg}" {% else %} CONSOLE_ECHO TITLE="{prefix}" TYPE="debug" MSG="{msg}" {% endif %} [gcode_macro ENABLE_DEBUG] gcode = SET_GCODE_VARIABLE MACRO=DEBUG_ECHO VARIABLE=enabled VALUE=True SET_GCODE_VARIABLE MACRO=DEBUG_ECHO VARIABLE=prefix_filter VALUE="'{params.FILTER|default('')|lower}'" RATOS_ECHO PREFIX="DEBUG" MSG="Debugging enabled." [gcode_macro DISABLE_DEBUG] gcode = SET_GCODE_VARIABLE MACRO=DEBUG_ECHO VARIABLE=enabled VALUE=False RATOS_ECHO PREFIX="DEBUG" MSG="Debugging disabled." [gcode_macro DEBUG_ECHO] variable_enabled = False variable_prefix_filter = '' gcode = {% set prefix = "DEBUG" %} {% if params.PREFIX is defined %} {% set prefix = prefix ~ " - " ~ params.PREFIX %} {% endif %} {% if enabled and (prefix_filter|lower == '' or prefix_filter|lower in params.PREFIX|lower) %} RATOS_ECHO PREFIX="{prefix}" MSG="{params.MSG}" DEBUG=1 {% endif %} [gcode_macro START_FEATURE] gcode = RATOS_DEBUG PREFIX="G-Code" MSG="Start {params.FEATURE} feature gcode" {% set scv = printer.toolhead.square_corner_velocity %} {% set accel = printer.toolhead.accel %} {% set ratio = printer.toolhead.minimum_cruise_ratio %} SET_GCODE_VARIABLE MACRO="END_FEATURE" VARIABLE="scv" VALUE={scv} SET_GCODE_VARIABLE MACRO="END_FEATURE" VARIABLE="accel" VALUE={accel} SET_GCODE_VARIABLE MACRO="END_FEATURE" VARIABLE="ratio" VALUE={ratio} _USER_START_FEATURE FEATURE={params.FEATURE} [gcode_macro END_FEATURE] variable_scv = 5 variable_accel = 10000 variable_ratio = 0.5 gcode = RATOS_DEBUG PREFIX="G-Code" MSG="End {params.FEATURE} feature gcode" SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={scv} ACCEL={accel} MINIMUM_CRUISE_RATIO={ratio} _USER_END_FEATURE FEATURE={params.FEATURE} SCV={scv} ACCEL={accel} RATIO={ratio} [gcode_macro _ON_LAYER_CHANGE] variable_layer_number = 0 description = INTERNAL USE ONLY. Call it from the slicers after layer change custom gcode gcode = {% set layer = params.LAYER|int %} SET_GCODE_VARIABLE MACRO=_ON_LAYER_CHANGE VARIABLE=layer_number VALUE={layer} SET_PRINT_STATS_INFO CURRENT_LAYER={layer} [gcode_macro _LEARN_MORE_CALIBRATION] gcode = {% set link_url = "https://github.com/HelgeKeck/RatOS/tree/documentation_v2.1/site/docs/configuration/calibration.md" %} {% set link_text = "RatOS 2.1 Calibration Macros" %} {% set line_1 = '"Learn more about the %s"' % (link_url, link_text) %} CONSOLE_ECHO TITLE="INFO" MSG={line_1} [gcode_macro _LEARN_MORE_CHAMBER_FILTER] gcode = {% set link_url = "https://github.com/HelgeKeck/RatOS/tree/documentation_v2.1/site/docs/configuration/chamber_filter.md" %} {% set link_text = "RatOS 2.1 Chamber Filter Control" %} {% set line_1 = '"Learn more about the %s"' % (link_url, link_text) %} CONSOLE_ECHO TITLE="INFO" MSG={line_1} [gcode_macro _LEARN_MORE_FILAMENT] gcode = {% set link_url = "https://github.com/HelgeKeck/RatOS/tree/documentation_v2.1/site/docs/configuration/filaments.md" %} {% set link_text = "RatOS 2.1 Filament Macros" %} {% set line_1 = '"Learn more about the %s"' % (link_url, link_text) %} CONSOLE_ECHO TITLE="INFO" MSG={line_1} [gcode_macro _CONSOLE_SAVE_CONFIG] gcode = M118 Click SAVE_CONFIG to save the settings to your printer.cfg. [gcode_macro SAVE_Z_OFFSET] gcode = {% if printer.configfile.settings.beacon is defined %} _BEACON_SAVE_MULTIPLIER {% else %} Z_OFFSET_APPLY_PROBE {% endif %} [idle_timeout] gcode = {% if printer.webhooks.state|lower == 'ready' %} {% if printer.pause_resume.is_paused|lower == 'false' %} RATOS_ECHO PREFIX="IDLE" MSG="2 hours since last activity. Powering off heaters and motors.." TURN_OFF_HEATERS M84 {% endif %} {% endif %} timeout = 7200 [temperature_sensor raspberry_pi] sensor_type = temperature_host [virtual_sdcard] path = ~/printer_data/gcodes [display_status] [pause_resume] [respond] [ratos] [mcu] serial = /tmp/klipper_host_mcu [printer] kinematics = none max_velocity = 1 max_accel = 1 [gcode_macro PAUSE] rename_existing = PAUSE_BASE gcode = RATOS_ECHO MSG="Please setup your printer through the RatOS configurator at /configure" [gcode_macro RESUME] rename_existing = RESUME_BASE gcode = RATOS_ECHO MSG="Please setup your printer through the RatOS configurator at /configure" [gcode_macro CANCEL_PRINT] rename_existing = CANCEL_BASE gcode = RATOS_ECHO MSG="Please setup your printer through the RatOS configurator at /configure" ======================= mcu 'mcu': Starting connect webhooks client 4125579584: New connection webhooks client 4125579584: Client info {'program': 'Moonraker', 'version': 'v0.9.1-0-g63578ae'} Loaded MCU 'mcu' 119 commands (?-20240727_132503-fv-az659-741 / gcc: (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110 binutils: (GNU Binutils for Raspbian) 2.35.2) MCU 'mcu' config: ADC_MAX=4095 CLOCK_FREQ=50000000 MCU=linux PCA9685_MAX=4096 PWM_MAX=32768 STATS_SUMSQ_BASE=256 Sending MCU 'mcu' printer configuration... Configured MCU 'mcu' (1024 moves) Config error Traceback (most recent call last): File "/home/pi/klipper/klippy/klippy.py", line 135, in _connect cb() File "/home/pi/klipper/klippy/extras/ratos.py", line 39, in _connect self.bed_mesh = self.printer.lookup_object('bed_mesh') File "/home/pi/klipper/klippy/klippy.py", line 79, in lookup_object raise self.config_error("Unknown config object '%s'" % (name,)) configparser.Error: Unknown config object 'bed_mesh'