import sys from blinds import * ip='192.168.81.1' port='3480' blind = blinds(ip,port,id=1) blind.Param_Decrease() print blind.getId() ''' k=switch4.getId() print k l=switch4.Increase_val(78) m=switch4.getIntensity() print m #switch4.setId(4) switch5 = smart_plug(ip,port) switch5.setId(5) switch4.setCategory('Light') switch4.setOff() switch4.setOn()
print os.path.exists(homepath + '/autopi.config') if not os.path.exists(homepath + '/autopi.config'): print 'no user info' root = Tk() root.wm_title('AutoPi Login') app = registerGUI(root,web) root.mainloop() print 'Web' print web pi = raspberryPi(web) light = light() cam = camera() alarm = alarm() blind = blinds() reg = register(web,pi,light,cam,alarm,blind) else: config = ConfigParser.ConfigParser() config.read(homepath+'/autopi.config') username = config.get('LoginInfo','username') password = config.get('LoginInfo','password') print 'working' web.setUsername(username) web.setPassword(password) web.setAuth() pi = raspberryPi(web) if not pi.response: err.setLoginError() light = light() cam = camera()
print os.path.exists(homepath + '/autopi.config') if not os.path.exists(homepath + '/autopi.config'): print 'no user info' root = Tk() root.wm_title('AutoPi Login') app = registerGUI(root, web) root.mainloop() print 'Web' print web pi = raspberryPi(web) light = light() cam = camera() alarm = alarm() blind = blinds() reg = register(web, pi, light, cam, alarm, blind) else: config = ConfigParser.ConfigParser() config.read(homepath + '/autopi.config') username = config.get('LoginInfo', 'username') password = config.get('LoginInfo', 'password') print 'working' web.setUsername(username) web.setPassword(password) web.setAuth() pi = raspberryPi(web) if not pi.response: err.setLoginError() light = light() cam = camera()
import sys from blinds import * ip = '192.168.81.1' port = '3480' blind = blinds(ip, port, id=1) blind.Param_Decrease() print blind.getId() ''' k=switch4.getId() print k l=switch4.Increase_val(78) m=switch4.getIntensity() print m #switch4.setId(4) switch5 = smart_plug(ip,port) switch5.setId(5) switch4.setCategory('Light') switch4.setOff() switch4.setOn() k=switch5.getId()