OctoTrayProject started on May 08, 2021.
Last updated on May 13, 2021.
To quickly print new stuff on one of my printers, I am using the OctoPrint integration of PrusaSlicer. Unfortunately, it does not allow me to turn on the printers power supply using the Raspberry Pi. But it is possible to do that via the OctoPrint REST API. Because of that, I wrote a small tool to trigger the power of my printers that lives in the system tray. It runs on Linux using the Python Qt5 bindings, but it has been tested on Windows and should run on macOS as well.
To get started quickly, if you are running Windows or macOS, simply download the most recent pre-built binary from GitHub. For Linux, just run or install the program from the source repo directly.
Latest release of OctoTray, at the time of this writing: Version 0.3 (2021-05-17 21:19:07)
You need to enter the hostnames / IPs and the OctoPrint API keys of your printers in the settings dialog of the application. The program will automatically detect which method to use to switch the power. If you are using the PSU Control OctoPrint Plugin it will use that to toggle the power. Also it looks for custom system commands, as described in the OctoPrint docs.
To give you an example of the system actions you could use to switch GPIOs from OctoPrint, take a look below at the excerpt of my 'config.yaml' file.
system: actions: - action: printer on command: gpio -g mode 26 out && gpio -g write 26 0 name: Turn on printer - action: printer off command: gpio -g write 26 1 && gpio -g mode 26 in confirm: You are about to turn off the printer. name: Turn off printer
I also wrote a bit more about my OctoPrint setups on this page.
Here are some older screenshots of OctoTray.