Smart control of your power supply via GPIO, GCODE Command, System Command, or variety of sub-plugins.
GNU Affero General Public License v3.0
202
stars
112
forks
source link
sensing system command return code wiki error #251
Open
tbmale opened 1 year ago
The sensing system command return code should be
0 - off 1 - on
As for the commands, I've made the work with:
switch on
sh -c "echo 1 > /sys/class/gpio/gpio226/value"
switch off
sh -c "echo 0 > /sys/class/gpio/gpio226/value"
sensing
expr `cat /sys/class/gpio/gpio226/value` == 1
The wiki writes Commands on *nix systems will be executed within the sh interpreter.
... but the only way to make them work was spawning my own with
sh
.