first commit
This commit is contained in:
Executable
+10
@@ -0,0 +1,10 @@
|
||||
# Instalace
|
||||
# pip install broadlink
|
||||
# pip install cryptography
|
||||
|
||||
import broadlink
|
||||
|
||||
devices1 = broadlink.sp2(devtype = 0x7547, host=("192.168.15.109",80), mac=bytearray.fromhex("34 EA 34 BD 75 02"))
|
||||
devices1.auth()
|
||||
devices1.set_power(True)
|
||||
# OFF - devices1.set_power(False)
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/python3
|
||||
from datetime import datetime, time
|
||||
now = datetime.now()
|
||||
now_time = now.time()
|
||||
|
||||
|
||||
|
||||
if now_time >= time(6,00) and now_time <= time(22,00):
|
||||
print ('0')
|
||||
else:
|
||||
print ('1')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user