Automatically shut down a printer after a while if idle

by filamentesque Aug 11, 2017
Download All Files

Thing Apps Enabled

Please Login to Comment

I'm having trouble running octocmd print example.gcode.

I get the following error:

RuntimeError: example.gcode -> example.print failed (stale)

I can see the file being uploaded to octoprint; however, the print doesn't start. Any help would be much appreciated.


The error output is below:

File "octocmd", line 504, in
File "octocmd", line 497, in process
File "octocmd", line 489, in process_target
pipe.transform(infn, targetfn)
File "octocmd", line 109, in transform
self.run_pipeline(pipeline, **kw)
File "octocmd", line 102, in run_pipeline
raise RuntimeError, msg
RuntimeError: example.gcode -> example.print failed (stale)

Comments deleted.

What about the power? The max amperage of https://www.thingiverse.com/Jeffeb3 project https://www.thingiverse.com/thing:1428478 is 10A. But our printer needs more then 15A. So I think this method is not secure.

Relay Control OctoPrint Wanhao i3
by Jeffeb3


That part of the tutorial is related to the relay automation, not the actual electrical details or something. You may have to ask Jeffeb3 for help. All I can tell you is that I'm using that setup for almost two years now without running into any kind of problem. :)


I get this error when trying to run octocmd init:

$ octocmd init
File "/usr/local/bin/octocmd", line 102
raise RuntimeError, msg
SyntaxError: invalid syntax

Any idea or help? THanks!


Before you can start using octocmd, you have to configure it first. It reads a config file called .octoprint.conf from your home directory. You can either create it by hand or you can have octocmd do it for you by running the init sub-command:

$ octocmd init
OctoPrint URL: http://octoprint/
OctoPrint API Key: MY_API_KEY
This configuration works, keep it? [Y/n]: y
Saving config file to '/home/linda/.octocmd.conf'

Above is the configuration step from the octocmd webpage. Did you go through these steps to create the configuration file, or just install and setup your scripts?

I had to go through these steps too to get Octocmd to work, yeah. ;-)

How did you manage to make Octocmd work?
I installed it correctly. I registered the octocmd init with http://local.octopi (which is my default adress), and with the right API key, but I keep getting the message "this configuration doesn't work, keep it anyway?"

[EDIT] Ok, works when the printer is connected!! ;-)

Managed to get octocmd installed, but now am having trouble configuring it. How did you configure it? I tried following the configuration steps listed here: http://octocmd.readthedocs.io/en/latest/#configuration, but can't seem to get it to do what its supposed to do.

What do you mean by "can't seem to get it to do what its supposed to do"? I just used the given steps to get it to work. Note that your printer have to be powered on and with a connection established with OPrint. :-)

Do when a print is done, it waits 120 seconds and if the printer is still operational (idle), it with turn off the relay. Nice.