Hi, i want to discover if a bluetooth enabled device is near and switch all off when not.
I installed a Logilink Bluetooth Stick on the pi, and it discovers my device.
Now it was time to intigrate it in Pimatic with the pimatic-ble plugin. When i try to install the plugin, it always shows an error in pimatic gui error log “Error running “npm install pimatic-ble”” . I tried to install the plugin manually but it fails too and gives out the following response:

npm install pimatic-ble
npm http GET https://registry.npmjs.org/pimatic-ble
npm http 304 https://registry.npmjs.org/pimatic-ble
npm http GET https://registry.npmjs.org/noble
npm http 304 https://registry.npmjs.org/noble
npm http GET https://registry.npmjs.org/xpc-connection
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/bplist-parser/0.0.6
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/bplist-parser/0.0.6
npm http 304 https://registry.npmjs.org/xpc-connection
npm WARN optional dep failed, continuing xpc-connection@0.1.4

noble@0.3.14 install /home/pi/node_modules/pimatic-ble/node_modules/noble
node-gyp rebuild

make: Entering directory '/home/pi/node_modules/pimatic-ble/node_modules/noble/build’
CC(target) Release/obj.target/hci-ble/src/hci-ble.o
…/src/hci-ble.c:9:33: fatal error: bluetooth/bluetooth.h: No such file or directory
#include <bluetooth/bluetooth.h>
^
compilation terminated.
hci-ble.target.mk:78: recipe for target ‘Release/obj.target/hci-ble/src/hci-ble.o’ failed
make: *** [Release/obj.target/hci-ble/src/hci-ble.o] Error 1
make: Leaving directory '/home/pi/node_modules/pimatic-ble/node_modules/noble/build’
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 4.1.13-v7+
gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /home/pi/node_modules/pimatic-ble/node_modules/noble
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! noble@0.3.14 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the noble@0.3.14 install script.
npm ERR! This is most likely a problem with the noble package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls noble
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.1.13-v7+
npm ERR! command “/usr/local/bin/node” “/usr/local/bin/npm” “install” "pimatic-ble"
npm ERR! cwd /home/pi
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/npm-debug.log
npm ERR! not ok code 0

  • is the plugin the right one to make rules of?
  • how to resolve the problem with installing?
  • how to use the plugin, once installed?

thank you