Starting Klippy... Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/klipper_config/printer.cfg', '-l', '/home/pi/klipper_logs/klippy.log', '-a', '/tmp/klippy_uds'] Git version: 'v0.10.0-173-gbea20278' CPU: 4 core ARMv7 Processor rev 4 (v7l) Python: '2.7.16 (default, Oct 10 2019, 22:02:15) \n[GCC 8.3.0]' Start printer at Tue Oct 25 00:25:21 2022 (1666653921.8 24.6) ===== Config file ===== [virtual_sdcard] path = /home/pi/gcode_files [pause_resume] [display_status] [gcode_macro CANCEL_PRINT] description = Cancel the actual running print rename_existing = CANCEL_PRINT_BASE gcode = TURN_OFF_HEATERS CANCEL_PRINT_BASE [gcode_macro PAUSE] description = Pause the actual running print rename_existing = PAUSE_BASE variable_extrude = 1.0 gcode = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} {% 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 %} 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 = {% set E = printer["gcode_macro PAUSE"].extrude|float %} {% if 'VELOCITY' in params|upper %} {% set get_params = ('VELOCITY=' + params.VELOCITY) %} {%else %} {% set get_params = "" %} {% endif %} {% 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 GET_TIMELAPSE_SETUP] description = Print the Timelapse setup gcode = {% set tl = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %} {action_respond_info("Timelapse Setup: enable: %s park: %s park position: %s custom cord x:%s y:%s dz:%s retract: %s mm speed: %s mm/s extrude: %s mm speed: %s mm/s travel speed: %s mm/s verbose: %s "% (tl.enable, tl.park.enable, tl.park.pos, tl.custom.x, tl.custom.y, tl.custom.dz, tl.extruder.retract, tl.speed.retract, tl.extruder.extrude, tl.speed.extrude, tl.speed.travel, tl.verbose))} [gcode_macro _SET_TIMELAPSE_SETUP] description = Set user parameters for timelapse gcode = {% set enable = printer['gcode_macro TIMELAPSE_TAKE_FRAME'].enable %} {% set verbose = printer['gcode_macro TIMELAPSE_TAKE_FRAME'].verbose %} {% set park = printer['gcode_macro TIMELAPSE_TAKE_FRAME'].park %} {% set custom = printer['gcode_macro TIMELAPSE_TAKE_FRAME'].custom %} {% set speed = printer['gcode_macro TIMELAPSE_TAKE_FRAME'].speed %} {% set extruder = printer['gcode_macro TIMELAPSE_TAKE_FRAME'].extruder %} {% set min = printer.toolhead.axis_minimum %} {% set max = printer.toolhead.axis_maximum %} {% if params.ENABLE is defined %} {% if params.ENABLE|lower == 'true' or params.ENABLE|lower == 'false' %} {% set enable = params.ENABLE %} {% else %} {action_raise_error("ENABLE=%s not supported. Allowed values are [True, False]" % params.ENABLE)} {% endif %} {% endif %} {% if params.VERBOSE is defined %} {% if params.VERBOSE|lower == 'true' or params.VERBOSE|lower == 'false' %} {% set verbose = params.VERBOSE %} {% else %} {action_raise_error("VERBOSE=%s not supported. Allowed values are [True, False]" % params.VERBOSE)} {% endif %} {% endif %} {% if params.PARK_ENABLE is defined %} {% if params.PARK_ENABLE|lower == 'true' or params.PARK_ENABLE|lower == 'false' %} {% set _dummy = park.update({'enable':params.PARK_ENABLE}) %} {% else %} {action_raise_error("PARK_ENABLE=%s not supported. Allowed values are [True, False]" % params.PARK_ENABLE)} {% endif %} {% endif %} {% if params.PARK_POS is defined %} {% if params.PARK_POS|lower == 'center' or params.PARK_POS|lower == 'front_left' or params.PARK_POS|lower == 'front_right' or params.PARK_POS|lower == 'back_left' or params.PARK_POS|lower == 'back_right' or params.PARK_POS|lower == 'custom' %} {% set _dummy = park.update({'pos':params.PARK_POS}) %} {% else %} {action_raise_error("PARK_POS=%s not supported. Allowed values are [CENTER, FRONT_LEFT, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, CUSTOM]" % params.PARK_POS)} {% endif %} {% endif %} {% if params.CUSTOM_POS_X is defined %} {% if params.CUSTOM_POS_X|float >= min.x and params.CUSTOM_POS_X|float <= max.x %} {% set _dummy = custom.update({'x':params.CUSTOM_POS_X}) %} {% else %} {action_raise_error("CUSTOM_POS_X=%s must be within [%s - %s]" % (params.CUSTOM_POS_X, min.x, max.x))} {% endif %} {% endif %} {% if params.CUSTOM_POS_Y is defined %} {% if params.CUSTOM_POS_Y|float >= min.y and params.CUSTOM_POS_Y|float <= max.y %} {% set _dummy = custom.update({'y':params.CUSTOM_POS_Y}) %} {% else %} {action_raise_error("CUSTOM_POS_Y=%s must be within [%s - %s]" % (params.CUSTOM_POS_Y, min.y, max.y))} {% endif %} {% endif %} {% if params.CUSTOM_POS_DZ is defined %} {% if params.CUSTOM_POS_DZ|float >= min.z and params.CUSTOM_POS_DZ|float <= max.z %} {% set _dummy = custom.update({'dz':params.CUSTOM_POS_DZ}) %} {% else %} {action_raise_error("CUSTOM_POS_DZ=%s must be within [%s - %s]" % (params.CUSTOM_POS_DZ, min.z, max.z))} {% endif %} {% endif %} {% if params.TRAVEL_SPEED is defined %} {% if params.TRAVEL_SPEED|float > 0 %} {% set _dummy = speed.update({'travel':params.TRAVEL_SPEED}) %} {% else %} {action_raise_error("TRAVEL_SPEED=%s must be larger than 0" % params.TRAVEL_SPEED)} {% endif %} {% endif %} {% if params.RETRACT_SPEED is defined %} {% if params.RETRACT_SPEED|float > 0 %} {% set _dummy = speed.update({'retract':params.RETRACT_SPEED}) %} {% else %} {action_raise_error("RETRACT_SPEED=%s must be larger than 0" % params.RETRACT_SPEED)} {% endif %} {% endif %} {% if params.EXTRUDE_SPEED is defined %} {% if params.EXTRUDE_SPEED|float > 0 %} {% set _dummy = speed.update({'extrude':params.EXTRUDE_SPEED}) %} {% else %} {action_raise_error("EXTRUDE_SPEED=%s must be larger than 0" % params.EXTRUDE_SPEED)} {% endif %} {% endif %} {% if params.EXTRUDE_DISTANCE is defined %} {% if params.EXTRUDE_DISTANCE|float >= 0 %} {% set _dummy = extruder.update({'extrude':params.EXTRUDE_DISTANCE}) %} {% else %} {action_raise_error("EXTRUDE_DISTANCE=%s must be specified as positiv number" % params.EXTRUDE_DISTANCE)} {% endif %} {% endif %} {% if params.RETRACT_DISTANCE is defined %} {% if params.RETRACT_DISTANCE|float >= 0 %} {% set _dummy = extruder.update({'retract':params.RETRACT_DISTANCE}) %} {% else %} {action_raise_error("RETRACT_DISTANCE=%s must be specified as positiv number" % params.RETRACT_DISTANCE)} {% endif %} {% endif %} SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=enable VALUE='"{enable}"' SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=verbose VALUE='"{verbose}"' SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=park VALUE="{park}" SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=custom VALUE="{custom}" SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=speed VALUE="{speed}" SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=extruder VALUE="{extruder}" [gcode_macro TIMELAPSE_TAKE_FRAME] description = Take Timelapse shoot variable_enable = False variable_takingframe = False variable_park = {'enable': False, 'pos' : 'center'} variable_custom = {'x': 0, 'y': 0, 'dz': 0} variable_extruder = {'retract': 1.0, 'extrude': 1.0} variable_speed = {'travel': 100, 'retract': 15, 'extrude': 15} variable_verbose = True variable_absolute = {'coordinates': True, 'extrude': True} gcode = {% set hyperlapse = params.HYPERLAPSE|default('false')|lower %} {% set min = printer.toolhead.axis_minimum %} {% set max = printer.toolhead.axis_maximum %} {% set act = printer.toolhead.position %} {% set pos_dic = {'center' : {'x': (max.x-(max.x-min.y)/2), 'y': (max.y-(max.y-min.y)/2), 'dz': 1 }, 'front_left' : {'x': min.x , 'y': min.y , 'dz': 0 }, 'front_right': {'x': max.x , 'y': min.y , 'dz': 0 }, 'back_left' : {'x': min.x , 'y': max.y , 'dz': 0 }, 'back_right' : {'x': max.x , 'y': max.y , 'dz': 0 }, 'custom' : {'x': custom.x , 'y': custom.y , 'dz': custom.dz}} %} {% if (act.z|float + pos_dic[park.pos].dz|float) < max.z|float %} {% set pos = {'x': pos_dic[park.pos|lower].x, 'y': pos_dic[park.pos].y, 'z': (act.z|float + pos_dic[park.pos].dz|float)} %} {% else %} {% set pos = {'x': pos_dic[park.pos|lower].x, 'y': pos_dic[park.pos].y, 'z': max.z} %} {% endif %} {% if enable|lower == 'true' %} {% if (hyperlapse == 'true' and printer['gcode_macro HYPERLAPSE'].run|lower == 'true') or (hyperlapse == 'false' and printer['gcode_macro HYPERLAPSE'].run|lower == 'false') %} {% set absolute = {'coordinates': printer.gcode_move.absolute_coordinates, 'extrude' : printer.gcode_move.absolute_extrude} %} SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=absolute VALUE="{absolute}" {% if park.enable|lower == 'true' %} M83 ; insure relative extrusion {% if printer.extruder.can_extrude|lower == 'false' %} {action_respond_info("Timelapse: Warning, minimum extruder temperature not reached!")} {% else %} G0 E-{extruder.retract} F{speed.retract|int * 60} {% endif %} {printer.configfile.settings['gcode_macro pause'].rename_existing} ; execute the klipper PAUSE command G90 ; insure absolute move {% if "xyz" not in printer.toolhead.homed_axes %} {action_respond_info("Timelapse: Warning, axis not homed yet!")} {% else %} G0 X{pos.x} Y{pos.y} Z{pos.z} F{speed.travel|int * 60} {% endif %} SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=takingframe VALUE=True UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_TAKE_FRAME DURATION=0.5 M400 {% endif %} _TIMELAPSE_NEW_FRAME HYPERLAPSE={hyperlapse} {% endif %} {% else %} {% if verbose|lower == 'true' %} {action_respond_info("Timelapse: disabled, take frame ignored")} {% endif %} {% endif %} [gcode_macro _TIMELAPSE_NEW_FRAME] description = action call for timelapse shoot. must be a seperate macro gcode = {action_call_remote_method("timelapse_newframe", macropark=printer['gcode_macro TIMELAPSE_TAKE_FRAME'].park, hyperlapse=params.HYPERLAPSE)} [delayed_gcode _WAIT_TIMELAPSE_TAKE_FRAME] gcode = {% set timelapse = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %} {% if timelapse.takingframe %} UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_TAKE_FRAME DURATION=0.5 {% else %} {printer.configfile.settings['gcode_macro resume'].rename_existing} VELOCITY={timelapse.speed.travel} ; execute the klipper RESUME command {% if printer.extruder.can_extrude|lower == 'false' %} {action_respond_info("Timelapse: Warning minimum extruder temperature not reached!")} {% else %} G0 E{timelapse.extruder.extrude} F{timelapse.speed.extrude|int * 60} {% endif %} {% if timelapse.absolute.coordinates|lower == 'false' %} G91 {% endif %} {% if timelapse.absolute.extrude|lower == 'true' %} M82 {% endif %} {% endif %} [gcode_macro HYPERLAPSE] description = Start/Stop a hyperlapse recording variable_cycle = 0 variable_run = False gcode = {% set cycle = params.CYCLE|default(30)|int %} {% if params.ACTION is defined and params.ACTION|lower == 'start' %} {action_respond_info("Hyperlapse: frames started (Cycle %d sec)" % cycle)} SET_GCODE_VARIABLE MACRO=HYPERLAPSE VARIABLE=run VALUE=True SET_GCODE_VARIABLE MACRO=HYPERLAPSE VARIABLE=cycle VALUE={cycle} UPDATE_DELAYED_GCODE ID=_HYPERLAPSE_LOOP DURATION={cycle} TIMELAPSE_TAKE_FRAME HYPERLAPSE="True" {% elif params.ACTION is defined and params.ACTION|lower == 'stop' %} SET_GCODE_VARIABLE MACRO=HYPERLAPSE VARIABLE=run VALUE=False {action_respond_info("Hyperlapse: frames stopped")} UPDATE_DELAYED_GCODE ID=_HYPERLAPSE_LOOP DURATION=0 {% else %} {action_respond_info("Hyperlapse: No valid input parameter Use: - HYPERLAPSE ACTION=START [CYCLE=time] - HYPERLAPSE ACTION=STOP")} {% endif %} [delayed_gcode _HYPERLAPSE_LOOP] gcode = UPDATE_DELAYED_GCODE ID=_HYPERLAPSE_LOOP DURATION={printer["gcode_macro HYPERLAPSE"].cycle} TIMELAPSE_TAKE_FRAME HYPERLAPSE="True" [gcode_macro TIMELAPSE_RENDER] description = Render Timelapse video and wait for the result variable_render = False variable_run_identifier = 0 gcode = {action_respond_info("Timelapse: Rendering started")} {action_call_remote_method("timelapse_render", byrendermacro="True")} SET_GCODE_VARIABLE MACRO=TIMELAPSE_RENDER VARIABLE=render VALUE=True {printer.configfile.settings['gcode_macro pause'].rename_existing} ; execute the klipper PAUSE command UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_RENDER DURATION=0.5 [delayed_gcode _WAIT_TIMELAPSE_RENDER] gcode = {% set ri = printer['gcode_macro TIMELAPSE_RENDER'].run_identifier|int % 4 %} SET_GCODE_VARIABLE MACRO=TIMELAPSE_RENDER VARIABLE=run_identifier VALUE={ri + 1} {% if printer['gcode_macro TIMELAPSE_RENDER'].render %} M117 Rendering {['-','\\','|','/'][ri]} UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_RENDER DURATION=0.5 {% else %} {action_respond_info("Timelapse: Rendering finished")} M117 {printer.configfile.settings['gcode_macro resume'].rename_existing} ; execute the klipper RESUME command {% endif %} [stepper_x] step_pin = PD11 dir_pin = !PD10 enable_pin = !PD13 microsteps = 16 rotation_distance = 80 endstop_pin = ^PC1 position_endstop = 0 position_max = 230 homing_speed = 50 [stepper_y] step_pin = PD5 dir_pin = PD4 enable_pin = !PD6 microsteps = 16 rotation_distance = 80 endstop_pin = ^PC3 position_endstop = 230 position_max = 230 homing_speed = 50 [stepper_z] step_pin = PA15 dir_pin = PA8 enable_pin = !PD1 microsteps = 16 rotation_distance = 3.2 endstop_pin = probe:z_virtual_endstop position_min = -5 position_max = 253 [bltouch] sensor_pin = ^PE4 control_pin = PE5 x_offset = 21.5 y_offset = -18.75 z_offset = 1.100 [safe_z_home] home_xy_position = 115, 115 speed = 50 z_hop = 10 z_hop_speed = 5 [extruder] step_pin = PD15 dir_pin = !PD14 enable_pin = !PC7 microsteps = 16 rotation_distance = 66.666 nozzle_diameter = 0.400 filament_diameter = 1.750 heater_pin = PB3 sensor_type = EPCOS 100K B57560G104F sensor_pin = PA2 min_temp = 0 max_temp = 275 control = pid pid_kp = 42.717 pid_ki = 3.129 pid_kd = 145.773 [fan] pin = PB4 [bed_mesh] speed = 120 horizontal_move_z = 10 mesh_min = 25, 10 mesh_max = 220, 210 probe_count = 5, 5 algorithm = bicubic bicubic_tension = 0.4 [output_pin motor_power] pin = PC13 value = 1 [temperature_sensor Raspberry Pi] sensor_type = temperature_host min_temp = 10 max_temp = 100 [temperature_sensor MCU] sensor_type = temperature_mcu min_temp = 0 max_temp = 100 [mcu] serial = /dev/serial/by-id/usb-Klipper_stm32f429xx_32004F000450314D35303320-if00 [printer] kinematics = cartesian max_velocity = 350 max_accel = 2000 max_z_velocity = 5 max_z_accel = 100 [board_pins] aliases = EXP1_1=PC5, EXP1_3=PB1, EXP1_5=PE10, EXP1_7=PE12, EXP1_9=, EXP1_2=PB0, EXP1_4=PE9, EXP1_6=PE11, EXP1_8=PE13, EXP1_10=<5V>, EXP2_1=PA6, EXP2_3=PE7, EXP2_5=PB2, EXP2_7=PC4, EXP2_9=, EXP2_2=PA5, EXP2_4=PA4, EXP2_6=PA7, EXP2_8=, EXP2_10= [bed_mesh default] version = 1 points = 0.095000, 0.114000, 0.096000, 0.148000, 0.214000 0.083000, 0.043000, 0.048000, 0.130000, 0.188000 0.060000, -0.006000, -0.059000, 0.084000, 0.161000 0.134000, 0.062000, 0.091000, 0.054000, 0.145000 0.057000, 0.019000, 0.068000, 0.120000, 0.137000 tension = 0.4 min_x = 25.0 algo = bicubic y_count = 5 mesh_y_pps = 2 min_y = 10.0 x_count = 5 max_y = 210.0 mesh_x_pps = 2 max_x = 220.0 ======================= Extruder max_extrude_ratio=0.266081 mcu 'mcu': Starting serial connect mcu 'mcu': got {'#receive_time': 26.256247646, u'next_clock': 1296657536, u'oid': 13, u'value': 7680, '#name': u'analog_in_state', '#sent_time': 26.235781292} mcu 'mcu': got {'#receive_time': 26.296498115, u'next_clock': 1303377536, u'oid': 17, u'value': 31235, '#name': u'analog_in_state', '#sent_time': 26.286750979} Loaded MCU 'mcu' 94 commands (v0.10.0-173-gbea20278 / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1) MCU 'mcu' config: BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi3a=PC11,PC12,PC10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_i2c1a=PB8,PB9 RESERVE_PINS_USB=PA11,PA12 CLOCK_FREQ=168000000 BUS_PINS_spi1a=PB4,PB5,PB3 STATS_SUMSQ_BASE=256 BUS_PINS_spi3=PB4,PB5,PB3 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_spi4=PE13,PE14,PE12 PWM_MAX=255 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi1=PA6,PA7,PA5 RESERVE_PINS_crystal=PH0,PH1 MCU=stm32f429xx mcu 'mcu': got {'#receive_time': 26.556313114, u'next_clock': 1347057536, u'oid': 13, u'value': 7679, '#name': u'analog_in_state', '#sent_time': 26.552408479} mcu_temperature 'mcu' nominal base=-259.538462 slope=1260.000000 Configured MCU 'mcu' (1024 moves) webhooks client 1969028592: New connection webhooks client 1969028592: Client info {'program': 'Moonraker', 'version': 'v0.7.1-229-g54abd27'} mcu 'mcu': got {'#receive_time': 27.56729551, u'clock': 0, u'can_trigger': 0, u'trigger_reason': 1, u'oid': 1, '#name': u'trsync_state', '#sent_time': 27.566124989} bed_mesh: generated points Index | Tool Adjusted | Probe 0 | (3.5, 28.8) | (25.0, 10.0) 1 | (52.2, 28.8) | (73.8, 10.0) 2 | (101.0, 28.8) | (122.5, 10.0) 3 | (149.8, 28.8) | (171.2, 10.0) 4 | (198.5, 28.8) | (220.0, 10.0) 5 | (198.5, 78.8) | (220.0, 60.0) 6 | (149.8, 78.8) | (171.2, 60.0) 7 | (101.0, 78.8) | (122.5, 60.0) 8 | (52.2, 78.8) | (73.8, 60.0) 9 | (3.5, 78.8) | (25.0, 60.0) 10 | (3.5, 128.8) | (25.0, 110.0) 11 | (52.2, 128.8) | (73.8, 110.0) 12 | (101.0, 128.8) | (122.5, 110.0) 13 | (149.8, 128.8) | (171.2, 110.0) 14 | (198.5, 128.8) | (220.0, 110.0) 15 | (198.5, 178.8) | (220.0, 160.0) 16 | (149.8, 178.8) | (171.2, 160.0) 17 | (101.0, 178.8) | (122.5, 160.0) 18 | (52.2, 178.8) | (73.8, 160.0) 19 | (3.5, 178.8) | (25.0, 160.0) 20 | (3.5, 228.8) | (25.0, 210.0) 21 | (52.2, 228.8) | (73.8, 210.0) 22 | (101.0, 228.8) | (122.5, 210.0) 23 | (149.8, 228.8) | (171.2, 210.0) 24 | (198.5, 228.8) | (220.0, 210.0) Starting heater checks for extruder webhooks: registering remote method 'shutdown_machine' for connection id: 1969028592 webhooks: registering remote method 'reboot_machine' for connection id: 1969028592 webhooks: registering remote method 'pause_job_queue' for connection id: 1969028592 webhooks: registering remote method 'start_job_queue' for connection id: 1969028592 webhooks: registering remote method 'timelapse_newframe' for connection id: 1969028592 webhooks: registering remote method 'timelapse_saveFrames' for connection id: 1969028592 webhooks: registering remote method 'timelapse_render' for connection id: 1969028592