Ejemplo n.º 1
0
if __name__ == '__main__':
    print "Start"

    def insteon_received(*params):
        command = params[1]

        #xpl.send('lighting.basic',"command='%s'" % (command))

    def xpl_received(*params):
        print "Here", params
#       jlight.set('on')
#       jlight.set('off')

#Lets get this party started

    insteonPLM = InsteonPLM(TCP('192.168.13.146', 9761))
    #    insteonPLM = InsteonPLM(Serial('/dev/ttyMI0'))

    jlight = InsteonDevice('19.05.7b', insteonPLM)
    jRelay = X10Device('m1', insteonPLM)

    insteonPLM.start()

    jlight.set('on')
    jlight.set('off')
    jRelay.set('on')
    jRelay.set('off')

    # Need to get a callback implemented
    #    insteon.onReceivedInsteon(insteon_received)
Ejemplo n.º 2
0
    def setUp(self):
        #        mockTCP = Mock()
        #        self.__insteon = InsteonPLM(mockTCP)

        self.__insteon = InsteonPLM(TCP('192.168.13.146', 9761))
        pass