V1 Setting V2 Setting Description

Creates and enables a new TemperatureSwitch module instance. When set to true, this module monitors temperature from a specified TemperatureControl module and automatically controls a Switch module based on configured thresholds and trigger conditions.

Multiple temperature switch instances can be configured simultaneously by using different instance names — each instance requires a unique module name (e.g., hotend, bed, chamber).

The module will not function unless enabled, and must be accompanied by valid designator and switch configuration.

Specifies which TemperatureControl module to monitor by matching its designator character. The temperature switch reads the current temperature from the temperature control module with this designator and uses it to determine when to trigger the switch.

If multiple temperature control modules share the same designator, the highest temperature among them is used for comparison. Matching is case-sensitive — T and t are different designators.

  • For backward compatibility, temperatureswitch.hotend defaults to designator T if not specified (deprecated behavior)
  • An empty designator string causes the temperature switch to be considered invalid and non-functional

The temperature reading is polled at intervals defined by the heatup_poll and cooldown_poll settings.

Specifies the name of the Switch module to be controlled by this temperature switch. When temperature conditions are met, this switch is toggled on or off according to the configured trigger mode and inversion settings.

The switch must be configured and enabled in the switch module settings before it can be controlled — the specified switch must exist and be properly configured with output_pin and output_type. It typically controls one of the small MOSFETs on the Smoothieboard.

Switch state is only changed when armed (either always armed if arm_mcode=0, or manually armed via M-code).

Legacy parameter name for specifying the switch module to control. Functionally identical to the parameter, and only used as a fallback if that parameter is not defined.

This parameter has been replaced by , but is still supported for backward compatibility with older Smoothieware configurations. Not recommended for new configurations — use the switch parameter instead, for clarity.

Sets the temperature threshold in degrees Celsius at which the switch state changes. The exact behavior depends on the trigger mode:

  • level mode: switch turns on above this temperature and off below it
  • rising mode: switch triggers when crossing upward through this threshold
  • falling mode: switch triggers when crossing downward through this threshold

Temperature comparison uses current_temp >= threshold_temp for HIGH_TEMP state determination. Temperature is read from the highest value among all temperature controllers matching the configured designator.

For typical hotend cooling applications, set this 10-20°C below the hotend operating temperature. Inverted mode reverses the on/off logic but uses the same threshold comparison — the threshold applies regardless of whether the switch is inverted or not, since inversion only affects the final switch output state.

Defines the polling interval in seconds when the system is in the LOW_TEMP state (current temperature < threshold_temp) — i.e. while heating up. A shorter interval gives faster response when temperature rises toward the threshold, but increases system overhead.

The initial state uses the heatup_poll interval and performs its first check immediately. Once temperature crosses the threshold, polling automatically switches to the cooldown_poll interval. Polling occurs on the second tick event, so actual timing may vary by ±1 second.

  • Lower values (e.g., 5-10 seconds): quicker response, more processing time consumed
  • Higher values (e.g., 20-30 seconds): less overhead, may delay switch activation

Defines the polling interval in seconds when the system is in the HIGH_TEMP state (current temperature >= threshold_temp) — at or above operating temperature, or cooling down. A longer interval reduces system overhead during stable high-temperature operation, while still monitoring for temperature drops that should trigger switch state changes.

Slower polling during stable operation reduces system load, and is suitable for applications where the switch should remain on for extended periods. Once temperature falls below the threshold, polling automatically switches to the heatup_poll interval.

Polling occurs on the second tick event, so actual timing may vary by ±1 second. Higher values reduce processing overhead when temperature is stable above threshold.

Determines the triggering behavior mode of the temperature switch — whether it responds to sustained temperature levels, rising temperature edges, or falling temperature edges. The mode fundamentally changes how temperature threshold crossings are interpreted, and affects the arming behavior.

  • Level mode: switch follows temperature state continuously. When armed and temperature >= threshold, switch is on; when temperature < threshold, switch is off. Remains active as long as armed.
  • Rising mode: switch activates only when transitioning from LOW_TEMP to HIGH_TEMP (edge detection). Requires arming via M-code for each activation cycle.
  • Falling mode: switch deactivates only when transitioning from HIGH_TEMP to LOW_TEMP (edge detection). Requires arming via M-code for each activation cycle.

Edge-triggered modes (rising/falling) automatically disarm after triggering, requiring re-arming for subsequent triggers. Invalid trigger values default to "level" mode.

State changes only occur when temperature crosses the threshold boundary, not during stable states. Works in conjunction with the inverted setting — inversion is applied after trigger logic determines switch state.

Reverses the normal switch control logic. When enabled, the switch turns off when temperature exceeds the threshold (instead of turning on), and turns on when temperature falls below the threshold. This is useful for heaters or devices that should activate during cooling rather than heating.

  • Normal mode (false): temperature >= threshold → switch on; temperature < threshold → switch off
  • Inverted mode (true): temperature >= threshold → switch off; temperature < threshold → switch on

The inversion occurs at the final switch control stage, applied in the set_switch() function after trigger logic has determined the desired state — it works with all trigger modes (level, rising, falling). Temperature threshold comparison logic is unchanged; only the final switch output is inverted.

Useful for controlling heating elements that should turn off when target temperature is reached. Common use case: emergency cooling systems that activate when temperature drops too low.

Defines a custom M-code command that must be executed to arm the temperature switch before it can trigger. This provides manual control over when the temperature switch is active, preventing unwanted switch activation. It also acts as a safety mechanism for critical temperature-dependent operations — disarmed switches do not control their associated switch modules.

  • When set to 0: the arming requirement is disabled; the switch is always armed and operates automatically based on temperature (module does not register for G-code events)
  • When set to an M-code: the switch starts disarmed and requires manual arming via G-code command
  • Arming command: M<code> S1 arms the switch (e.g., M1100 S1)
  • Disarming command: M<code> S0 disarms the switch (e.g., M1100 S0)
  • Level trigger mode: the switch remains armed and continues operating while armed
  • Edge trigger modes (rising/falling): the switch automatically disarms after triggering once, requiring re-arming for subsequent triggers
This is a wiki! If you'd like to improve this page, you can edit it on GitHub.