Switch projectors on and off at a specified time
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ir-remote-timer.py 608 B

pirms 4 gadiem
pirms 4 gadiem
pirms 4 gadiem
12345678910111213141516171819202122232425262728293031323334
  1. from py_irsend import irsend
  2. import schedule
  3. import time
  4. irsend.list_remotes()
  5. def turnAllProjectorsOn():
  6. print("turn all projectors on ...")
  7. irsend.send_once('logitech_z906', ['POWER'])
  8. irsend.send_once('logitech_z906', ['POWER'])
  9. def turnAllProjectorsOff():
  10. print("turn all projectors off ...")
  11. irsend.send_once('logitech_z906', ['POWER'])
  12. irsend.send_once('logitech_z906', ['POWER'])
  13. schedule.every().day.at("21:00").do(turnAllProjectorsOn)
  14. schedule.every().day.at("06:00").do(turnAllProjectorsOff)
  15. while True:
  16. schedule.run_pending()
  17. time.sleep(1)