irrelon-presence
Version:
A Node.js bluetooth presence scanner. Uses bluetooth to detect devices in range of the bluetooth antenna.
16 lines (10 loc) • 397 B
JavaScript
var Presence = require('./Presence.js');
var presence = new Presence();
// Scan for devices that are currently in "discoverable" mode
/*presence.scan(function (err, devices) {
console.log('Scan data', err, devices);
});*/
// Add a device to watch for
presence.addWatch("70:14:A6:27:59:EA", "Rob's iPhone");
// Start scanning for devices we already know
presence.startWatch();