Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. # -*- coding:utf-8 -*-
  2. from bottle import route, run
  3. import irm
  4. import os
  5.  
  6. @route('/light_on')
  7. def light_on():
  8. irm.playIR("room_light_on.json")
  9. irm.playIR("stand_light_on.json")
  10. print("Light On!")
  11. return "Light On!"
  12.  
  13. @route('/light_off')
  14. def light_off():
  15. irm.playIR("room_light_off.json")
  16. irm.playIR("stand_light_off.json")
  17. print("Light Off!")
  18. return "Light Off!"
  19.  
  20. run(host='localhost', port=8080, debug=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement