Dear community,
I am running Klipper on my customized 3D printer and I need to implement an icon in KlipperScreen that, when clicked, can execute a Python script.
The Python script communicates with Moonraker to control the 3D printer and perform certain actions. However, I am facing an issue where KlipperScreen does not directly work with Python. Here’s what I have tried so far:
-
Created an icon in KlipperScreen with the following configuration:
[menu __main check_status] name: Check Ruso icon: status method: printer.gcode.script params: {"script":"SEND_MESSAGE Hello"}
-
Created a macro in
printer.cfg
:[gcode_macro SEND_MESSAGE] gcode: SYSTEM /home/diego/testing_code.py "{rawparams}"
However, I receive the following error:
[screen.py:show_popup_message()] - error: Malformed command 'SEND_MESSAGE Hello, Klipper!'
Does anyone have any suggestions on how to properly configure this? Any help would be greatly appreciated.
Thank you in advance!