Switch projectors on and off at a specified time
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ir-remote-timer.py 608 B

4 jaren geleden
4 jaren geleden
4 jaren geleden
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)