I've just merged version 4.1.0 (#69) and it includes a complete overhaul of how ping works. Because of this, permissions may be an issue in some distributions. After updating, you may see this in your logs:
Jan 09 11:06:39 homebridge[25722]: [Broadlink RM] Broadlink RM won't detect device failures due to a permissions issues with "net-ping".
Jan 09 11:06:39 homebridge[25722]: To fix:
Jan 09 11:06:39 homebridge[25722]: 1. Run "which node" to determine your node path.
Jan 09 11:06:39 homebridge[25722]: 2. Run "sudo setcap cap_net_raw+ep /path/to/node".
Jan 09 11:06:39 homebridge[25722]: Note: Replacing /path/to/node with the path you found in the first step.
To fix this, follow the steps as outlined:
which node
sudo setcap cap_net_raw+ep /path/to/node
If that works, the plug-in should now run. However, you may then get this error:
Failed to set capabilities on file `/usr/bin/node' (Invalid argument)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
In that case take the path to node from above and run this:
ls -al /usr/bin/node
That will return the path to where node really is, e.g.:
I've just merged version 4.1.0 (#69) and it includes a complete overhaul of how ping works. Because of this, permissions may be an issue in some distributions. After updating, you may see this in your logs:
To fix this, follow the steps as outlined:
If that works, the plug-in should now run. However, you may then get this error:
In that case take the path to node from above and run this:
ls -al /usr/bin/node
That will return the path to where node really is, e.g.:Then just run the command from above with the second path:
sudo setcap cap_net_raw+ep /opt/nodejs/bin/node