switch.py 223 B

1234567891011121314
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. demeter web
  5. name:pub.py
  6. author:rabin
  7. """
  8. from service.device import *
  9. import sys
  10. id = sys.argv[1]
  11. value = sys.argv[2]
  12. device = Device()
  13. device.switch(id, value)