chipolo
v0.0.0
Published
node.js lib for the Chipolo
Downloads
4
Readme
node-chipolo
node.js lib for the Chipolo
Install
npm install chipolo
Usage
var Chipolo = require('chipolo');
Discover
Chipolo.discover(callback(chipolo));
Color:
var color = chipolo.color;
Connect
chipolo.connect(callback);
Disconnect
chipolo.disconnect(callback);
Discover Services and Characteristics
chipolo.discoverServicesAndCharacteristics(callback);
Pair
Make sure Chipolo is not "paired" with other device first.
chipolo.pair(callback(success)); // success: true | false
Device Info
chipolo.readModelNumber(callback(modelNumber));
chipolo.readSerialNumber(callback(serialNumber));
chipolo.readFirmwareRevision(callback(firmwareRevision));
chipolo.readHardwareRevision(callback(hardwareRevision));
chipolo.readSoftwareRevision(callback(softwareRevision));
chipolo.readManufacturerName(callback(manufacturerName));
Temperature_
chipolo.readTemperature(callback(temperature)); // temperature in °C
Battery
chipolo.readIsBatteryLow(callback(isBatteryLow)); // isBatteryLow: true | false
Audio notifications
// inRange, outOfRange, shakeAndFind: true | false
chipolo.setAudioNotifications(inRange, outOfRange, shakeAndFind, callback);
Beep
chipolo.beep(callback);
Distance
chipolo.estimateDistance(callback(estimatedDistance));
Events
Disconnect
chipolo.on('disconnect', callback);