This commit is contained in:
Kai Wansart 2018-02-02 20:37:40 +01:00
parent 6ad105c9da
commit b0631cc259

View File

@ -29,18 +29,13 @@ class WOL(object):
def command(self, data): def command(self, data):
##-----------------------------------------------------------------------------------## ##-----------------------------------------------------------------------------------##
for device in data: for device in data:
print(device)
print(data)
print(self.devices)
if device in self.devices: if device in self.devices:
self.wakeDevice(self.devices[device]) self.wakeDevice(self.devices[device])
print(device)
print(self.devices[device])
##-----------------------------------------------------------------------------------## ##-----------------------------------------------------------------------------------##
def wakeDevice(self, device): def wakeDevice(self, device):
##-----------------------------------------------------------------------------------## ##-----------------------------------------------------------------------------------##
print("Waking up Device: " + device + " mac: " + self.devices[device]) print("Waking up Device: " + device + " mac: " + str(self.devices[device]))
wol.send_magic_packet(self.devices[device]) wol.send_magic_packet(self.devices[device])