KlipperScreen icon indicating copy to clipboard operation
KlipperScreen copied to clipboard

[BUG] KlipperScreen not showing all enabled Macros

Open McFuzz89 opened this issue 3 years ago • 2 comments

What happened?

After one of the recent updates (currently running v0.3.6-14), the Macro menu stopped showing all available Macros. I keep all macro cfgs in a separate folder and observer that the three new Macros I created today show up, but some of the ones I created in the past no longer show up.

As a test, I took one of the missing macros and renamed it, then copied its contents and added it to printer.cfg - after restarting klipper, that macro appeared in KlipperScreen, but the renamed one was still missing.

What did you expect to happen instead?

I expect all Macros in dedicated macro folder to show up.

How to reproduce this bug?

Unknown - I am not sure what led to this condition, but what I have done is I took one of the missing macros and renamed it, then copied its contents and added it to printer.cfg - after restarting klipper, that macro appeared in KlipperScreen, but the renamed one was still missing.

Additional information:

If you review the log output, in the wall of text you can see the missing macros - for example LOAD_FILAMENT and UNLOAD_FILAMENT...

Log output

2023-10-02 17:48:27,391 [printer.py:change_state()] - Changing state from 'ready' to 'disconnected'
2023-10-02 17:48:27,391 [printer.py:change_state()] - Adding callback for state: disconnected
2023-10-02 17:48:27,392 [screen.py:state_disconnected()] - ### Going to disconnected
2023-10-02 17:48:27,397 [screen.py:show_panel()] - Reinitializing panel
2023-10-02 17:48:27,459 [screen.py:attach_panel()] - Current panel hierarchy: splash_screen
2023-10-02 17:48:30,994 [KlippyRest.py:_do_request()] - Sending request to http://127.0.0.1:7125/server/info
2023-10-02 17:48:31,001 [KlippyRest.py:_do_request()] - Sending request to http://127.0.0.1:7125/server/info
2023-10-02 17:48:31,002 [screen.py:init_printer()] - Moonraker info {'klippy_connected': True, 'klippy_state': 'startup', 'components': ['klippy_connection', 'application', 'websockets', 'internal_transport', 'dbus_manager', 'database', 'file_manager', 'klippy_apis', 'secrets', 'template', 'shell_command', 'machine', 'data_store', 'proc_stats', 'job_state', 'job_queue', 'http_client', 'announcements', 'webcam', 'extensions', 'octoprint_compat', 'history', 'update_manager', 'authorization'], 'failed_components': [], 'registered_directories': ['config', 'logs', 'gcodes', 'config_examples', 'docs'], 'warnings': [], 'websocket_count': 3, 'moonraker_version': 'v0.8.0-142-gee62d07', 'missing_klippy_requirements': [], 'api_version': [1, 3, 0], 'api_version_string': '1.3.0'}
2023-10-02 17:48:31,011 [KlippyRest.py:_do_request()] - Sending request to http://127.0.0.1:7125/server/webcams/list
2023-10-02 17:48:31,011 [printer.py:configure_cameras()] - Cameras: []
2023-10-02 17:48:31,020 [KlippyRest.py:_do_request()] - Sending request to http://127.0.0.1:7125/printer/info
2023-10-02 17:48:31,261 [KlippyRest.py:_do_request()] - Sending request to http://127.0.0.1:7125/printer/objects/query?configfile
2023-10-02 17:48:31,262 [screen.py:init_printer()] - {'configfile': {'save_config_pending_items': {}, 'warnings': [], 'config': {'gcode_macro CALIBRATE_Z_OFFSET': {'gcode': '\nG28\nPROBE_CALIBRATE'}, 'pause_resume': {}, 'gcode_macro FC_RESUME': {'gcode': '\n{% set E = printer["gcode_macro PAUSE"].extrude|float %}\nSET_IDLE_TIMEOUT TIMEOUT={ 10 * 60 }\nG1 E-{ E }\nG92 E0\nRESUME', 'description': 'Resume print after Filament Change'}, 'gcode_macro M600': {'gcode': '\n{% if printer.extruder.temperature < 180 %}\n{action_respond_info("Extruder temperature too low")}\n{% else %}\nPAUSE_MACRO\n_DISABLE_FS\nUNLOAD_FILAMENT\n{% endif %}', 'description': 'Starts process of Filament Change'}, 'gcode_macro BED_MESH_CALIBRATE_AND_SAVE': {'gcode': '\nG28\nBED_MESH_CALIBRATE\nG1 Z50\nSAVE_VARIABLE VARIABLE=print_count VALUE=1\nSAVE_CONFIG'}, 'gcode_macro COOL': {'gcode': '\nTURN_OFF_HEATERS', 'description': 'Turns off all heaters'}, 'gcode_macro END_PRINT': {'gcode': '\n{% set Y_PARK = printer.configfile.config["stepper_y"]["position_max"]|float*0.80 %}\n{% if printer.toolhead.position.z|float + 30 >= printer.configfile.config["stepper_z"]["position_max"]|float %}\nG90                  ;set absolute extrusion\nG1 Z{printer.configfile.config["stepper_z"]["position_max"]|float} F1000 ;Move tool\n{% else %}\nG91                  ;set relative extrusion\nG1 Z30 F1000         ;move Z axis up 30mm\nG90\n{% endif %}\nG1 X5 Y{Y_PARK}; present print\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors'}, 'filament_switch_sensor RunoutSensor': {'runout_gcode': 'PAUSE', 'switch_pin': '^!PC15', 'pause_on_runout': 'True'}, 'gcode_macro LOAD_FILAMENT': {'gcode': '\n{% if printer.extruder.temperature < 180 %}\n{action_respond_info("Extruder temperature too low")}\n{% else %}\nSAVE_GCODE_STATE NAME=LOAD_state\nG91\nG1 E50 F{ 5 * 60 }\nG4 P{ 0.9 * 1000 }\nG1 E25.0 F{ 5 * 60 }\n_ENABLE_FS\nRESTORE_GCODE_STATE NAME=LOAD_state\n{% endif %}', 'description': 'Loads filament into the extruder'}, 'bed_mesh default': {'tension': '0.2', 'min_x': '26.0', 'min_y': '30.0', 'y_count': '10', 'mesh_y_pps': '2', 'x_count': '10', 'version': '1', 'algo': 'bicubic', 'mesh_x_pps': '2', 'max_y': '199.92', 'max_x': '199.97', 'points': '\n0.020000, 0.026250, 0.038750, 0.010000, -0.011250, 0.000000, -0.020000, -0.018750, 0.008750, 0.021250\n0.033750, 0.041250, 0.052500, 0.033750, 0.012500, 0.021250, 0.008750, 0.005000, 0.028750, 0.041250\n0.026250, 0.035000, 0.046250, 0.026250, 0.010000, 0.021250, 0.001250, 0.001250, 0.031250, 0.041250\n0.016250, 0.025000, 0.036250, 0.008750, -0.010000, 0.010000, -0.013750, -0.012500, 0.025000, 0.036250\n0.011250, 0.026250, 0.033750, 0.003750, -0.017500, 0.005000, -0.016250, -0.011250, 0.027500, 0.038750\n0.013750, 0.022500, 0.031250, 0.007500, -0.012500, 0.008750, -0.008750, -0.001250, 0.026250, 0.037500\n0.017500, 0.026250, 0.033750, 0.008750, -0.005000, 0.008750, -0.008750, 0.003750, 0.033750, 0.048750\n0.023750, 0.031250, 0.036250, 0.006250, -0.010000, 0.006250, -0.012500, 0.001250, 0.031250, 0.048750\n0.030000, 0.041250, 0.046250, 0.021250, 0.011250, 0.020000, 0.001250, 0.008750, 0.036250, 0.058750\n0.031250, 0.043750, 0.046250, 0.018750, 0.002500, 0.011250, -0.011250, -0.003750, 0.030000, 0.038750'}, 'virtual_sdcard': {'path': '~/printer_data/gcodes'}, 'gcode_macro _DISABLE_FS': {'gcode': '\nSET_FILAMENT_SENSOR SENSOR=RunoutSensor ENABLE=0', 'description': 'disables filament sensor that might trigger an M600 in the middle of a load/unload/M600'}, 'gcode_macro _ENABLE_FS': {'gcode': '\nSET_FILAMENT_SENSOR SENSOR=RunoutSensor ENABLE=1', 'description': 'enables filament sensor'}, 'gcode_macro CANCEL_PRINT': {'rename_existing': 'CANCEL_PRINT_BASE', 'description': 'Cancel the actual running print', 'gcode': '\nTURN_OFF_HEATERS\nCANCEL_PRINT_BASE'}, 'gcode_macro PAUSE_MACRO': {'gcode': '\nPAUSE\nSET_IDLE_TIMEOUT TIMEOUT={ 30 * 60 }', 'description': 'Pauses Print'}, 'gcode_macro G29': {'gcode': '\nBED_MESH_CALIBRATE_AND_SAVE'}, 'stepper_x': {'position_endstop': '-6', 'endstop_pin': '^!PA5', 'rotation_distance': '40', 'step_pin': 'PC2', 'position_min': '-6', 'microsteps': '16', 'homing_speed': '50', 'dir_pin': 'PB9', 'position_max': '242', 'enable_pin': '!PC3'}, 'heater_bed': {'control': 'pid', 'pid_kp': '72.739', 'sensor_pin': 'PC4', 'heater_pin': 'PA7', 'sensor_type': 'Generic 3950', 'pid_kd': '613.733', 'pid_ki': '2.155', 'min_temp': '0', 'max_temp': '100'}, 'delayed_gcode bed_mesh_init': {'gcode': '\nBED_MESH_PROFILE LOAD="default"', 'initial_duration': '.01'}, 'temperature_sensor Board_MCU': {'min_temp': '0', 'sensor_type': 'temperature_mcu', 'max_temp': '100'}, 'screws_tilt_adjust': {'screw1_name': 'LowerLeft', 'screw4_name': 'UpperRight', 'horizontal_move_z': '10', 'screw2_name': 'UpperLeft', 'speed': '150', 'screw_thread': 'CW-M3', 'screw2': '58, 240', 'screw3': '230, 70', 'screw1': '58, 70', 'screw3_name': 'LowerRight', 'screw4': '230, 240'}, 'gcode_macro START_PRINT': {'gcode': '\n{% set BED_TEMP = params.BED_TEMP|default(80)|float %}\n{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(230)|float %}\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{BED_TEMP} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nBED_MESH_PROFILE LOAD="default"\nG1 Z50 F240\nG1 X2 Y10 F3000\nM190 S{BED_TEMP}} ; wait for bed temp to stabilize\nM104 S{EXTRUDER_TEMP} ; set final nozzle temp\nM109 S{EXTRUDER_TEMP} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0'}, 'save_variables': {'filename': '~/klipper_variables.cfg'}, 'printer': {'max_velocity': '300', 'max_z_velocity': '10', 'kinematics': 'cartesian', 'max_accel': '3500', 'max_z_accel': '50'}, 'gcode_macro RESUME': {'rename_existing': 'RESUME_BASE', 'description': 'Resume the actual running print', 'gcode': '\n{% set E = printer["gcode_macro PAUSE"].extrude|float %}\n{% if \'VELOCITY\' in params|upper %}\n{% set get_params = (\'VELOCITY=\' + params.VELOCITY)  %}\n{%else %}\n{% set get_params = "" %}\n{% endif %}\n{% if printer.extruder.can_extrude|lower == \'true\' %}\nG91\nG1 E{E} F2100\n{% else %}\n{action_respond_info("Extruder not hot enough")}\n{% endif %}\nRESUME_BASE {get_params}'}, 'gcode_macro PAUSE': {'rename_existing': 'PAUSE_BASE', 'description': 'Pause the actual running print', 'variable_extrude': '1.0', 'gcode': '\n{% set E = printer["gcode_macro PAUSE"].extrude|float %}\n{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}\n{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}\n{% set max_z = printer.toolhead.axis_maximum.z|float %}\n{% set act_z = printer.toolhead.position.z|float %}\n{% if act_z < (max_z - 2.0) %}\n{% set z_safe = 2.0 %}\n{% else %}\n{% set z_safe = max_z - act_z %}\n{% endif %}\nPAUSE_BASE\nG91\n{% if printer.extruder.can_extrude|lower == \'true\' %}\nG1 E-{E} F2100\n{% else %}\n{action_respond_info("Extruder not hot enough")}\n{% endif %}\n{% if "xyz" in printer.toolhead.homed_axes %}\nG1 Z{z_safe} F900\nG90\nG1 X{x_park} Y{y_park} F6000\n{% else %}\n{action_respond_info("Printer not homed")}\n{% endif %}'}, 'safe_z_home': {'z_hop_speed': '5', 'speed': '100', 'home_xy_position': '154,154', 'z_hop': '5'}, 'idle_timeout': {'gcode': '\nM84\nTURN_OFF_HEATERS'}, 'gcode_macro START_PRINT_BW': {'gcode': '\n{% set BED_TEMP = params.BED_TEMP|default(80)|float %}\n{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(230)|float %}\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{BED_TEMP} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nBED_MESH_PROFILE LOAD="default"\nG1 Z50 F240\nG1 X2 Y10 F3000\nM190 S{BED_TEMP}} ; wait for bed temp to stabilize\nG4 P450000 ; bed expansion wait time of 7.5 minutes\nM104 S{EXTRUDER_TEMP} ; set final nozzle temp\nM109 S{EXTRUDER_TEMP} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0'}, 'fan': {'pin': 'PA0'}, 'mcu': {'restart_method': 'command', 'serial': '/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0'}, 'gcode_macro PURGE': {'gcode': '\n{% if printer.extruder.temperature < 180 %}\n{action_respond_info("Extruder temperature too low")}\n{% else %}\nSAVE_GCODE_STATE NAME=PURGE_state\nG91\nG1 E45.0 F{ 5 * 60 }\nRESTORE_GCODE_STATE NAME=PURGE_state\n{% endif %}', 'description': 'Extrudes filament, used to clean out previous filament'}, 'bed_mesh': {'fade_target': '0', 'horizontal_move_z': '5', 'algorithm': 'bicubic', 'mesh_pps': '2,2', 'mesh_min': '26,30', 'mesh_max': '200,200', 'fade_start': '1', 'bicubic_tension': '0.2', 'fade_end': '10', 'split_delta_z': '.025', 'probe_count': '10,10', 'speed': '150', 'move_check_distance': '5'}, 'display_status': {}, 'gcode_macro HEAT': {'gcode': '\nSET_HEATER_TEMPERATURE HEATER=extruder TARGET=200\nHOME_CHECK\nG1 Z10 F3000', 'description': 'Heats up the extruder to get ready for Filament Change'}, 'heater_fan Hot_End_Fan': {'heater': 'extruder', 'pin': 'PC0', 'heater_temp': '35'}, 'stepper_z': {'endstop_pin': 'probe:z_virtual_endstop', 'rotation_distance': '8', 'step_pin': 'PB6', 'position_min': '-5', 'microsteps': '16', 'dir_pin': '!PB5', 'position_max': '270', 'enable_pin': '!PC3'}, 'gcode_macro UNLOAD_FILAMENT': {'gcode': '\n{% if printer.extruder.temperature < 180 %}\n{action_respond_info("Extruder temperature too low")}\n{% else %}\nSAVE_GCODE_STATE NAME=UNLOAD_state\n{% set z_lift = params.z_lift|default(50)|int %}\n{% set axis_max = printer.toolhead.axis_maximum %}\n{% set pos = printer.toolhead.position %}\n{% set z_diff = axis_max.z - pos.z %}\n{% set z_safe_lift = [ z_lift, z_diff ] | min%}\nG91\nG0 Z{ z_safe_lift }\nG92 E0\nG1 E5.0 F300\nG1 E-50 F{ 10 * 60 }\nG1 E-50 F{ 5 * 60 }\nRESTORE_GCODE_STATE NAME=UNLOAD_state\n{% endif %}', 'description': 'Unloads Filament from extruder'}, 'bltouch': {'sensor_pin': '^PC14', 'x_offset': '-31.4', 'control_pin': 'PC13', 'samples_result': 'average', 'y_offset': '-39.6', 'samples': '2', 'z_offset': '2.590', 'probe_with_touch_mode': 'true', 'stow_on_each_sample': 'false', 'speed': '5.0'}, 'stepper_y': {'position_endstop': '-4', 'endstop_pin': '^!PA6', 'rotation_distance': '40', 'step_pin': 'PB8', 'position_min': '-4', 'microsteps': '16', 'homing_speed': '50', 'dir_pin': 'PB7', 'position_max': '240', 'enable_pin': '!PC3'}, 'temperature_sensor Raspberry_Pi': {'min_temp': '0', 'sensor_type': 'temperature_host', 'max_temp': '100'}, 'extruder': {'control': 'pid', 'pid_kp': '23.077', 'sensor_type': 'EPCOS 100K B57560G104F', 'sensor_pin': 'PC5', 'nozzle_diameter': '0.400', 'rotation_distance': '2.172', 'gear_ratio': '1:3.5', 'max_extrude_only_distance': '1000.0', 'step_pin': 'PB4', 'pressure_advance': '0.0375', 'min_temp': '0', 'pid_kd': '84.806', 'microsteps': '16', 'pid_ki': '1.570', 'filament_diameter': '1.750', 'dir_pin': 'PB3', 'max_temp': '300', 'heater_pin': 'PA1', 'enable_pin': '!PC3'}}, 'settings': {'force_move': {'enable_force_move': False}, 'gcode_macro _disable_fs': {'gcode': '\nSET_FILAMENT_SENSOR SENSOR=RunoutSensor ENABLE=0', 'description': 'disables filament sensor that might trigger an M600 in the middle of a load/unload/M600'}, 'pause_resume': {'recover_velocity': 50.0}, 'safe_z_home': {'z_hop_speed': 5.0, 'move_to_previous': False, 'speed': 100.0, 'home_xy_position': [154.0, 154.0], 'z_hop': 5.0}, 'gcode_macro cancel_print': {'rename_existing': 'CANCEL_PRINT_BASE', 'description': 'Cancel the actual running print', 'gcode': '\nTURN_OFF_HEATERS\nCANCEL_PRINT_BASE'}, 'gcode_macro cool': {'gcode': '\nTURN_OFF_HEATERS', 'description': 'Turns off all heaters'}, 'gcode_macro end_print': {'gcode': '\n{% set Y_PARK = printer.configfile.config["stepper_y"]["position_max"]|float*0.80 %}\n{% if printer.toolhead.position.z|float + 30 >= printer.configfile.config["stepper_z"]["position_max"]|float %}\nG90                  ;set absolute extrusion\nG1 Z{printer.configfile.config["stepper_z"]["position_max"]|float} F1000 ;Move tool\n{% else %}\nG91                  ;set relative extrusion\nG1 Z30 F1000         ;move Z axis up 30mm\nG90\n{% endif %}\nG1 X5 Y{Y_PARK}; present print\nM140 S0 ; turn off heatbed\nM104 S0 ; turn off temperature\nM107 ; turn off fan\nM84 X Y E ; disable motors', 'description': 'G-Code macro'}, 'filament_switch_sensor runoutsensor': {'runout_gcode': 'PAUSE', 'pause_delay': 0.5, 'switch_pin': '^!PC15', 'pause_on_runout': True, 'event_delay': 3.0}, 'heater_bed': {'control': 'pid', 'pid_kp': 72.739, 'pullup_resistor': 4700.0, 'sensor_pin': 'PC4', 'heater_pin': 'PA7', 'max_power': 1.0, 'min_extrude_temp': 170.0, 'sensor_type': 'Generic 3950', 'inline_resistor': 0.0, 'pid_kd': 613.733, 'pwm_cycle_time': 0.1, 'pid_ki': 2.155, 'min_temp': 0.0, 'max_temp': 100.0, 'smooth_time': 1.0}, 'bed_mesh default': {'tension': 0.2, 'min_x': 26.0, 'min_y': 30.0, 'y_count': 10, 'mesh_y_pps': 2, 'x_count': 10, 'version': 1, 'algo': 'bicubic', 'mesh_x_pps': 2, 'max_y': 199.92, 'max_x': 199.97, 'points': [[0.02, 0.02625, 0.03875, 0.01, -0.01125, 0.0, -0.02, -0.01875, 0.00875, 0.02125], [0.03375, 0.04125, 0.0525, 0.03375, 0.0125, 0.02125, 0.00875, 0.005, 0.02875, 0.04125], [0.02625, 0.035, 0.04625, 0.02625, 0.01, 0.02125, 0.00125, 0.00125, 0.03125, 0.04125], [0.01625, 0.025, 0.03625, 0.00875, -0.01, 0.01, -0.01375, -0.0125, 0.025, 0.03625], [0.01125, 0.02625, 0.03375, 0.00375, -0.0175, 0.005, -0.01625, -0.01125, 0.0275, 0.03875], [0.01375, 0.0225, 0.03125, 0.0075, -0.0125, 0.00875, -0.00875, -0.00125, 0.02625, 0.0375], [0.0175, 0.02625, 0.03375, 0.00875, -0.005, 0.00875, -0.00875, 0.00375, 0.03375, 0.04875], [0.02375, 0.03125, 0.03625, 0.00625, -0.01, 0.00625, -0.0125, 0.00125, 0.03125, 0.04875], [0.03, 0.04125, 0.04625, 0.02125, 0.01125, 0.02, 0.00125, 0.00875, 0.03625, 0.05875], [0.03125, 0.04375, 0.04625, 0.01875, 0.0025, 0.01125, -0.01125, -0.00375, 0.03, 0.03875]]}, 'virtual_sdcard': {'path': '~/printer_data/gcodes', 'on_error_gcode': ''}, 'gcode_macro _enable_fs': {'gcode': '\nSET_FILAMENT_SENSOR SENSOR=RunoutSensor ENABLE=1', 'description': 'enables filament sensor'}, 'verify_heater extruder': {'heating_gain': 2.0, 'max_error': 120.0, 'hysteresis': 5.0, 'check_gain_time': 20.0}, 'stepper_z': {'homing_positive_dir': False, 'homing_retract_dist': 5.0, 'full_steps_per_rotation': 200, 'endstop_pin': 'probe:z_virtual_endstop', 'rotation_distance': 8.0, 'gear_ratio': [], 'second_homing_speed': 2.5, 'step_pin': 'PB6', 'position_min': -5.0, 'microsteps': 16, 'homing_speed': 5.0, 'dir_pin': '!PB5', 'position_max': 270.0, 'homing_retract_speed': 5.0, 'enable_pin': '!PC3'}, 'stepper_y': {'homing_positive_dir': False, 'homing_retract_dist': 5.0, 'position_endstop': -4.0, 'full_steps_per_rotation': 200, 'endstop_pin': '^!PA6', 'rotation_distance': 40.0, 'gear_ratio': [], 'second_homing_speed': 25.0, 'step_pin': 'PB8', 'homing_speed': 50.0, 'microsteps': 16, 'position_min': -4.0, 'dir_pin': 'PB7', 'position_max': 240.0, 'homing_retract_speed': 50.0, 'enable_pin': '!PC3'}, 'stepper_x': {'homing_positive_dir': False, 'homing_retract_dist': 5.0, 'position_endstop': -6.0, 'full_steps_per_rotation': 200, 'endstop_pin': '^!PA5', 'rotation_distance': 40.0, 'gear_ratio': [], 'second_homing_speed': 25.0, 'step_pin': 'PC2', 'position_min': -6.0, 'microsteps': 16, 'homing_speed': 50.0, 'position_max': 242.0, 'dir_pin': 'PB9', 'homing_retract_speed': 50.0, 'enable_pin': '!PC3'}, 'gcode_macro m600': {'gcode': '\n{% if printer.extruder.temperature < 180 %}\n{action_respond_info("Extruder temperature too low")}\n{% else %}\nPAUSE_MACRO\n_DISABLE_FS\nUNLOAD_FILAMENT\n{% endif %}', 'description': 'Starts process of Filament Change'}, 'delayed_gcode bed_mesh_init': {'gcode': '\nBED_MESH_PROFILE LOAD="default"', 'initial_duration': 0.01}, 'gcode_macro heat': {'gcode': '\nSET_HEATER_TEMPERATURE HEATER=extruder TARGET=200\nHOME_CHECK\nG1 Z10 F3000', 'description': 'Heats up the extruder to get ready for Filament Change'}, 'screws_tilt_adjust': {'horizontal_move_z': 10.0, 'screw4_name': 'UpperRight', 'screw1_name': 'LowerLeft', 'screw2_name': 'UpperLeft', 'speed': 150.0, 'screw_thread': 'CW-M3', 'screw2': [58.0, 240.0], 'screw3': [230.0, 70.0], 'screw1': [58.0, 70.0], 'screw3_name': 'LowerRight', 'screw4': [230.0, 240.0]}, 'temperature_sensor raspberry_pi': {'min_temp': 0.0, 'sensor_type': 'temperature_host', 'max_temp': 100.0, 'sensor_path': '/sys/class/thermal/thermal_zone0/temp'}, 'save_variables': {'filename': '~/klipper_variables.cfg'}, 'gcode_macro unload_filament': {'gcode': '\n{% if printer.extruder.temperature < 180 %}\n{action_respond_info("Extruder temperature too low")}\n{% else %}\nSAVE_GCODE_STATE NAME=UNLOAD_state\n{% set z_lift = params.z_lift|default(50)|int %}\n{% set axis_max = printer.toolhead.axis_maximum %}\n{% set pos = printer.toolhead.position %}\n{% set z_diff = axis_max.z - pos.z %}\n{% set z_safe_lift = [ z_lift, z_diff ] | min%}\nG91\nG0 Z{ z_safe_lift }\nG92 E0\nG1 E5.0 F300\nG1 E-50 F{ 10 * 60 }\nG1 E-50 F{ 5 * 60 }\nRESTORE_GCODE_STATE NAME=UNLOAD_state\n{% endif %}', 'description': 'Unloads Filament from extruder'}, 'printer': {'square_corner_velocity': 5.0, 'move_flush_time': 0.05, 'max_accel': 3500.0, 'buffer_time_start': 0.25, 'buffer_time_low': 1.0, 'max_z_accel': 50.0, 'max_velocity': 300.0, 'max_z_velocity': 10.0, 'kinematics': 'cartesian', 'buffer_time_high': 2.0, 'max_accel_to_decel': 1750.0}, 'gcode_macro calibrate_z_offset': {'gcode': '\nG28\nPROBE_CALIBRATE', 'description': 'G-Code macro'}, 'gcode_macro g29': {'gcode': '\nBED_MESH_CALIBRATE_AND_SAVE', 'description': 'G-Code macro'}, 'gcode_macro resume': {'rename_existing': 'RESUME_BASE', 'description': 'Resume the actual running print', 'gcode': '\n{% set E = printer["gcode_macro PAUSE"].extrude|float %}\n{% if \'VELOCITY\' in params|upper %}\n{% set get_params = (\'VELOCITY=\' + params.VELOCITY)  %}\n{%else %}\n{% set get_params = "" %}\n{% endif %}\n{% if printer.extruder.can_extrude|lower == \'true\' %}\nG91\nG1 E{E} F2100\n{% else %}\n{action_respond_info("Extruder not hot enough")}\n{% endif %}\nRESUME_BASE {get_params}'}, 'gcode_macro fc_resume': {'gcode': '\n{% set E = printer["gcode_macro PAUSE"].extrude|float %}\nSET_IDLE_TIMEOUT TIMEOUT={ 10 * 60 }\nG1 E-{ E }\nG92 E0\nRESUME', 'description': 'Resume print after Filament Change'}, 'heater_fan hot_end_fan': {'heater': ['extruder'], 'cycle_time': 0.01, 'pin': 'PC0', 'off_below': 0.0, 'heater_temp': 35.0, 'shutdown_speed': 1.0, 'fan_speed': 1.0, 'max_power': 1.0, 'kick_start_time': 0.1, 'hardware_pwm': False}, 'gcode_macro start_print_bw': {'gcode': '\n{% set BED_TEMP = params.BED_TEMP|default(80)|float %}\n{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(230)|float %}\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{BED_TEMP} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nBED_MESH_PROFILE LOAD="default"\nG1 Z50 F240\nG1 X2 Y10 F3000\nM190 S{BED_TEMP}} ; wait for bed temp to stabilize\nG4 P450000 ; bed expansion wait time of 7.5 minutes\nM104 S{EXTRUDER_TEMP} ; set final nozzle temp\nM109 S{EXTRUDER_TEMP} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0', 'description': 'G-Code macro'}, 'fan': {'cycle_time': 0.01, 'pin': 'PA0', 'off_below': 0.0, 'shutdown_speed': 0.0, 'max_power': 1.0, 'kick_start_time': 0.1, 'hardware_pwm': False}, 'mcu': {'baud': 250000, 'restart_method': 'command', 'max_stepper_error': 2.5e-05, 'serial': '/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0'}, 'gcode_macro load_filament': {'gcode': '\n{% if printer.extruder.temperature < 180 %}\n{action_respond_info("Extruder temperature too low")}\n{% else %}\nSAVE_GCODE_STATE NAME=LOAD_state\nG91\nG1 E50 F{ 5 * 60 }\nG4 P{ 0.9 * 1000 }\nG1 E25.0 F{ 5 * 60 }\n_ENABLE_FS\nRESTORE_GCODE_STATE NAME=LOAD_state\n{% endif %}', 'description': 'Loads filament into the extruder'}, 'bed_mesh': {'fade_target': 0.0, 'horizontal_move_z': 5.0, 'mesh_min': [26.0, 30.0], 'algorithm': 'bicubic', 'mesh_pps': [2, 2], 'mesh_max': [200.0, 200.0], 'fade_start': 1.0, 'bicubic_tension': 0.2, 'fade_end': 10.0, 'split_delta_z': 0.025, 'probe_count': [10, 10], 'speed': 150.0, 'move_check_distance': 5.0}, 'idle_timeout': {'gcode': '\nM84\nTURN_OFF_HEATERS', 'timeout': 600.0}, 'gcode_macro pause': {'gcode': '\n{% set E = printer["gcode_macro PAUSE"].extrude|float %}\n{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}\n{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}\n{% set max_z = printer.toolhead.axis_maximum.z|float %}\n{% set act_z = printer.toolhead.position.z|float %}\n{% if act_z < (max_z - 2.0) %}\n{% set z_safe = 2.0 %}\n{% else %}\n{% set z_safe = max_z - act_z %}\n{% endif %}\nPAUSE_BASE\nG91\n{% if printer.extruder.can_extrude|lower == \'true\' %}\nG1 E-{E} F2100\n{% else %}\n{action_respond_info("Extruder not hot enough")}\n{% endif %}\n{% if "xyz" in printer.toolhead.homed_axes %}\nG1 Z{z_safe} F900\nG90\nG1 X{x_park} Y{y_park} F6000\n{% else %}\n{action_respond_info("Printer not homed")}\n{% endif %}', 'description': 'Pause the actual running print', 'variable_extrude': '1.0', 'rename_existing': 'PAUSE_BASE'}, 'gcode_macro bed_mesh_calibrate_and_save': {'gcode': '\nG28\nBED_MESH_CALIBRATE\nG1 Z50\nSAVE_VARIABLE VARIABLE=print_count VALUE=1\nSAVE_CONFIG', 'description': 'G-Code macro'}, 'temperature_sensor board_mcu': {'min_temp': 0.0, 'sensor_type': 'temperature_mcu', 'sensor_mcu': 'mcu', 'max_temp': 100.0}, 'gcode_macro pause_macro': {'gcode': '\nPAUSE\nSET_IDLE_TIMEOUT TIMEOUT={ 30 * 60 }', 'description': 'Pauses Print'}, 'verify_heater heater_bed': {'heating_gain': 2.0, 'max_error': 120.0, 'check_gain_time': 60.0, 'hysteresis': 5.0}, 'gcode_macro start_print': {'gcode': '\n{% set BED_TEMP = params.BED_TEMP|default(80)|float %}\n{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(230)|float %}\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM140 S{BED_TEMP} ; set final bed temp\nM104 S150 ; set temporary nozzle temp to prevent oozing during homing and auto bed leveling\nG4 S10 ; allow partial nozzle warmup\nG28 ; home all axis\nBED_MESH_PROFILE LOAD="default"\nG1 Z50 F240\nG1 X2 Y10 F3000\nM190 S{BED_TEMP}} ; wait for bed temp to stabilize\nM104 S{EXTRUDER_TEMP} ; set final nozzle temp\nM109 S{EXTRUDER_TEMP} ; wait for nozzle temp to stabilize\nG1 Z0.28 F240\nG92 E0\nG1 Y140 E10 F1500 ; prime the nozzle\nG1 X2.3 F5000\nG92 E0\nG1 Y10 E10 F1200 ; prime the nozzle\nG92 E0', 'description': 'G-Code macro'}, 'bltouch': {'samples_tolerance_retries': 0, 'probe_with_touch_mode': True, 'x_offset': -31.4, 'lift_speed': 5.0, 'sample_retract_dist': 2.0, 'control_pin': 'PC13', 'samples_result': 'average', 'pin_move_time': 0.68, 'samples_tolerance': 0.1, 'y_offset': -39.6, 'samples': 2, 'pin_up_reports_not_triggered': True, 'z_offset': 2.59, 'sensor_pin': '^PC14', 'pin_up_touch_mode_reports_triggered': True, 'stow_on_each_sample': False, 'speed': 5.0}, 'gcode_macro purge': {'gcode': '\n{% if printer.extruder.temperature < 180 %}\n{action_respond_info("Extruder temperature too low")}\n{% else %}\nSAVE_GCODE_STATE NAME=PURGE_state\nG91\nG1 E45.0 F{ 5 * 60 }\nRESTORE_GCODE_STATE NAME=PURGE_state\n{% endif %}', 'description': 'Extrudes filament, used to clean out previous filament'}, 'extruder': {'control': 'pid', 'pullup_resistor': 4700.0, 'max_extrude_cross_section': 0.6400000000000001, 'pressure_advance_smooth_time': 0.04, 'max_extrude_only_distance': 1000.0, 'sensor_type': 'EPCOS 100K B57560G104F', 'min_temp': 0.0, 'enable_pin': '!PC3', 'pressure_advance': 0.0375, 'max_extrude_only_velocity': 79.82432411074329, 'pwm_cycle_time': 0.1, 'dir_pin': 'PB3', 'pid_kp': 23.077, 'instantaneous_corner_velocity': 1.0, 'full_steps_per_rotation': 200, 'heater_pin': 'PA1', 'smooth_time': 1.0, 'pid_kd': 84.806, 'pid_ki': 1.57, 'filament_diameter': 1.75, 'gear_ratio': [[1.0, 3.5]], 'sensor_pin': 'PC5', 'nozzle_diameter': 0.4, 'rotation_distance': 2.172, 'step_pin': 'PB4', 'inline_resistor': 0.0, 'max_power': 1.0, 'microsteps': 16, 'min_extrude_temp': 170.0, 'max_extrude_only_accel': 931.2837812920051, 'max_temp': 300.0}}, 'save_config_pending': False}}
2023-10-02 17:48:31,265 [printer.py:reinit()] - Klipper version: v0.11.0-279-g7bd32994
2023-10-02 17:48:31,266 [printer.py:reinit()] - # Extruders: 1
2023-10-02 17:48:31,266 [printer.py:reinit()] - # Temperature devices: 3
2023-10-02 17:48:31,266 [printer.py:reinit()] - # Fans: 2
2023-10-02 17:48:31,266 [printer.py:reinit()] - # Output pins: 0
2023-10-02 17:48:31,266 [printer.py:reinit()] - # Leds: 0
2023-10-02 17:48:31,281 [KlippyRest.py:_do_request()] - Sending request to http://127.0.0.1:7125/printer/gcode/help
2023-10-02 17:48:31,282 [KlippyWebsocket.py:object_subscription()] - Sending printer.objects.subscribe
2023-10-02 17:48:31,557 [KlippyRest.py:_do_request()] - Sending request to http://127.0.0.1:7125/printer/objects/query?bed_mesh&configfile&display_status&extruder&fan&gcode_move&heater_bed&idle_timeout&pause_resume&print_stats&toolhead&virtual_sdcard&webhooks&motion_report&firmware_retraction&exclude_object&manual_probe&extruder&heater_bed&temperature_sensor Board_MCU&temperature_sensor Raspberry_Pi&fan&heater_fan Hot_End_Fan&filament_switch_sensor RunoutSensor
2023-10-02 17:48:31,587 [KlippyRest.py:_do_request()] - Sending request to http://127.0.0.1:7125/server/temperature_store
2023-10-02 17:48:31,592 [printer.py:init_temp_store()] - Temp store: ['heater_bed', 'temperature_sensor Board_MCU', 'temperature_sensor Raspberry_Pi', 'extruder']
2023-10-02 17:48:31,605 [KlippyRest.py:_do_request()] - Sending request to http://127.0.0.1:7125/server/config
2023-10-02 17:48:31,605 [screen.py:init_tempstore()] - Temperature store size: 1200
2023-10-02 17:48:31,606 [files.py:initialize()] - Gcodes path: /home/pi/printer_data/gcodes
2023-10-02 17:48:31,606 [KlippyWebsocket.py:get_file_list()] - Sending server.files.list
2023-10-02 17:48:31,608 [screen.py:init_printer()] - Printer initialized
2023-10-02 17:48:31,608 [printer.py:change_state()] - Changing state from 'disconnected' to 'ready'
2023-10-02 17:48:31,609 [printer.py:change_state()] - Adding callback for state: ready
2023-10-02 17:48:31,613 [screen.py:show_panel()] - Reinitializing panel
2023-10-02 17:48:31,695 [main_menu.py:__init__()] - ### Making MainMenu
2023-10-02 17:48:31,702 [main_menu.py:add_device()] - Adding device: extruder
2023-10-02 17:48:31,707 [main_menu.py:add_device()] - Adding device: heater_bed
2023-10-02 17:48:31,712 [main_menu.py:add_device()] - Adding device: temperature_sensor Board_MCU
2023-10-02 17:48:31,717 [main_menu.py:add_device()] - Adding device: temperature_sensor Raspberry_Pi
2023-10-02 17:48:31,747 [screen.py:attach_panel()] - Current panel hierarchy: main_menu

McFuzz89 avatar Oct 03 '23 00:10 McFuzz89

not a bug UNLOAD_FILAMENT and LOAD_FILAMENT are used in the extrude panel and for that reason they are removed from the macros see https://github.com/KlipperScreen/KlipperScreen/issues/1104 for more info

alfrix avatar Oct 03 '23 01:10 alfrix

not a bug UNLOAD_FILAMENT and LOAD_FILAMENT are used in the extrude panel and for that reason they are removed from the macros see #1104 for more info

So to confirm - if I put my own load/unload Macros, the buttons in the Extruder panel will use those macro settings? What about other Macros that are not visible and dont have rename existing attribute?

McFuzz89 avatar Oct 03 '23 02:10 McFuzz89