Jump to content
Ultimaker Community of 3D Printing Experts

Job Completion Notification

Recommended Posts

Posted (edited) · Job Completion Notification

I'm looking for guidance on writing some kind of script or plugin for Cura that would allow me to send email or SMS notification when a job is completed. My university is opening a makerspace using Cura for 3D printing, and we'd like to be able to notify students to come by and collect their jobs when they are done.

I started by looking into Cura's existing plugin architecture, which isn't particularly well documented. The examples I found looked like pre-processors for the generation of the Gcode file which is then sent to the actual printer. I wasn't able to find any kind of documentation on how to hook into some kind of job completion event to run custom logic. Plugin's don't look promising here, but maybe I am misunderstanding them.

It would also be fine of Cura triggered some kind of OS level messages that I could hook into to run a custom script. Perhaps there is a way I can configure it to run in verbose mode such that I can listen to the output and write scripts that react accordingly?

Lastly, when printing Cura displays a terminal window that has the information I am looking for. Is there a way I might fork that text to another location where I could more easily parse it with a script?

This seems like such an obvious feature, I am surprised it doesn't already exist. I can only surmise that most people who might want something like this would go all the way and install a program like OctoPrint; which isn't what we want to do.

Edited by Guest
  • Link to post
    Share on other sites
    Posted · Job Completion Notification

    Sorry about the lack of documentation. We've been meaning to update it (and write some guides on how to make plugins), but somehow it always ends up near the bottom of the list.

    First off, the next release of Cura will support notifications for Windows & Linux (mac proved a bit harder to implement, so it will not be in the next release). This means that plugins can trigger certain messages on certain conditions, but this of course only works if Cura is still running on the background.

    As for what you need; You probably need to create a "extension" type of plugin. If you have a look at the plugins in "Uranium" & "Cura", you can find a few examples for those. Extension plugins can be seen as the "not otherwise specified" plugin types (compared to file-readers / writers, view modes, scene tools & output devices).

    If you are working with UM3 printers it might even be easier to write a custom script that polls the API of the printers and checks for state changes.

    The output done by Cura can be caught. We currently have 2 plugins that handle the log messages; one of them logs it to file, the other to console. You could create a third plugin that writes it somewhere else (I would not recommend this, as the logging is not a stable API. There is a better way to get this info).

  • Link to post
    Share on other sites
    • 1 year later...

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Create New...