Malformed command error

Basic Information:

Printer Model: Voron 2.4 R2
MCU / Printerboard: Octopus
Host / SBC: Raspberry PI
klippy.log: Attached
klippy (8).zip (381.1 KB)

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:


I’ve been using this printer for over a year and it’s been doing fine printing PETG without the top and sidepanels.

I need to print some ASA projects so I installed the side panels, doors, top and a pair of bed fans. I added Andrew Ellis bedfans.cfg just to get the be fans working. Ultimately I’d like to control the bedfans with the Chamber thermistor.

Upon trying to print a small project in ASA I received the following error;

Malformed command ‘TEMPERATURE_WAIT SENSOR = temperature_sensor chamber MINIMUM=40’

Searching the printer.cfg, I found this line of code;

TEMPERATURE_WAIT SENSOR = temperature_sensor chamber MINIMUM={target_chamber}   # Waits for chamber to reach desired temp

I had thought that the slicer had chamber temps set to 0 for ASA so I put in appropriate values but still got the same error. A few line prior to this the target_chamber value does get set to 40.

I appreciate any help. I’d sure like to be able print ASA and nylon.

Nothing? No ideas?

Everyone helping here is a volunteer. Please be patient.

To answer your question, that line can be changed to:

TEMPERATURE_WAIT SENSOR=chamber MINIMUM={target_chamber}  

Thank you for your response. I apologize if I seemed impatient.

Would you mind explaining the difference between the two lines of code?

Sure. The main thing is I replaced temperature_sensor chamber with just chamber. I also removed some extra spaces around the =, which might be problematic also.

So “TEMPERATURE_SENSOR” defines chamber as a temperature sensor in a previous block of code and is irrelevant in this context?

Yes. temperature_sensor is unneeded.

Now I get; “Unknown sensor ‘chamber’”.

Sorry. Can you try:

TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={target_chamber}

Thank you! That seemed to be the trick. I’m not sure I understand the what quotes do in this context.

Glad it works! The quotes serve to tell Klipper that "temperature_sensor chamber" is one parameter. Usually (e.g. in bash), spaces are used as separators, so the quotes are there to stop separating it.

Also, since the issue is fixed now, could you please mark my post as solution?

They include the space, else the space would be a separator.