Current pingCommand is useless for macOS
See original GitHub issueIssue
Mac status is not working because in sleep state the ping command is always successful.
I could use a command like ssh user@192.168.1.256 'if [[$ (pmset -g powerstate IODisplayWrangler | tail -1 | cut -c29) -lt 4]]; then; echo 0; else; exit 1; fi;'
but the current execution of pingCommand doesn’t make any sense to it
Environment
- os & os version: macos catalina 10.15.5
- node version: v12.18.2
- homebridge version: 1.1.1
- homebridge-wol version: 4.2.1
Configuration
My configuration looks like this:
"accessories": [
{
"name": "Macbook Pro 2017",
"ip": "192.168.1.256",
"pingInterval": 45,
"pingCommand": "ssh user@192.168.1.256 'if [[ $(pmset -g powerstate IODisplayWrangler | tail -1 | cut -c29) -lt 4 ]]; then; echo 0; else; exit 1; fi;'",
"mac": "XX:XX:XX:XX:XX:XX",
"broadcastAddress": "192.168.1.256",
"wakeGraceTime": 10,
"wakeCommand": "ssh user@192.168.1.256 caffeinate -u -t 300",
"shutdownCommand": "ssh user@192.168.1.256 pmset sleepnow",
"shutdownGraceTime": 15,
"log": true,
"logPinger": true,
"debugLog": true,
"returnEarly": false,
"accessory": "NetworkDevice"
}
],
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
Can not use "pathping" command in macOS - Ask Different
Pathping works first by doing a traceroute to the destination then it uses ICMP to ping each hop in the transit path 100...
Read more >Can't find ping on macbook - Stack Overflow
In Terminal, run the following command: sudo nano /etc/paths; Enter your password, when prompted. Go to the bottom of the file, and enter...
Read more >How to use OS X's terminal to ping an IP using the latency as ...
I'd like a way to make the ping stop after the latency drops below a given value. Let's say 100, so in the...
Read more >MacOS Monterey Problems – Fixing Issues with macOS 12
This is a rare but serious problem; some Mac users have discovered that installing MacOS Monterey renders their Mac completely useless.
Read more >Ping a Specific Port - Server Fault
Try curl command, like: $ curl host:port. For example:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in 4.2.2 which will be released shortly. If you still face the issue after upgrading, please comment here or reopen a new issue as soon as possible.
I’ve found the bug. Hopefully I get the time to push a fix out today. I’ve also dockerized integration tests to simulate an actual setup with a MacBook etc. to make sure that issues like this are much easier to find in the future.