Skip to content

Idle poweroff is not working on prusa MK4 with Firmware 5.1.2 (heatbreak X temp and target temp causes problems) #271

@netinetwalker

Description

@netinetwalker

On the prusa mk4 idle poweroff is not working correct because of the temp target for cooling fan of the heatbreak is not 0 and should not changed from the target 36.00

Current g-code log of prusa mk4:

T:25.00/0.00 B:23.96/0.00 X:23.95/36.00 A:30.73/0.00 @:0 B@:0 HBR@:0
T:25.00/0.00 B:23.93/0.00 X:23.94/36.00 A:30.75/0.00 @:0 B@:0 HBR@:0
T:25.00/0.00 B:23.96/0.00 X:23.94/36.00 A:30.81/0.00 @:0 B@:0 HBR@:0

octoprint.log

2024-01-21 03:51:55,823 - octoprint.plugins.psucontrol - INFO - Idle timeout reached after 30 minute(s). Turning heaters off prior to shutting off PSU.
2024-01-21 03:51:55,823 - octoprint.plugins.psucontrol - DEBUG - Heater tool0 already off.
2024-01-21 03:51:55,824 - octoprint.plugins.psucontrol - DEBUG - Heater bed already off.
2024-01-21 03:51:55,824 - octoprint.plugins.psucontrol - INFO - Turning off heater: X
2024-01-21 03:51:59,140 - octoprint.plugins.psucontrol - DEBUG - Polling PSU state...

dirty quick fix: (I filter X in the /octoprint/util/comm.py) LINE 6414:

def parse_temperature_line(line, current):
    """
    Parses the provided temperature line.

    The result will be a dictionary mapping from the extruder or bed key to
    a tuple with current and target temperature. The result will be canonicalized
    with :func:`canonicalize_temperatures` before returning.

    Arguments:
        line (str): the temperature line to parse
        current (int): the current active extruder

    Returns:
        tuple: a 2-tuple with the maximum tool number and a dict mapping from
          key to (actual, target) tuples, with key either matching ``Tn`` for ``n >= 0`` or ``B``
    """

    result = {}
    max_tool_num = 0
    for match in re.finditer(regex_temp, line):
        values = match.groupdict()
        sensor = values["sensor"]
        if sensor == "X":
            # skip X sensor
            continue
        if sensor in result:
            # sensor already seen, let's not overwrite stuff
            continue

What were you doing?

Idle poweroff settings activated but printer remains powered.

What did you expect to happen?

Printer turns off

What happened instead?

Printer remains powered

Version of OctoPrint-PSUControl

PSU Control (1.0.6)
PSU Control - Shelly (1.0.2)

Operating System running OctoPrint

OctoPrint 1.9.3 - Python 3.9.2OctoPi* 1.0.0cam (build 2023.10.09.154319) on raspbian bullseye

Printer model & used firmware incl. version

Prusa MK4
Prusa-Firmware-Buddy 5.1.2+13478 (Github)

Link to octoprint.log with octoprnt.plugins.psucontrol set to DEBUG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions