Comments (6)
You’re absolute correct. I’m a at fault for not documenting the regression better. This is actually one of the main reason that I’ve not yet pushed 3.3.
The wake command is intended to execute after the wake grace time and it should be done so in any published version.
I’m sorry for any inconvenience this might have caused. I’ll add a note on the current state of the master branch in the README.
If you’ve got the time, you’re free to post a PR and I’ll accept it. Make sure that this.config.wakeGraceTime
has a sane default (set in the constructor).
from homebridge-wol.
No problem, thanks for the quick response! I initially noticed it on the npm version, and it seems to be in the 3.2.4 tagged version, so it made me question if I was misinterpreting things. (https://github.com/AlexGustafsson/homebridge-wol/blob/ver-3.2.4/lib/network-device.js#L156 looks like the wakeCommand
is executed right after wol)
I'd be happy to get a PR together for this soon.
One question about wakeCommand
I have: is it something we'd want to execute after the system has been seen as "on"? In my case, I'd prefer not to wait for the entire wakeGraceTime
if the host computer is already on, but I'm not sure if that is the same for other use cases.
For example, I was thinking that the wakeGraceTime
would be useful as a grace time after the machine has first been booted to give it time to set things up (like ssh). If the machine is already on then I'd prefer to not wait for a long wakeGraceTime
that incorporates the entire boot time. Plus, I'd have a better chance of timing the wakeCommand
correctly in case the machine takes extra long to boot up.
Basically, this is the logic I would be interested in:
- Try to wake up machine (if
mac
specified) - Wait for computer to be "online" (if
pingCommand
orip
specified) - Wait for
wakeGraceTime
- Execute
wakeCommand
Of course, this would kind of change the definition of the wakeGraceTime
, so I could see leaving it be. However, this would be a useful program flow for my purposes and possibly other use cases.
from homebridge-wol.
Hi! Sorry for missing your comment / responding so late.
You're still welcome to open a PR. Implement it the way you'd like, but try to make it additive so that the previous behavior still works. Perhaps a helloCommand
or something similar would be in order?
from homebridge-wol.
There's now an untested update to the code where the wake command should be called after the wait grace time.
from homebridge-wol.
I've gone ahead and published 3.2.5 which should contain a fix for this issue.
from homebridge-wol.
Closing as this should work now.
from homebridge-wol.
Related Issues (20)
- Wake on LAN not working W11 HOT 1
- macOS lock HOT 2
- WoL always on, although when the device is off HOT 3
- WOL doesn't work after extended time
- Network Device Ping Status every Time offline
- Settings for mac mini running Monterey
- Sleep-On-LAN (SOL)
- Can't shutdown my computer with the shutdown command
- WOL starts device, but no ping and no Online status HOT 9
- Homebridge running on docker no sambo-common
- Check if Windows PC is sleeping
- Samba Mac
- Ask for wake/start command
- Adding plugin to HomeKit
- ssh keeps asking for passphrase
- Feature Request: Add support for pingsToChange for ping commands HOT 2
- Please add icons if possible HOT 1
- Dont wake after shutdown HOT 15
- Add instruction for Enable Printer and File Sharing W10+ HOT 1
- magic packets sent not waking pc anymore HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-wol.