Meet this Python Wake-on-LAN (WOL) Tool! It smartly checks your device status with integrated ping before sending the magic packet, ensuring efficiency. Set max wake devices, prevent power surges.
Project description
ping-before-wakeonlan
Meet this Python Wake-on-LAN (WOL) Tool! It smartly checks your device status with integrated ping before sending the magic packet, ensuring efficiency. Set max wake devices, prevent power surges.
Installation
% pip install ping-before-wakeonlan
Usage
% cat /tmp/device.json
[
{
"ip": "192.168.1.3",
"mac_address": "00:00:00:00:00:03"
},
{
"ip": "192.168.1.2",
"mac_address": ""00:00:00:00:00:02
},
{
"ip": "192.168.1.1",
"mac_address": "00:00:00:00:00:01"
},
{
"ip": "192.168.1.4",
"mac_address": "00:00:00:00:00:04"
},
{
"ip": "192.168.1.5",
"mac_address": "00:00:00:00:00:05"
},
{
"ip": "192.168.1.6",
"mac_address": "00:00:00:00:00:06"
},
{
"ip": "192.168.1.7",
"mac_address": "00:00:00:00:00:07"
}
]
% ping-before-wakeonlan --device-info /tmp/device.json
Process: 1 / 7: Device: {'ip': '192.168.1.3', 'mac_address': '00:00:00:00:00:03'}
Process: 2 / 7: Device: {'ip': '192.168.1.2', 'mac_address': '00:00:00:00:00:02'}
Process: 3 / 7: Device: {'ip': '192.168.1.1', 'mac_address': '00:00:00:00:00:01'}
Process: 4 / 7: Device: {'ip': '192.168.1.4', 'mac_address': '00:00:00:00:00:04'}
Process: 5 / 7: Device: {'ip': '192.168.1.5', 'mac_address': '00:00:00:00:00:05'}
{
"count": 5,
"device": {
"failed": [],
"handled": [
{
"ip": "192.168.1.3",
"mac_address": "00:00:00:00:00:03"
},
{
"ip": "192.168.1.2",
"mac_address": "00:00:00:00:00:02"
},
{
"ip": "192.168.1.1",
"mac_address": "00:00:00:00:00:01"
},
{
"ip": "192.168.1.4",
"mac_address": "00:00:00:00:00:04"
},
{
"ip": "192.168.1.5",
"mac_address": "00:00:00:00:00:05"
}
],
"input": [
{
"ip": "192.168.1.3",
"mac_address": "00:00:00:00:00:03"
},
{
"ip": "192.168.1.2",
"mac_address": ""00:00:00:00:00:02
},
{
"ip": "192.168.1.1",
"mac_address": "00:00:00:00:00:01"
},
{
"ip": "192.168.1.4",
"mac_address": "00:00:00:00:00:04"
},
{
"ip": "192.168.1.5",
"mac_address": "00:00:00:00:00:05"
},
{
"ip": "192.168.1.6",
"mac_address": "00:00:00:00:00:06"
},
{
"ip": "192.168.1.7",
"mac_address": "00:00:00:00:00:07"
}
],
"online": [],
"skip": [
{
"ip": "192.168.1.6",
"mac_address": "00:00:00:00:00:06"
},
{
"ip": "192.168.1.7",
"mac_address": "00:00:00:00:00:07"
}
]
},
"info": [
"cmd: ['ping', '-c', '1', '-W', '3', '192.168.1.1'], item: {'ip': '192.168.1.1', 'mac_address': '00:00:00:00:00:01'}",
"processOutput: b'PING 192.168.1.1 (192.168.1.1): 56 data bytes\\n\\n--- 192.168.1.1 ping statistics ---\\n1 packets transmitted, 0 packets received, 100.0% packet loss\\n', processError: None"
],
"maxCount": 5,
"ping": "ping -c 1 -W 3",
"status": true,
"version": "1.0.0"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ping-before-wakeonlan-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f797ed8d4e2d7a3b1d70ba08e35d35c429158b03e7e1cda52dd2d6c59caf038d |
|
MD5 | 7ca66b7f1924b522aa8bb29bf4f9dbf4 |
|
BLAKE2b-256 | 59dbe3512934b603c10726ba70e01821e9bef6eaf792e80b04c441ab01c204cf |
Close
Hashes for ping_before_wakeonlan-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b15ef5920d7350c5bbf2cec15a7fdcb552376a6b1beeea6bfd114c2c622f0d9 |
|
MD5 | 3b7838e95d698e45a3f09825b5182a4b |
|
BLAKE2b-256 | 812f4b32a1833e5a032abd61e219c52fbbc3d18c5578d2a7714f786ac5399f1b |