homebridge-automation-bluetooth-presence
homebridge-automation-bluetooth-presence copied to clipboard
Dependency not specified in installation documents
The bluetooth-hci-socket
package needs to be installed. This should be included in the package.json file so it is installed automatically.
pi@raspi4:/usr/local/lib/node_modules/homebridge-automation-bluetooth-presence $ automation-bt-detect-devices
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'bluetooth-hci-socket'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-automation-bluetooth-presence/node_modules/noble/lib/hci-socket/hci.js:6:26)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Having the same problem while running automation-bt-detect-devices
. Currently running node 8.9.4 on a PI 4 tried to install the bluetooth-hci-socket
dependency by hand but had no luck and got a lot of errors similar to the one below. Which node version is best to run this library without any issues?
/home/pi/.node-gyp/8.9.4/include/node/v8config.h:318:3: note: in definition of macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/BluetoothHciSocket.cpp:282:93: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
akeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../node_modules/nan/nan.h:1045:46: note: declared here
NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:282:93: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
akeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
@lucadegasperi , you may want to install this instead
https://www.npmjs.com/package/@abandonware/bluetooth-hci-socket
apparently, bluetooth-hci-socket is not maintained
https://github.com/abandonware/node-bluetooth-hci-socket