Skip to content

Commit ddb6625

Browse files
committed
Autocommit from 2023-08-28 10:50:33
Klipper on commit: 5f990f9 Moonraker on commit: fe12095 Mainsail version: v2.7.1
1 parent 08d06a5 commit ddb6625

File tree

2 files changed

+338
-13
lines changed

2 files changed

+338
-13
lines changed

.moonraker.conf.bkp

+100-13
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[server]
22
host = 0.0.0.0
33
port = 7125
4+
ssl_port = 7130
45
klippy_uds_address = /home/pi/printer_data/comms/klippy.sock
6+
max_upload_size = 1024000
57

68
[authorization]
79
trusted_clients =
@@ -10,34 +12,119 @@ trusted_clients =
1012
169.254.0.0/16
1113
172.16.0.0/12
1214
192.168.0.0/16
15+
100.75.228.29
16+
100.87.93.65
17+
100.126.37.42
18+
100.82.60.125
19+
100.71.251.84
20+
100.79.240.92
21+
100.85.205.130
1322
FE80::/10
1423
::1/128
1524
cors_domains =
16-
*.lan
17-
*.local
18-
*://localhost
19-
*://localhost:*
20-
*://my.mainsail.xyz
21-
*://app.fluidd.xyz
25+
http://*.lan
26+
http://*.local
27+
https://my.mainsail.xyz
28+
http://my.mainsail.xyz
29+
https://app.fluidd.xyz
30+
http://app.fluidd.xyz
31+
*.local:7135
32+
*:7136
33+
*.local:7136
34+
force_logins = false
35+
36+
[database]
37+
38+
[file_manager]
39+
enable_object_processing = True
2240

2341
[octoprint_compat]
2442

2543
[history]
2644

45+
[timelapse]
46+
output_path = ~/printer_data/timelapse/
47+
frame_path = /tmp/timelapse/printer
48+
49+
[power Dryer]
50+
type = tplink_smartplug
51+
address = 192.168.1.177
52+
output_id = 0
53+
restart_klipper_when_powered = True
54+
restart_delay = 3
55+
56+
[power Ender-5]
57+
type = tplink_smartplug
58+
address = 192.168.1.177
59+
output_id = 1
60+
restart_klipper_when_powered = True
61+
restart_delay = 3
62+
63+
[power Octopi]
64+
type = tplink_smartplug
65+
address = 192.168.1.177
66+
output_id = 2
67+
restart_klipper_when_powered = True
68+
restart_delay = 3
69+
2770
[update_manager]
2871
channel = dev
2972
refresh_interval = 168
3073

31-
[update_manager mainsail-config]
32-
type = git_repo
33-
primary_branch = master
34-
path = ~/mainsail-config
35-
origin = https://github.com/mainsail-crew/mainsail-config.git
36-
managed_services = klipper
37-
3874
[update_manager mainsail]
3975
type = web
4076
channel = stable
4177
repo = mainsail-crew/mainsail
4278
path = ~/mainsail
4379

80+
[update_manager KlipperScreen]
81+
type = git_repo
82+
path = /home/pi/KlipperScreen
83+
origin = https://github.com/jordanruthe/KlipperScreen.git
84+
env = /home/pi/.KlipperScreen-env/bin/python
85+
requirements = scripts/KlipperScreen-requirements.txt
86+
install_script = scripts/KlipperScreen-install.sh
87+
88+
[update_manager timelapse]
89+
type = git_repo
90+
primary_branch = main
91+
path = ~/moonraker-timelapse
92+
origin = https://github.com/mainsail-crew/moonraker-timelapse.git
93+
managed_services = klipper moonraker
94+
95+
[update_manager led_effect]
96+
type = git_repo
97+
path = ~/klipper-led_effect
98+
origin = https://github.com/julianschill/klipper-led_effect.git
99+
is_system_service = False
100+
101+
[update_manager fluidd]
102+
type = web
103+
channel = stable
104+
repo = fluidd-core/fluidd
105+
path = ~/fluidd
106+
107+
[update_manager mobileraker]
108+
type = git_repo
109+
path = ~/mobileraker_companion
110+
origin = https://github.com/Clon1998/mobileraker_companion.git
111+
primary_branch = main
112+
managed_services = mobileraker
113+
env = ~/mobileraker-env/bin/python
114+
requirements = scripts/mobileraker-requirements.txt
115+
install_script = scripts/install-mobileraker-companion.sh
116+
117+
[update_manager ercf-happy_hare]
118+
type = git_repo
119+
path = ~/ERCF-Software-V3
120+
origin = https://github.com/moggieuk/ERCF-Software-V3.git
121+
install_script = install.sh
122+
managed_services = klipper
123+
124+
[update_manager fluidd-config]
125+
type = git_repo
126+
primary_branch = master
127+
path = ~/fluidd-config
128+
origin = https://github.com/fluidd-core/fluidd-config.git
129+
managed_services = klipper
130+

