|
|
|
|
5
|
comments: true
|
5
|
comments: true
|
6
|
github: https://git.xythobuz.de/thomas/OctoTray
|
6
|
github: https://git.xythobuz.de/thomas/OctoTray
|
7
|
date: 2021-05-08
|
7
|
date: 2021-05-08
|
|
|
8
|
+update: 2021-05-13
|
8
|
---
|
9
|
---
|
9
|
|
10
|
|
10
|
<span class="listdesc">[...back to 3D-Printing overview](3d-printing.html)</span>
|
11
|
<span class="listdesc">[...back to 3D-Printing overview](3d-printing.html)</span>
|
|
|
|
|
13
|
Unfortunately, it does not allow me to turn on the printers power supply using the Raspberry Pi.
|
14
|
Unfortunately, it does not allow me to turn on the printers power supply using the Raspberry Pi.
|
14
|
But it is possible to do that via the [OctoPrint REST API](https://docs.octoprint.org/en/master/api/index.html).
|
15
|
But it is possible to do that via the [OctoPrint REST API](https://docs.octoprint.org/en/master/api/index.html).
|
15
|
Because of that, I wrote a small tool to trigger the power of my printers that lives in the system tray.
|
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
|
lightgallery([
|
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
|
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).
|
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
|
system:
|
35
|
system:
|
30
|
actions:
|
36
|
actions:
|