Any chance we can add the ability to send syslog messages?

Basic Information:

Printer Model: SV08
MCU / Printerboard: Sovol SV08 Board
Host / SBC
klippy.log

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:


Is is possible to add a command to send a syslog message. I.E. SendLog(“Sample”). I want to build a stand alone server that reacts to the syslog messages.

You can do this on the Linux level if you absolutely need it. Have a look at rsyslog and, in particular, its Text File Input Module.

I am well aware of rsyslog. No. What I am asking for is the ability to generate syslogs. I.E. I want to have a macro that sends syslogs. SendLog(“Print is complete”), SendLog(“Filament Runout”), SendLog(“Changing Filament”), or what ever other messages I want to send. Basically I read that the creator doesn’t want to allow Klipper to execute commands, this will give me a way to send specific conditions to a unix host that can preform actions based on events happening. Either sending a message or turning on light or something to get my attention.

Although there is no built-in way to send commands, you can add kiauh/resources/gcode_shell_command.py at master · dw-0/kiauh · GitHub. This is a well-proven extension but carries the risk of enabling users to perform unintended actions or potentially creating security concerns.

Then there are other ways to interact with such states, for example, via Moonraker. For an example, see the MQTT API.