paolotremadio / homebridge-automation-bluetooth-presence

Manage people presence based on Bluetooth devices (phones, watches, tables, bluetooth keychain tags)
20 stars 9 forks source link

Installation problem #3

Closed flobernd closed 5 years ago

flobernd commented 6 years ago

Hi there,

I get the following error while installing your plugin:

> curve25519-n@1.4.0 install /usr/lib/node_modules/homebridge-automation-bluetooth-presence/node_modules/curve25519-n                                                     > node-gyp rebuild                                                                                                                                                        gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/8.12.0"                                                                       gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/homebridge-automation-bluetooth-presence/node_modules/curve25519-n/.node-gyp"      gyp WARN install got an error, rolling back install                                  gyp WARN install got an error, rolling back install                                  gyp ERR! configure error                                                             gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/homebridge-automation-bluetooth-presence/node_modules/curve25519-n/.node-gyp'               gyp ERR! System Linux 4.14.70-v7+                                                    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"                                                              gyp ERR! cwd /usr/lib/node_modules/homebridge-automation-bluetooth-presence/node_modules/curve25519-n                                                                     gyp ERR! node -v v8.12.0                                                             gyp ERR! node-gyp -v v3.8.0                                                          gyp ERR! not ok                                                                      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@0.1.4 (node_modules/homebridge-automation-bluetooth-presence/node_modules/xpc-connection):                 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connection@0.1.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})                                                                                        npm ERR! code ELIFECYCLE                                                             npm ERR! errno 1                                                                     npm ERR! curve25519-n@1.4.0 install: `node-gyp rebuild`                              npm ERR! Exit status 1                                                               npm ERR!                                                                             npm ERR! Failed at the curve25519-n@1.4.0 install script.                            npm ERR! This is probably not a problem with npm. There is likely additional logging output above.                                                                                                                                                             npm ERR! A complete log of this run can be found in:                                 npm ERR!     /root/.npm/_logs/2018-10-12T03_01_52_389Z-debug.log                     sudo npm install homebridge-automation-bluetooth-presence -g  27.97s user 3.08s system 119% cpu 26.059 total                                                              

Anything I can do about that?

Best regards

flobernd commented 6 years ago

Got it working by using --unsafe-perm.

One more question tho: The MAC of my iPhone keeps changing ... probalby a security feature. Nothing I can do against that I guess?

paolotremadio commented 6 years ago

what kind of device (E.g. PC, raspberry pi) and what distro/version are you running homebridge on?

flobernd commented 6 years ago

I‘m using a RaspberryPi 3b+ running Raspbian Stretch Lite. The installation worked with the unsafe switch, but I can‘t see a way to detect My iPhone, if its MAC keeps changing every few minutes :/

paolotremadio commented 5 years ago

Hi @flobernd. Are you happy to help me testing a new build of this plugin? I don't have a RPI so can't test it properly.

getafe83 commented 5 years ago

I‘m using a RaspberryPi 3b+ running Raspbian Stretch Lite. The installation worked with the unsafe switch, but I can‘t see a way to detect My iPhone, if its MAC keeps changing every few minutes :/

I have the same problem. I also have a raspberry pi 3 running Raspbian Stretch Lite

Hi @flobernd. Are you happy to help me testing a new build of this plugin? I don't have a RPI so can't test it properly.

I could help you

flobernd commented 5 years ago

I can help you as well, but I'm afraid this is nothing you can fix. The random MAC addresses seem to be an intended BLE security feature.

getafe83 commented 5 years ago

But entering the MAC of my IPhone device directly in the configuration file does not discover it either.

flobernd commented 5 years ago

Nope, that's not working either. This is „by design“ to prevent tracking of your phone device.

getafe83 commented 5 years ago

I understand, then I think the best thing is for homebridge and the device to be paired and when the connection is lost then you are not at home. I do not know if it is very difficult to create.

flobernd commented 5 years ago

Pairing an iPhone with the Pi is not easy as well, but should work with some efford. I switched to WLAN detection (using the homebridge-fritz-platform plugin for now). That works very well if you want to know if somebody is at home, but of course won't work well, if you need to know if somebody is close to your Pi.

paolotremadio commented 5 years ago

I've updated the instructions to include the necessary dependencies for Raspberry PI. I'm waiting for Noble to release a new version in order to release an update that will improve stability on the PI.

About the iPhone, I've noticed the random MAC address. But strangely enough, this does not happen when running the plugin on macOS. will investigate further.

Feel free to re-open this issue if you have any further questions :)