|
@@ -5,6 +5,7 @@ position: 50
|
5
|
5
|
comments: true
|
6
|
6
|
github: https://git.xythobuz.de/thomas/OctoTray
|
7
|
7
|
date: 2021-05-08
|
|
8
|
+update: 2021-05-13
|
8
|
9
|
---
|
9
|
10
|
|
10
|
11
|
<span class="listdesc">[...back to 3D-Printing overview](3d-printing.html)</span>
|
|
@@ -13,18 +14,23 @@ To quickly print new stuff on one of my printers, I am using the [OctoPrint](htt
|
13
|
14
|
Unfortunately, it does not allow me to turn on the printers power supply using the Raspberry Pi.
|
14
|
15
|
But it is possible to do that via the [OctoPrint REST API](https://docs.octoprint.org/en/master/api/index.html).
|
15
|
16
|
Because of that, I wrote a small tool to trigger the power of my printers that lives in the system tray.
|
16
|
|
-It runs on Linux using the Python Qt5 bindings.
|
|
17
|
+It runs on Linux using the Python Qt5 bindings, but without much work it should be able to run on other platforms with PyQt5 as well.
|
17
|
18
|
|
18
|
19
|
<!--%
|
19
|
20
|
lightgallery([
|
20
|
|
- [ "img/octotray_1.png", "Screenshot of first OctoTray version" ]
|
|
21
|
+ [ "img/octotray_3.png", "Screenshot of OctoTray version 0.2" ],
|
|
22
|
+ [ "img/octotray_2.png", "Screenshot of webcam viewer in OctoTray version 0.2" ],
|
|
23
|
+ [ "img/octotray_4.png", "Screenshot of status dialog in OctoTray version 0.2" ],
|
|
24
|
+ [ "img/octotray_1.png", "Screenshot of OctoTray version 0.1" ]
|
21
|
25
|
])
|
22
|
26
|
%-->
|
23
|
27
|
|
24
|
|
-You need to enter the hostnames / IPs and the API keys of your printers at the beginning of the python file in the repo.
|
25
|
|
-The program will automatically detect if you are using the [PSU Control OctoPrint Plugin](https://plugins.octoprint.org/plugins/psucontrol/) it will use that to toggle the power.
|
|
28
|
+You need to enter the hostnames / IPs and the OctoPrint API keys of your printers at the beginning of the python file in the repo.
|
|
29
|
+The program will automatically detect which method to use to switch the power.
|
|
30
|
+If you are using the [PSU Control OctoPrint Plugin](https://plugins.octoprint.org/plugins/psucontrol/) it will use that to toggle the power.
|
26
|
31
|
Otherwise it looks for custom system commands, named "all on" and "all off", as described in the [OctoPrint docs](https://docs.octoprint.org/en/master/configuration/config_yaml.html#system).
|
27
|
|
-To give you an example, mine look like this.
|
|
32
|
+
|
|
33
|
+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.
|
28
|
34
|
|
29
|
35
|
system:
|
30
|
36
|
actions:
|