nukible
v1.0.12
Published
Nukible is a client library created for the Nuki SmartLock Bluetooth API and is written to be run with node.js.
Downloads
11
Readme
Nukible
Nukible is a client library created for the Nuki SmartLock Bluetooth API and is written to be run with node.js.
Installation
I'm running the nuki fob simulator on a Raspberry PI 2 and on a Raspberry PI 3 with node.js version 4.4.4 and on the PI 2 there is a bluetooth dongle connected via USB.
Install Node.js
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
sudo apt-get install autoconf libtool bluetooth bluez libbluetooth-dev libudev-dev
Running without root/sudo
Run the following command:
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
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.
node main.js
Samples/main.js
Simulates a Nuki.io Fob (runs on Raspberry PI on node.js - needs bluetooth dongle) It pairs with a nuki smartlock and performs a unlock command.
Note that this code is preliminary and my cause unexpected results.