mpower_control/light_switch.py
2016-10-02 18:40:00 +02:00

12 lines
250 B
Python
Executable file

#!/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: