Code Monkey home page Code Monkey logo

raspibeacon's Introduction

Raspibeacon

Beacon low energy scanning program that sends a post request to an end point defined in the parameters.

You can filter by beacons brands, define the time between beacon detection.

Linux

  • Kernel version 3.6 or above
  • libbluetooth-dev

Ubuntu/Debian/Raspbian

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

Make sure node is on your path, if it's not, some options:

Usage

npm install raspibeacon
var raspibeacon = require('raspibeacon')
let options = {
    brands: ['Kontakt'],
    host: "http://10.148.144.104:3000",
    endpoint: "/api/ionic/raspibeacons",
    timeout: 180000 // Time in milliseconds passed without detecting a beacon inside the action radius
}
raspibeacon.startScan(options);
Modo debug
npm install raspibeacon
var raspibeacon = require('raspibeacon')
let options = {
    brands: ['Kontakt','RadioLand iBeacon'],
    host: "http://10.148.144.104:3000",
    endpoint: "/api/ionic/raspibeacons",
    timeout: 180000 // Time in milliseconds passed without detecting a beacon inside the action radius  
}
raspibeacon.startScanDebug(options);

Response

When a beacon is detected, a post request is sent to the server with the following structure:

{ dateTime: 2017-11-22T11:04:41.734Z,
  inOut: true,
  uuid: 'AA:BB:CC:DD:EE:FF',
  id_device: 'XXXXXXXXXXXXXXXX' }

A post with the following structure is sent when a time passes without the beacon being detected, determined by the timeout param.

{ dateTime: 2017-11-22T11:34:51.621Z,
  inOut: false,
  uuid: 'AA:BB:CC:DD:EE:FF',
  id_device: 'XXXXXXXXXXXXXXXX' }

raspibeacon's People

Contributors

fjmoron-clece avatar fjms avatar franms avatar

Watchers

James Cloos avatar Russell Davis avatar  avatar

Forkers

infoneo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.