Add to the "system:" section of config.yaml There are two types of event handlers at the moment: system: invokes an external command without waiting for the result gcode: sends some gcode to the printer. Separate multiple commands with a comma Example: system: events: - event: Connected type: gcode command: M115,M17 printer connected!,G28 - event: Disconnected type: system command: python ~/growl.py -t mygrowlserver -d "Lost connection to printer" -a OctoPrint -i http://rasppi:8080/Octoprint_logo.png - event: PrintStarted type: system command: python ~/growl.py -t mygrowlserver -d "Starting _FILE_" -a OctoPrint -i http://rasppi:8080/Octoprint_logo.png - event: PrintDone type: system command: python ~/growl.py -t mygrowlserver -d "Completed _FILE_" -a OctoPrint -i http://rasppi:8080/Octoprint_logo.png command values support the following dynamic tokens: _DATA_ - the data associated with the event (not all events have data, when they do, it's often a filename) _FILE_ - filename of the current print (not always the same as _DATA_ filename) _LINE_ - the current GCode line _PROGRESS_ - the percent complete _ZHEIGHT_ - the current Z position of the head _NOW_ - the date and time of the event Available Events: Startup -- the server has started Connected -- the server has connected to the printer (data is port and baudrate) Disconnected -- the server has disconnected from the printer ClientOpen -- a client has connected to the web server ClientClosed -- a client has disconnected from the web server PowerOn -- the GCode has turned on the printer power via M80 PowerOff -- the GCode has turned on the printer power via M81 Upload -- a gcode file upload has been uploaded (data is filename) LoadStart -- a gcode file load has started (data is filename) LoadDone -- a gcode file load has finished (data is filename) PrintStarted -- a print has started (data is filename) PrintFailed -- a print failed (data is filename) PrintDone -- a print completed successfully (data is filename) Cancelled -- the print has been cancelled via the cancel button (data is filename) Home -- the head has gone home via G28 ZChange -- the printer's Z-Height has changed (new layer) Paused -- the print has been paused Waiting -- the print is paused due to a gcode wait command Cooling -- the GCode has enabled the platform cooler via M245 Alert -- the GCode has issued a user alert (beep) via M300 Conveyor -- the GCode has enabled the conveyor belt via M240 Eject -- the GCode has enabled the part ejector via M40 CaptureStart -- a timelapse image is starting to be captured (data is image filename) CaptureDone -- a timelapse image has completed being captured (data is image filename) MovieDone -- the timelapse movie is completed (data is movie filename) EStop -- the GCode has issued a panic stop via M112 Error -- an error has occurred (data is error string)