Jump to content
Ultimaker Community of 3D Printing Experts



Recommended Posts

Posted · command_util.py

Is there any sort of documentation on this?  Besides the minimal information that lives in the forums.


I would rather not spend my time sifting through the source code to determine what I can and cannot do with the utility.  I am particularly interested in how to use the "exec" command.  Also, a different but similar issue, the swagger docs do not seem to be up to date.  For example printer/led is documented, but not printer/led/brightness.  


Thanks for any help here..


for some additional context:  I do now see if I first "select" a mode, and then do "exec self." and hit tab, I can see a list of exposed functions.


I am interested in the printer's self.startProcedure method.  It takes "key" and "parameters" as arguments.


Currently, through the API, there is no way to set the loaded material.  I can set it using the command_util.py however.  I am building a smart dry box for my filament.  Since my filament will not be loaded on the stock reel holder where the NFC antenna is, I wanted to hack my UM3 by programatically assigning the material that will be loaded.  I also want to programatically initiate the load, unload, and change material wizards (I am pretty sure this can be done with exec printer self.startProcedure('SOME_PROCEDURE"..... ) but I need help with what the proper 'key' and 'parameters' are.


I found a list of procedures defined in the um3.json file in griffin/machines/ folder.

  • Link to post
    Share on other sites

    Posted · command_util.py

    comand_util.py is a debug script, so mostly meant for our convenience. This also means that it has a horrible outward facing interface, which assumes that you know how the internal system actually works.


    That being said; The internal system uses a pretty complicated system of procedures. As things can and will go wrong, it can occasionally be convenient to trigger specific procedures (or parts there of). That's what the startProcedure does.


    All that being said; You're right on account of having to trigger those procedures to do what you want. If you want a full list of the procedures, you can find those on the machine, located at /usr/share/griffin/griffin/machines/um3.json


    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · command_util.py

    Thanks nallath.

    Would you, or one of your team members, be willing to share what the proper arguments are needed for a couple of the procedures?  I want to run "LOAD | CHANGE | SELECT_MATERIAL_WIZARD" for instance.  What does the 'parameters' look like to fire off these procedures?  If you cant share, I will keep poking around and figure it out.


    I would think it would be safe enough to expose any of the "wizard" procedures on the API.  If you can initiate something from the front panel, you should be able to initiate the same from  the API.  I would love to see this knitted into the API.  Happy to contribute too.

    Edited by tmcolby
  • Link to post
    Share on other sites

    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

    • Our picks

      • New here? Get ahead with a free onboarding course
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 14 replies
    • Create New...