Nukible is a client library created for the Nuki SmartLock Bluetooth API and is written to be run with node.js.
npm install nukiblesh
wget https://nodejs.org/dist/v4.4.4/node-v4.4.4-linux-armv6l.tar.gz (Raspberry PI 2)
wget https://nodejs.org/dist/v4.4.4/node-v4.4.4-linux-armv7l.tar.gz (Raspberry PI 3)
tar xvfz node-v4.4.4-linux-armvXl.tar.gz
cd node-v4.4.4-linux-armvXl
sudo cp -R * /usr/local/
`
Bluetooth connection to the Nuki SmartLock
`sh
sudo apt-get install autoconf libtool bluetooth bluez libbluetooth-dev libudev-dev
`
$3
Run the following command:
`sh
sudo setcap cap_net_raw+eip $(eval readlink -f which node)
`
This grants the `node` binary `cap_net_raw` privileges, so it can start/stop BLE advertising.
__Note:__ The above command requires `setcap` to be installed, it can be installed using the following:
* apt: `sudo apt-get install libcap2-bin`
(see https://github.com/sandeepmistry/noble#running-on-linux)
Get node module
`sh
npm install nukible --save
`
Run it
To run the simulator call node with main.js. If running the first time it pairs with the nuki lock (currently tried only with a simulation of the lock (https://github.com/as19git67/simnuki)) and then performs a unlock command.
`sh
node main.js
``