experiments

This commit is contained in:
Siegfried Krug 2016-10-02 18:40:00 +02:00
parent e525cc6c8b
commit ba80fc6691
2 changed files with 14 additions and 0 deletions

2
README
View file

@ -0,0 +1,2 @@
*mPower Utils*
actually moving from sh to python

12
light_switch.py Executable file
View 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: