diff --git a/README b/README index e69de29..3f66d7d 100644 --- a/README +++ b/README @@ -0,0 +1,2 @@ +*mPower Utils* +actually moving from sh to python \ No newline at end of file diff --git a/light_switch.py b/light_switch.py new file mode 100755 index 0000000..3aadd7e --- /dev/null +++ b/light_switch.py @@ -0,0 +1,12 @@ +#!/bin/python +host = "127.0.0.1" +user = "admin" +passwort = "" + + +#trying it with ssh +import subprocess +proc = subprocess.Popen(['ssh', 'user@host', 'echo 1 > /proc/power/output1'], + stdin=subprocess.PIPE) + +if proc.retcode != 0: