Skip to content

sandeepmistry/node-chipolo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-chipolo

Analytics

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. Otherwise success will always return false.

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);

About

node.js lib for the Chipolo

Resources

License

Stars

Watchers

Forks

Packages

No packages published