mpower_control/light_switch.py

13 lines
250 B
Python
Raw Normal View History

2016-10-02 18:40:00 +02:00
#!/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: