This repository has been archived on 2023-06-10. You can view files and clone it, but cannot push or open issues or pull requests.
Kai Wansart 9c3e560900 .
2018-02-02 00:21:59 +01:00

20 lines
867 B
Python

from wakeonlan import wol
##---------------------------------------------------------------------------------------##
class WOL(object):
##---------------------------------------------------------------------------------------##
##-----------------------------------------------------------------------------------##
def __init__(self, devices):
##-----------------------------------------------------------------------------------##
count = 0
for device in devices:
self.devices[device] = devices[device]['mac']
##-----------------------------------------------------------------------------------##
def wakeDevice(self, device):
##-----------------------------------------------------------------------------------##
if(device in self.devices):
wol.send_magic_packet(self.devices[device])