experiments
This commit is contained in:
parent
e525cc6c8b
commit
ba80fc6691
2 changed files with 14 additions and 0 deletions
2
README
2
README
|
@ -0,0 +1,2 @@
|
||||||
|
*mPower Utils*
|
||||||
|
actually moving from sh to python
|
12
light_switch.py
Executable file
12
light_switch.py
Executable file
|
@ -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:
|
Loading…
Reference in a new issue