class XMPP_ClientTests(TestCase): def setUp(self): self.xmpp = XMPP_Client(id='*****@*****.**', password='******', server='talk.google.com', port=5222) def test_instantiation(self): self.assertIsInstance(self.xmpp, XMPP_Client) def test_send(self): self.xmpp.command((Command.MESSAGE, '*****@*****.**', 'This is the test'))
class XMPP_ClientTests(TestCase): def setUp(self): self.xmpp = XMPP_Client(id='*****@*****.**', password='******', server='talk.google.com', port=5222) def test_instantiation(self): self.assertIsInstance(self.xmpp, XMPP_Client) def test_send(self): self.xmpp.command( (Command.MESSAGE, '*****@*****.**', 'This is the test'))
import select from pytomation.interfaces import UPB, InsteonPLM, TCP, Serial, Stargate, W800rf32, \ NamedPipe, StateInterface, Command, HTTPServer, \ HTTP, HW_Thermostat, WeMo, InsteonPLM2 from pytomation.devices import Motion, Door, Light, Location, InterfaceDevice, \ Photocell, Generic, StateDevice, State, Attribute, \ Room, Thermostat, XMPP_Client #from pytomation.common.system import * ###################### 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)
def setUp(self): self.xmpp = XMPP_Client(id='*****@*****.**', password='******', server='talk.google.com', port=5222)
import select from pytomation.interfaces import UPB, InsteonPLM, TCP, Serial, Stargate, W800rf32, \ NamedPipe, StateInterface, Command, HTTPServer, \ HTTP, HW_Thermostat, WeMo, InsteonPLM2 from pytomation.devices import Motion, Door, Light, Location, InterfaceDevice, \ Photocell, Generic, StateDevice, State, Attribute, \ Room, Thermostat, XMPP_Client #from pytomation.common.system import * ###################### 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)