Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broadlink RM won't detect device failures due to a permissions issues with "net-ping" #70

Open
kiwi-cam opened this issue Jan 30, 2020 · 0 comments
Labels
good first issue Good for newcomers

Comments

@kiwi-cam
Copy link
Collaborator

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.:

pi@homebridgepi:~ $ ls -al /usr/bin/node
lrwxrwxrwx 1 root root 20 Sep  2 13:53 /usr/bin/node -> /opt/nodejs/bin/node

Then just run the command from above with the second path:
sudo setcap cap_net_raw+ep /opt/nodejs/bin/node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant