def setUp(self): self.ms = MockInterface() if self.useMock: # Use Mock Serial Port self.sg = Stargate(self.ms) else: self.serial = Serial('/dev/ttyUSB0', 2400) self.sg = Stargate(self.serial)
###################### INTERFACE CONFIG ######################### web = HTTPServer() xmpp = XMPP_Client(id='*****@*****.**', password='******', server='talk.google.com', port=5222) upb = UPB(Serial('/dev/ttyMI0', 4800)) #insteon = InsteonPLM(TCP('192.168.13.146', 9761)) insteon = InsteonPLM(Serial('/dev/ttyMI1', 19200, xonxoff=False)) w800 = W800rf32(Serial('/dev/ttyMI3', 4800)) sg = Stargate(Serial('/dev/ttyMI4', 9600)) # invert the DIO channels for these contact sensors sg.dio_invert(1) sg.dio_invert(2) sg.dio_invert(3) sg.dio_invert(4) sg.dio_invert(5) sg.dio_invert(6) sg.dio_invert(7) sg.dio_invert(8) sg.dio_invert(9) sg.dio_invert(10) sg.dio_invert(11) sg.dio_invert(12) # My camera motion software will echo a "motion" to this pipe.