Exemple #1
0
class WeMoTests(TestCase):
    def setUp(self):
#        self.interface = WeMo( '192.168.13.141', '49153')
        self.interface = WeMo(MockInterface())
        
    def test_instantiation(self):
        self.assertIsInstance(self.interface, WeMo)
    
    def test_on(self):
        result = self.interface.on()
        self.assertEqual(result, None)
Exemple #2
0
    def setUp(self):
#        self.interface = WeMo( '192.168.13.141', '49153')
        self.interface = WeMo(MockInterface())
Exemple #3
0
        Attribute.COMMAND: (Command.MOTION, Command.LIGHT),
        Attribute.TARGET: Command.OFF,
        Attribute.SECS: 30 * 60
    },
    ignore={
        Attribute.COMMAND: (Command.STILL, Command.DARK),
    },
)

l_bed_hallway = Light(
    address='19.0d.1b',
    devices=(insteon, ),
    name='Bed Hallway Light',
)

l_playroom = Light(devices=WeMo('192.168.13.141', '49153'), name='Playroom')

##################### USER CODE ###############################
#Manually controlling the light
#l_foyer.on()
#l_foyer.off()
#l_front_porch.on()
#l_front_porch.off()
#l_family_lamp.l40()

upb.update_status()


def MainLoop(startup=False, *args, **kwargs):
    if startup:
        print 'Run once'