|
@@ -25,30 +25,15 @@ lightgallery([
|
25
|
25
|
])
|
26
|
26
|
%-->
|
27
|
27
|
|
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.
|
|
28
|
+You need to enter the hostnames / IPs and the OctoPrint API keys of your printers in the settings dialog of the application.
|
29
|
29
|
The program will automatically detect which method to use to switch the power.
|
30
|
30
|
If you are using the [PSU Control OctoPrint Plugin](https://plugins.octoprint.org/plugins/psucontrol/) it will use that to toggle the power.
|
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).
|
|
31
|
+Also it looks for custom system commands, as described in the [OctoPrint docs](https://docs.octoprint.org/en/master/configuration/config_yaml.html#system).
|
32
|
32
|
|
33
|
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.
|
34
|
34
|
|
35
|
35
|
system:
|
36
|
36
|
actions:
|
37
|
|
- - action: all on
|
38
|
|
- command: gpio -g mode 20 out && gpio -g write 20 0 && gpio -g mode 26 out
|
39
|
|
- && gpio -g write 26 0
|
40
|
|
- name: Turn on printer & lights
|
41
|
|
- - action: all off
|
42
|
|
- command: gpio -g write 20 1 && gpio -g mode 20 in && gpio -g write 26 1 &&
|
43
|
|
- gpio -g mode 26 in
|
44
|
|
- confirm: You are about to turn off the printer and the lights.
|
45
|
|
- name: Turn off printer & lights
|
46
|
|
- - action: lights on
|
47
|
|
- command: gpio -g mode 20 out && gpio -g write 20 0
|
48
|
|
- name: Turn on lights
|
49
|
|
- - action: lights off
|
50
|
|
- command: gpio -g write 20 1 && gpio -g mode 20 in
|
51
|
|
- name: Turn off lights
|
52
|
37
|
- action: printer on
|
53
|
38
|
command: gpio -g mode 26 out && gpio -g write 26 0
|
54
|
39
|
name: Turn on printer
|