Ejemplo n.º 1
0
 def __init__(self,parent=None, **kw):
     Frame.__init__(self,parent,**kw)        
     self.lights = LightBoxes(self,text="Lights",padx=5,pady=5)
     self.lights.grid(row=4,column=0,columnspan=3,sticky=E+W)
     ip = '192.168.1.76'
     port = '8080'
     self.d = DomoticzGateway(ip,port)
     self.getLights()
Ejemplo n.º 2
0
 def __init__(self,parent=None, **kw):
     Frame.__init__(self,parent,**kw)        
     self.lights = LightBoxes(self,text="Lights",padx=5,pady=5)
     self.lights.grid(row=4,column=0,columnspan=3,sticky=E+W)
     ip = '192.168.1.76'
     port = '8080'
     self.d = DomoticzGateway(ip,port)
     self.getLights()
Ejemplo n.º 3
0
class HomeAutomation(Frame):
    def __init__(self,parent=None, **kw):
        Frame.__init__(self,parent,**kw)        
        self.lights = LightBoxes(self,text="Lights",padx=5,pady=5)
        self.lights.grid(row=4,column=0,columnspan=3,sticky=E+W)
        ip = '192.168.1.76'
        port = '8080'
        self.d = DomoticzGateway(ip,port)
        self.getLights()
    def getLights(self):
        lights = self.d.getLights()
        for light in self.d.lights:
            self.lights.addLight(light['Name'])
    def lightCommand(self,light,cmd):
        #print light, cmd
        index = self.d.getLightIndex(light)
        #print "Light: ",light, " Index:", index
        self.d.commandLight(index,cmd)
Ejemplo n.º 4
0
class HomeAutomation(Frame):
    def __init__(self,parent=None, **kw):
        Frame.__init__(self,parent,**kw)        
        self.lights = LightBoxes(self,text="Lights",padx=5,pady=5)
        self.lights.grid(row=4,column=0,columnspan=3,sticky=E+W)
        ip = '192.168.1.76'
        port = '8080'
        self.d = DomoticzGateway(ip,port)
        self.getLights()
    def getLights(self):
        lights = self.d.getLights()
        for light in self.d.lights:
            self.lights.addLight(light['Name'])
    def lightCommand(self,light,cmd):
        #print light, cmd
        index = self.d.getLightIndex(light)
        #print "Light: ",light, " Index:", index
        self.d.commandLight(index,cmd)