fluidd-orig.cfg

+238
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
## Client klipper macro definitions
2+
##
3+
## Copyright (C) 2022 Alex Zellner <[email protected]>
4+
##
5+
## This file may be distributed under the terms of the GNU GPLv3 license
6+
##
7+
## !!! This file is read-only. Maybe the used editor indicates that. !!!
8+
##
9+
## Customization:
10+
## 1) copy the gcode_macro _CLIENT_VARIABLE (see below) to your printer.cfg
11+
## 2) remove the comment mark (#) from all lines
12+
## 3) change any value in there to your needs
13+
##
14+
## Use the PAUSE macro direct in your M600:
15+
## e.g. with a different park position front left and a minimal height of 50
16+
## [gcode_macro M600]
17+
## description: Filament change
18+
## gcode: PAUSE X=10 Y=10 Z_MIN=50
19+
## Z_MIN will park the toolhead at a minimum of 50 mm above to bed to make it easier for you to swap filament.
20+
##
21+
## Client variable macro for your printer.cfg
22+
#[gcode_macro _CLIENT_VARIABLE]
23+
#variable_use_custom_pos : False ; use custom park coordinates for x,y [True/False]
24+
#variable_custom_park_x : 0.0 ; custom x position; value must be within your defined min and max of X
25+
#variable_custom_park_y : 0.0 ; custom y position; value must be within your defined min and max of Y
26+
#variable_custom_park_dz : 2.0 ; custom dz value; the value in mm to lift the nozzle when move to park position
27+
#variable_retract : 1.0 ; the value to retract while PAUSE
28+
#variable_cancel_retract : 5.0 ; the value to retract while CANCEL_PRINT
29+
#variable_speed_retract : 35.0 ; retract speed in mm/s
30+
#variable_unretract : 1.0 ; the value to unretract while RESUME
31+
#variable_speed_unretract : 35.0 ; unretract speed in mm/s
32+
#variable_speed_hop : 15.0 ; z move speed in mm/s
33+
#variable_speed_move : 100.0 ; move speed in mm/s
34+
#variable_park_at_cancel : False ; allow to move the toolhead to park while execute CANCEL_PRINT [True/False]
35+
#variable_park_at_cancel_x : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
36+
#variable_park_at_cancel_y : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
37+
## !!! Caution [firmware_retraction] must be defined in the printer.cfg if you set use_fw_retract: True !!!
38+
#variable_use_fw_retract : False ; use fw_retraction instead of the manual version [True/False]
39+
#variable_idle_timeout : 0 ; time in sec until idle_timeout kicks in. Value 0 means that no value will be set or restored
40+
#gcode:
41+
42+
[virtual_sdcard]
43+
path: ~/printer_data/gcodes
44+
on_error_gcode: CANCEL_PRINT
45+
46+
[pause_resume]
47+
48+
[display_status]
49+
50+
[respond]
51+
52+
[gcode_macro CANCEL_PRINT]
53+
description: Cancel the actual running print
54+
rename_existing: CANCEL_PRINT_BASE
55+
gcode:
56+
##### get user parameters or use default #####
57+
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
58+
{% set allow_park = client.park_at_cancel | default(false) | lower == 'true' %}
59+
{% set retract = client.cancel_retract | default(5.0) | abs %}
60+
##### define park position #####
61+
{% set park_x = "" if (client.park_at_cancel_x | default(none) is none)
62+
else "X=" ~ client.park_at_cancel_x %}
63+
{% set park_y = "" if (client.park_at_cancel_y | default(none) is none)
64+
else "Y=" ~ client.park_at_cancel_y %}
65+
{% set custom_park = park_x | length > 0 or park_y | length > 0 %}
66+
##### end of definitions #####
67+
# restore idle_timeout time if needed
68+
{% if printer['gcode_macro PAUSE'].restore_idle_timeout > 0 %}
69+
SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro PAUSE'].restore_idle_timeout}
70+
{% endif %}
71+
{% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
72+
_CLIENT_RETRACT LENGTH={retract}
73+
TURN_OFF_HEATERS
74+
M106 S0
75+
# clear pause_next_layer and pause_at_layer as preparation for next print
76+
SET_PAUSE_NEXT_LAYER ENABLE=0
77+
SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
78+
CANCEL_PRINT_BASE
79+
80+
[gcode_macro PAUSE]
81+
description: Pause the actual running print
82+
rename_existing: PAUSE_BASE
83+
variable_restore_idle_timeout: 0
84+
gcode:
85+
##### get user parameters or use default #####
86+
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
87+
{% set idle_timeout = client.idle_timeout | default(0) %}
88+
{% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
89+
{% set restore = printer.toolhead.extruder != '' and params.RESTORE | default(1) | int == 1 %}
90+
##### end of definitions #####
91+
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
92+
# set a new idle_timeout value
93+
{% if idle_timeout > 0 %}
94+
SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
95+
SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
96+
{% endif %}
97+
PAUSE_BASE
98+
_TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
99+
100+
[gcode_macro RESUME]
101+
description: Resume the actual running print
102+
rename_existing: RESUME_BASE
103+
variable_last_extruder_temp: {'restore': False, 'temp': 0}
104+
gcode:
105+
##### get user parameters or use default #####
106+
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
107+
{% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
108+
{% set sp_move = client.speed_move | default(velocity) %}
109+
##### end of definitions #####
110+
# restore idle_timeout time if needed
111+
{% if printer['gcode_macro PAUSE'].restore_idle_timeout > 0 %}
112+
SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro PAUSE'].restore_idle_timeout}
113+
{% endif %}
114+
{% if printer.idle_timeout.state | upper == "IDLE" and last_extruder_temp.restore %}
115+
M109 S{last_extruder_temp.temp}
116+
{% endif %}
117+
_CLIENT_EXTRUDE
118+
RESUME_BASE VELOCITY={params.VELOCITY | default(sp_move)}
119+
120+
# Usage: SET_PAUSE_NEXT_LAYER [ENABLE=[0 | 1]] [MACRO=<name>]
121+
[gcode_macro SET_PAUSE_NEXT_LAYER]
122+
description: Enable a pause if the next layer is reached
123+
gcode:
124+
{% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
125+
{% set ENABLE = params.ENABLE | default(1) | int != 0 %}
126+
{% set MACRO = params.MACRO | default(pause_next_layer.call, True) %}
127+
SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
128+
129+
# Usage: SET_PAUSE_AT_LAYER [ENABLE=[0 | 1]] [LAYER=<number>] [MACRO=<name>]
130+
[gcode_macro SET_PAUSE_AT_LAYER]
131+
description: Enable/disable a pause if a given layer number is reached
132+
gcode:
133+
{% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
134+
{% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined
135+
else params.LAYER is defined %}
136+
{% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %}
137+
{% set MACRO = params.MACRO | default(pause_at_layer.call, True) %}
138+
SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
139+
140+
# Usage: SET_PRINT_STATS_INFO [TOTAL_LAYER=<total_layer_count>] [CURRENT_LAYER= <current_layer>]
141+
[gcode_macro SET_PRINT_STATS_INFO]
142+
rename_existing: SET_PRINT_STATS_INFO_BASE
143+
description: Overwrite, to get pause_next_layer and pause_at_layer feature
144+
variable_pause_next_layer: { 'enable': False, 'call': "PAUSE" }
145+
variable_pause_at_layer : { 'enable': False, 'layer': 0, 'call': "PAUSE" }
146+
gcode:
147+
{% if pause_next_layer.enable %}
148+
RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
149+
{pause_next_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE
150+
SET_PAUSE_NEXT_LAYER ENABLE=0
151+
{% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER | int == pause_at_layer.layer %}
152+
RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
153+
{pause_at_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE
154+
SET_PAUSE_AT_LAYER ENABLE=0
155+
{% endif %}
156+
SET_PRINT_STATS_INFO_BASE {rawparams}
157+
158+
##### internal use #####
159+
[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
160+
description: Helper: park toolhead used in PAUSE and CANCEL_PRINT
161+
gcode:
162+
##### get user parameters or use default #####
163+
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
164+
{% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
165+
{% set use_custom = client.use_custom_pos | default(false) | lower == 'true' %}
166+
{% set custom_park_x = client.custom_park_x | default(0.0) %}
167+
{% set custom_park_y = client.custom_park_y | default(0.0) %}
168+
{% set park_dz = client.custom_park_dz | default(2.0) | abs %}
169+
{% set sp_hop = client.speed_hop | default(15) * 60 %}
170+
{% set sp_move = client.speed_move | default(velocity) * 60 %}
171+
##### get config and toolhead values #####
172+
{% set origin = printer.gcode_move.homing_origin %}
173+
{% set act = printer.gcode_move.gcode_position %}
174+
{% set max = printer.toolhead.axis_maximum %}
175+
{% set cone = printer.toolhead.cone_start_z | default(max.z) %} ; height as long the toolhead can reach max and min of an delta
176+
{% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
177+
else False %}
178+
##### define park position #####
179+
{% set z_min = params.Z_MIN | default(0) | float %}
180+
{% set z_park = [[(act.z + park_dz), z_min] | max, (max.z - origin.z)] | min %}
181+
{% set x_park = params.X if params.X is defined
182+
else custom_park_x if use_custom
183+
else 0.0 if round_bed
184+
else (max.x - 5.0) %}
185+
{% set y_park = params.Y if params.Y is defined
186+
else custom_park_y if use_custom
187+
else (max.y - 5.0) if round_bed and z_park < cone
188+
else 0.0 if round_bed
189+
else (max.y - 5.0) %}
190+
##### end of definitions #####
191+
_CLIENT_RETRACT
192+
{% if "xyz" in printer.toolhead.homed_axes %}
193+
G90
194+
G1 Z{z_park} F{sp_hop}
195+
G1 X{x_park} Y{y_park} F{sp_move}
196+
{% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
197+
{% else %}
198+
RESPOND TYPE=echo MSG='Printer not homed'
199+
{% endif %}
200+
201+
[gcode_macro _CLIENT_EXTRUDE]
202+
description: Extrudes, if the extruder is hot enough
203+
gcode:
204+
##### get user parameters or use default #####
205+
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
206+
{% set use_fw_retract = (client.use_fw_retract | default(false) | lower == 'true') and (printer.firmware_retraction is defined) %}
207+
{% set length = params.LENGTH | default(client.unretract) | default(1.0) | float %}
208+
{% set speed = params.SPEED | default(client.speed_unretract) | default(35) %}
209+
{% set absolute_extrude = printer.gcode_move.absolute_extrude %}
210+
##### end of definitions #####
211+
{% if printer.toolhead.extruder != '' %}
212+
{% if printer[printer.toolhead.extruder].can_extrude %}
213+
{% if use_fw_retract %}
214+
{% if length < 0 %}
215+
G10
216+
{% else %}
217+
G11
218+
{% endif %}
219+
{% else %}
220+
M83
221+
G1 E{length} F{(speed | float | abs) * 60}
222+
{% if absolute_extrude %}
223+
M82
224+
{% endif %}
225+
{% endif %}
226+
{% else %}
227+
RESPOND TYPE=echo MSG='Extruder not hot enough'
228+
{% endif %}
229+
{% endif %}
230+
231+
[gcode_macro _CLIENT_RETRACT]
232+
description: Retracts, if the extruder is hot enough
233+
gcode:
234+
{% set client = printer['gcode_macro _CLIENT_VARIABLE'] | default({}) %}
235+
{% set length = params.LENGTH | default(client.retract) | default(1.0) | float %}
236+
{% set speed = params.SPEED | default(client.speed_retract) | default(35) %}
237+
238+
_CLIENT_EXTRUDE LENGTH=-{length | float | abs} SPEED={speed | float | abs}

0 commit comments

Comments
 (0)