2018-08-11 00:32:33 +02:00
|
|
|
from sem6000 import SEMSocket
|
|
|
|
import time
|
|
|
|
socket = SEMSocket('f0:c7:7f:0d:e7:17')
|
|
|
|
|
|
|
|
socket.login("1337")
|
2018-08-13 18:47:46 +02:00
|
|
|
socket.changePassword("1234")
|
|
|
|
socket.login("1234")
|
|
|
|
#socket.changePassword("1337")
|
|
|
|
|
2018-08-11 00:32:33 +02:00
|
|
|
while True:
|
2018-08-13 18:47:46 +02:00
|
|
|
break;
|
2018-08-11 00:32:33 +02:00
|
|
|
time.sleep(1)
|
|
|
|
socket.getStatus()
|
2018-08-13 18:47:46 +02:00
|
|
|
socket.setStatus(True)
|
2018-08-11 00:32:33 +02:00
|
|
|
print("=== {} ({}) ===".format(socket.mac_address, "on" if socket.powered else "off"))
|
|
|
|
print("\t{}V {}A → {}W@{}Hz".format(socket.voltage, socket.current, socket.power, socket.frequency))
|