Ping does not work (on macOS)
Opened this issue · 9 comments
Any solution for Homebridge on macOS?
Anyone have any solution to this?
@Salsalove
@krazyflipj
I find some solution of this.
Please show me the config.json, and let me know the detail of your problem. Then may be I can find the solution.
@gaojie429 I pretty much used the sample config file in the read me section. Sensors work but it doesn't look like the plugin is pinging every 10 seconds (default setting)
I think we can't confirm throhgh homebridge that this plugin send ping.
If the sensors works (turn on or off as expected), ping is also works.
Which do you set the target on ?
IP or device Name?
Device name. Wouldn’t log file show when it pings? It shows it when it first loads but that’s it
Yes, it doesn't show any ping information.
(in my environment)
But it send notification when the people-sensors turn on or off, including the last ping info.
Please try following:
- change "threshold" section to 1 in your config file.
- turn off wifi of your target device more than 1 minute.
- confirm that people-sensor turn off on Home app.
- then, check the log. you may see the notification from this plugin like this:
[People] Changed occupancy state for XXXXX.local to true. Last successful ping 2019-02-17T23:14:19+09:00 , last webhook none .
@gaojie429 ok so the following showed:
Changed occupancy state for _username_ to false. Last successful ping 2019-02-17T06:48:07-08:00
So does that mean it is working? So the plugin just checks every 15 minutes (default) in this case, it was changed to one minute? If so, how is this better than the geofencing that HomeKit uses? With threshold set at 15, wife left house 5 minutes ago and it still detects her as being home.
Yes it works well !!
According to the description of this plugin...
when a Homekit enabled app looks up the state of a person, the last seen time for that persons device is compared to the current time minus threshold minutes, and if it is greater assumes that the person is active.
So, if you set threshold at 15, this plugin think that target device is at home even if the device is disconnected 10 minutes ago.
When you set threshold at 1, this plugin detect your leaving home immediately.
However, I don't recommend to set it at 1, because iPhone deliberately disconnect from the network once the screen is turned off to save power. Fortunately, it return to online in a few seconds, so you can set it to less than 15. Most recommended threshold is 5~7.
Super late response, but my guess is that likely the device name might fail on macOS if it's a Windows NETBEUI name. I'd try using the Bonjour/MDNS name ending in .local as suggested.
If the issue is pinging a macOS computer for presence, make sure "Enable stealth mode" isn't enabled in Systems Preferences > Security & Privacy > Firewall > Firewall Options...