Example #1
0
class WemoPowerSwitch(PowerDevice):
    '''
    Controls a wemo switch given an ipaddress. Run the following command to list devices:

        $ python ./devices/power.py
    '''
    def __init__(self, outlet):
        addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml"
        self.switch = WemoSwitch(addr)
    def reset(self):
        self.switch.off()
        time.sleep(5)
        self.switch.on()
Example #2
0
 def __init__(self, outlet):
     addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml"
     self.switch = WemoSwitch(addr)
Example #3
0
 def __init__(self, outlet):
     addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml"
     self.switch = WemoSwitch(addr)
Example #4
0
 def __init__(self, outlet: str):
     """Instance initialization."""
     addr = "http://" + outlet.replace("wemo://", "") + ":49153/setup.xml"
     super().__init__(None, outlet=addr)
     self.switch = WemoSwitch(self.outlet)
Example #5
0
 def __init__(self, outlet):
     """Instance initialization."""
     addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml"
     self.switch = WemoSwitch(addr)