예제 #1
0
파일: power.py 프로젝트: mtusnio/boardfarm
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()
예제 #2
0
파일: power.py 프로젝트: rajjnish/boardfarm
 def __init__(self, outlet):
     addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml"
     self.switch = WemoSwitch(addr)
예제 #3
0
파일: power.py 프로젝트: mtusnio/boardfarm
 def __init__(self, outlet):
     addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml"
     self.switch = WemoSwitch(addr)
예제 #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)
예제 #5
0
 def __init__(self, outlet):
     """Instance initialization."""
     addr = 'http://' + outlet.replace("wemo://", "") + ":49153/setup.xml"
     self.switch = WemoSwitch(addr)