|
|
@@ -0,0 +1,34 @@ |
|
|
|
from py_irsend import irsend |
|
|
|
|
|
|
|
import schedule |
|
|
|
import time |
|
|
|
|
|
|
|
|
|
|
|
irsend.list_remotes() |
|
|
|
|
|
|
|
def turnAllProjectorsOn(): |
|
|
|
print("turn all projectors on ...") |
|
|
|
irsend.send_once('logitech_z906', ['POWER']) |
|
|
|
irsend.send_once('logitech_z906', ['POWER']) |
|
|
|
|
|
|
|
|
|
|
|
def turnAllProjectorsOff(): |
|
|
|
print("turn all projectors off ...") |
|
|
|
irsend.send_once('logitech_z906', ['POWER']) |
|
|
|
irsend.send_once('logitech_z906', ['POWER']) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
schedule.every().day.at("21:00").do(turnAllProjectorsOn) |
|
|
|
|
|
|
|
|
|
|
|
schedule.every().day.at("6:00").do(turnAllProjectorsOff) |
|
|
|
|
|
|
|
|
|
|
|
while True: |
|
|
|
schedule.run_pending() |
|
|
|
time.sleep(1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|