Bluetooth 4.0 (smart / low energy) presence detection

Pop your questions regarding Home automation Domotica hardware here.....

Bluetooth 4.0 (smart / low energy) presence detection

Postby XanderF » Mon May 18, 2015 3:30 pm

After reading the Xtrusion post by 123unlock I got interested in BLE. Now I'm trying to create a presence detection system using a raspberry pi and BLE devices, but results are poor.

As a receiver I tried the LogiLink BT0015 (100 meter range), Conceptronic 1004108 CBT40NANO (100 meter range) and CSR 4.0 (20 meter range). As a transmitter I use a stickNfind.

I created a test script to receive uuid and rssi values for BLE devices I'm interested in:

Code: Select all
var winston = require('winston');

var logger = new (winston.Logger)({
  transports: [
    new winston.transports.Console(),
    new winston.transports.File({ filename: '/home/pi/bluetooth.log' })

var noble = require('noble');

noble.startScanning([], true);

var addressesToTrack = ['ec...', 'c0...'];

Array.prototype.contains = function(k, callback) {
    var self = this;
    return (function check(i) {
        if (i >= self.length) {
            return callback(false);

        if (self[i] === k) {
            return callback(true);

        return process.nextTick(check.bind(null, i+1));

noble.on('discover', function(peripheral) {
  addressesToTrack.contains(peripheral.uuid, function(found) {
    if (found) {
       logger.warn(peripheral.uuid, ' ', peripheral.rssi);

This works well when the stickNFind is within 5 meter of the raspberry PI, any further and the PI will not detect the stickNfind anymore. There was no improved switching from a 20 meter BLE USB dongle to a 100 meter one. Strangely enough the 20 meter CSR 4.0 USB dongle worked best. Probably the stickNFind is the problem here.

If anyone is doing something similar or is interested in something similar please leave your comments. Thanks :)
Starting Member
Starting Member
Posts: 9
Joined: January 2015

Re: Bluetooth 4.0 (smart / low energy) presence detection

Postby patrickservais81 » Thu Dec 24, 2015 8:13 pm

Any progress? I've been searching the web for some kind of detection, ble seems to be the best (and affordable). But only examples of ibeacons etc. Your approach is the same i was thinking of.

Verstuurd vanaf mijn HTC One M8s met Tapatalk
User avatar
Starting Member
Starting Member
Posts: 1
Joined: August 2014

Re: Bluetooth 4.0 (smart / low energy) presence detection

Postby 123unlock » Sun Jan 03, 2016 2:34 pm

the range of stick'n find is not so best, i bought myself and my wife an fitbit, it looks like those have much better range than the stick'n find and we can keep track of our steps / hart-rate etc :) running a script in nodejs as webservice, were my domotica makes an call to, and galileo to decode and post the fitbit data
both work together fine, one dongle for fitbit decode, and en BTLE dongle for the BLE tracker stuff.

as we always where the fitbit, and i have 2 raspberrys with same setup in the house i can even track prosition of around the house, and place events on this :) for example going from ground floor to the acctic will turn on the attic lights based on tracker signal :)

Dutch fun: Niet omdat het moet.. maar omdat het kan :)
Xtrusion Digital Home Automation Project
User avatar
Posts: 86
Joined: June 2012
Location: Apeldoorn / Netherlands

Re: Bluetooth 4.0 (smart / low energy) presence detection

Postby Smithl100 » Wed Feb 24, 2016 4:00 am

123unlock can you provide some more info on the fitbit and pi setup. I am able to scan and see the fitbit on the pi, but haven't figured out to look out for the fitbit and track as it goes and comes. Any info is appreciated.
Starting Member
Starting Member
Posts: 1
Joined: February 2016

Return to Questions & Discussions Forum

Who is online

Users browsing this forum: No registered users and 1 guest