aboutsummaryrefslogtreecommitdiffstats
path: root/docs/Command_Templates.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/Command_Templates.md')
-rw-r--r--docs/Command_Templates.md74
1 files changed, 74 insertions, 0 deletions
diff --git a/docs/Command_Templates.md b/docs/Command_Templates.md
index 8ceb2590..0160796f 100644
--- a/docs/Command_Templates.md
+++ b/docs/Command_Templates.md
@@ -126,6 +126,8 @@ access it via the `[ ]` accessor - for example:
The following are common printer attributes:
- `printer.fan.speed`: The fan speed as a float between 0.0 and 1.0.
+ This is also available on "heater_fan" and "fan_generic" config
+ sections (eg, `printer["fan_generic my_fan"].speed`).
- `printer.gcode_move.gcode_position`: The current position of the
toolhead relative to the current G-Code origin. That is, positions
that one might directly send to a `G1` command. It is possible to
@@ -182,6 +184,12 @@ The following are common printer attributes:
- `printer.toolhead.homed_axes`: The current cartesian axes considered
to be in a "homed" state. This is a string containing one or more of
"x", "y", "z".
+- `printer.toolhead.max_velocity`, `printer.toolhead.max_accel`,
+ `printer.toolhead.max_accel_to_decel`,
+ `printer.toolhead.square_corner_velocity`: The current printing
+ limits that are in effect. This may differ from the config file
+ settings if a `SET_VELOCITY_LIMIT` (or `M204`) command alters them
+ at run-time.
- `printer.heaters.available_heaters`: Returns a list of all currently
available heaters by their full config section names,
e.g. `["extruder", "heater_bed", "heater_generic my_custom_heater"]`.
@@ -204,6 +212,72 @@ The following are common printer attributes:
not be reflected here.) All values are returned as strings (if math
is to be performed on the value then it must be converted to a
Python number).
+- `printer["gcode_macro <macro_name>"].<variable>`: The current value
+ of a [gcode_macro variable](#variables).
+- `printer.webhooks.state`: Returns a string indicating the current
+ Klipper state. Possible values are: "ready", "startup", "shutdown",
+ "error".
+- `printer.webhooks.state_message`: A human readable string giving
+ additional context on the current Klipper state.
+- `printer.display_status.progress`: The progress value of the last
+ `M73` G-Code command (or `printer.virtual_sdcard.progress` if no
+ recent `M73` received).
+- `printer.display_status.message`: The message contained in the last
+ `M117` G-Code command.
+- `printer["filament_switch_sensor <config_name>"].enabled`: Returns
+ True if the switch sensor is currently enabled.
+- `printer["filament_switch_sensor <config_name>"].filament_detected`:
+ Returns True if the sensor is in a triggered state.
+- `printer.virtual_sdcard.is_active`: Returns True if a print from
+ file is currently active.
+- `printer.virtual_sdcard.progress`: An estimate of the current print
+ progress (based of file size and file position).
+- `printer.virtual_sdcard.file_position`: The current position (in
+ bytes) of an active print.
+- `printer.print_stats.filename`,
+ `printer.print_stats.total_duration`,
+ `printer.print_stats.print_duration`,
+ `printer.print_stats.filament_used`, `printer.print_stats.state`,
+ `printer.print_stats.message`: Estimated information about the
+ current print when a virtual_sdcard print is active.
+- `printer.firmware_retraction.retract_length`,
+ `printer.firmware_retraction.retract_speed`,
+ `printer.firmware_retraction.unretract_extra_length`,
+ `printer.firmware_retraction.unretract_speed`: The current settings
+ for the firmware_retraction module. These settings may differ from
+ the config file if a `SET_RETRACTION` command alters them.
+- `printer["bme280 <sensor_name>"].temperature`,
+ `printer["bme280 <sensor_name>"].humidity`,
+ `printer["bme280 <sensor_name>"].pressure`: The last read values
+ from the sensor.
+- `printer["htu21d <sensor_name>"].temperature`,
+ `printer["htu21d <sensor_name>"].humidity`: The last read values
+ from the sensor.
+- `printer["lm75 <sensor_name>"].temperature`: The last read
+ temperature from the sensor.
+- `printer["temperature_sensor <config_name>"].temperature`: The last read
+ temperature from the sensor.
+- `printer["temperature_sensor <config_name>"].measured_min_temp`,
+ `printer["temperature_sensor <config_name>"].measured_max_temp`: The
+ lowest and highest temperature seen by the sensor since the Klipper
+ host software was last restarted.
+- `printer["temperature_fan <config_name>"].temperature`: The last read
+ temperature from the sensor.
+- `printer["temperature_fan <config_name>"].target`: The target
+ temperature for the fan.
+- `printer["output_pin <config_name>"].value`: The "value" of the pin,
+ as set by a `SET_PIN` command.
+- `printer["servo <config_name>"].value`: The last setting of the PWM
+ pin (a value between 0.0 and 1.0) associated with the servo.
+- `printer.bed_mesh.profile_name`, `printer.bed_mesh.mesh_min`,
+ `printer.bed_mesh.mesh_max`, `printer.bed_mesh.probed_matrix`,
+ `printer.bed_mesh.mesh_matrix`: Information on the currently active
+ bed_mesh.
+- `printer.hall_filament_width_sensor.is_active`: Returns True if the
+ sensor is currently active.
+- `printer.hall_filament_width_sensor.Diameter`,
+ `printer.hall_filament_width_sensor.Raw`: The last read values from
+ the sensor.
The above list is subject to change - if using an attribute be sure to
review the [Config Changes document](Config_Changes.md) when upgrading