All Projects → reelyactive → barnowl

reelyactive / barnowl

Licence: MIT license
Technology-agnostic middleware for RFID, RTLS and M2M, enabling location-aware physical spaces. We believe in an open Internet of Things.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to barnowl

advlib
Open source, protocol-agnostic library for decoding ambient wireless packets. We believe in an open Internet of Things.
Stars: ✭ 90 (+260%)
Mutual labels:  rfid, bluetooth-low-energy, node-js, pareto-anywhere
node-healthchecks-api
The Node.js implementation of the Health Checks API by Hootsuite
Stars: ✭ 25 (+0%)
Mutual labels:  node-js
proffy
📗 Sua plataforma de estudos online.
Stars: ✭ 24 (-4%)
Mutual labels:  node-js
mutode
Mutation testing for JavaScript and Node.js
Stars: ✭ 61 (+144%)
Mutual labels:  node-js
apdu-over-ble
Specification of a protocol to transmit APDU commands and responses over Bluetooth Low Energy
Stars: ✭ 17 (-32%)
Mutual labels:  bluetooth-low-energy
Fool
Simple Russian voice assistant based on Android Things and Raspberry Pi 3
Stars: ✭ 26 (+4%)
Mutual labels:  rfid
redive linebot
基於 Bottender 框架實作出的,公主連結聊天機器人,附加其他實用管理功能。
Stars: ✭ 20 (-20%)
Mutual labels:  node-js
SwiftyTeeth
A simple, lightweight library intended to take away some of the cruft and tediousness of using CoreBluetooth
Stars: ✭ 21 (-16%)
Mutual labels:  bluetooth-low-energy
daydream-node
Quick Node.js module to connect to the Daydream controller and receive all the data
Stars: ✭ 17 (-32%)
Mutual labels:  bluetooth-low-energy
quasar
Quick opcUA Server generAtion fRamework
Stars: ✭ 31 (+24%)
Mutual labels:  m2m
minimal-node-application
Basic Node Babel Server
Stars: ✭ 126 (+404%)
Mutual labels:  node-js
node-ts-dedent
TypeScript package which smartly trims and strips indentation from multi-line strings
Stars: ✭ 119 (+376%)
Mutual labels:  node-js
BLE SDK6 examples
Examples for the Dialog Smartbond Bluetooth low energy families based on the SDK6
Stars: ✭ 38 (+52%)
Mutual labels:  bluetooth-low-energy
BLE
No description or website provided.
Stars: ✭ 25 (+0%)
Mutual labels:  bluetooth-low-energy
sportiduino
Electronic timing system for orienteering and similar outdoor sports events on Arduino
Stars: ✭ 56 (+124%)
Mutual labels:  rfid
Mastering-Node.js
📚 Belajar Dengan Jenius Node.js bareng Gun Gun Febrianza
Stars: ✭ 57 (+128%)
Mutual labels:  node-js
IT API
The Internet services of the IT department of Alexander Technological Education Institute of Thessaloniki
Stars: ✭ 14 (-44%)
Mutual labels:  node-js
proffy
React Native + ReactJS + NodeJS project developed on RocketSeat NexLevelWeek. This project is based on an application for connect students and teachers.
Stars: ✭ 30 (+20%)
Mutual labels:  node-js
nodejs-questions
Some common node.js questions and answers.
Stars: ✭ 22 (-12%)
Mutual labels:  node-js
Density-Wars
Real time peer to peer RTS game running on WebGL (WIP).
Stars: ✭ 60 (+140%)
Mutual labels:  node-js

barnowl

Technology-agnostic middleware for RFID, RTLS and M2M

barnowl converts RF decodings into software-developer-friendly JSON. It abstracts away all the complexity of radio protocols (ex: BLE, RAIN RFID, EnOcean, ...) and vendor-specific infrastructure to provide developers with a simple, standardised data structure to build software applications.

barnowl overview

barnowl outputs a real-time stream of raddec objects which facilitate any and all of the following applications:

  • RFID: what is present, based on the device identifier?
  • RTLS: where is it relative to the receiving devices?
  • M2M: how is its status, based on any payload included in the packet?

barnowl is a lightweight Node.js package that can run on resource-constrained edge devices as well as on powerful cloud servers and anything in between. It is the keystone in Pareto Anywhere open source middleware of the reelyActive technology platform.

Installation

npm install barnowl

Hello barnowl!

Even without any hardware, it's easy to get started. The following code will listen to simulated hardware and output packets to the console:

const Barnowl = require('barnowl');

let barnowl = new Barnowl();

barnowl.on("raddec", function(raddec) {
  console.log(raddec);
});

barnowl.addListener(Barnowl, {}, Barnowl.TestListener, {});

As output you should see a stream of raddec objects similar to the following:

{
  transmitterId: "001122334455",
  transmitterIdType: 2,
  rssiSignature:
   [ { receiverId: "001bc50940810000",
       receiverIdType: 1,
       numberOfDecodings: 1,
       rssi: -60 },
     { receiverId: "001bc50940810001",
       receiverIdType: 1,
       numberOfDecodings: 1,
       rssi: -66 } ],
  packets: [ "061b55443322110002010611074449555520657669746341796c656572" ],
  timestamp: 1547693457133
}

Regardless of the underlying RF protocol and hardware, the raddec specifies what (transmitterId) is where (receiverId & rssi), as well as how (packets) and when (timestamp).

Is that owl you can do?

While barnowl may suffice standalone for simple real-time applications, its functionality can be greatly extended with the following software packages:

  • advlib to decode the individual packets from hexadecimal strings into JSON
  • barnacles to distribute the real-time data stream via APIs and more

These packages and more are bundled together as the Pareto Anywhere open source middleware suite, which includes several barnowl listeners, as described next.

Where to listen?

barnowl includes a TestListener (see the Hello barnowl! example above) and a UdpListener (see the first example below) while all other listeners exist as separate software packages to keep the code as lightweight and modular as possible. The following table lists all these listener packages which integrate seamlessly with barnowl in just two lines of code.

Listener package Use with
barnowl-reel reelyActive hardware (BLE, sub-GHz active RFID)
barnowl-hci BLE radios on Linux computers (ex: Raspberry Pi, PC, ...)
barnowl-minew Minew gateways (ex: G1)
barnowl-laird Laird Connectivity gateways (ex: IG60-BL654)
barnowl-aruba Aruba access points (ex: 303H)
barnowl-huawei Huawei access points
barnowl-impinj Impinj RFID readers
barnowl-rfcontrols RF Controls RFC OS
barnowl-enocean EnOcean (ex: USB dongle)
barnowl-tcpdump WiFi radios on computers that can run tcpdump

Example: UDP raddecs

const Barnowl = require('barnowl');

let barnowl = new Barnowl();

barnowl.on("raddec", function(raddec) { /* Handle the raddec */ });

// Add the included UDP listener with relevant options
barnowl.addListener(Barnowl, {}, Barnowl.UdpListener, { path: "0.0.0.0:50001" });

Example: reelyActive hardware connected via serial port

const Barnowl = require('barnowl');
const BarnowlReel = require('barnowl-reel'); // 1: Include the interface package

let barnowl = new Barnowl();

barnowl.on("raddec", function(raddec) { /* Handle the raddec */ });

// 2: Add the specific listener with relevant options
barnowl.addListener(BarnowlReel, {}, BarnowlReel.SerialListener, { path: "auto" });

Example: built-in BLE radio of a Raspberry Pi

const Barnowl = require('barnowl');
const BarnowlHci = require('barnowl-hci'); // 1: Include the interface package

let barnowl = new Barnowl();

barnowl.on("raddec", function(raddec) { /* Handle the raddec */ });

// 2: Add the specific listener with relevant options
barnowl.addListener(BarnowlHci, {}, BarnowlHci.SocketListener, {});

Example: WiFi radio on computer with tcpdump installed

const Barnowl = require('barnowl');
const BarnowlTcpdump = require('barnowl-tcpdump'); // 1: Include the package

let barnowl = new Barnowl();

barnowl.on("raddec", function(raddec) { /* Handle the raddec */ });

// 2: Add the specific listener with relevant options
barnowl.addListener(BarnowlTcpdump, {}, BarnowlTcpdump.SpawnListener, {});

Example: reelyActive hardware & tcpdump

barnowl supports multiple simultaneous listeners and will mix decodings of the same transmission from different sources provided that the enableMixing feature is enabled. For instance, the reelyActive Owl-in-One combines a BLE and WiFi source.

const Barnowl = require('barnowl');
const BarnowlReel = require('barnowl-reel');       // 1: Include each of the
const BarnowlTcpdump = require('barnowl-tcpdump'); //    interface packages

let barnowl = new Barnowl({ enableMixing: true });

barnowl.on("raddec", function(raddec) { /* Handle the raddec */ });

let uart = /* */; // In this case the uart is an emitter of 'data' events

// 2: Add the specifics listener with relevant options
barnowl.addListener(BarnowlReel, {}, BarnowlReel.EventListener, { path: uart });
barnowl.addListener(BarnowlTcpdump, {}, BarnowlTcpdump.SpawnListener, {});

Options

barnowl supports the following options:

Property Default Description
enableMixing false Mix together decodings from the same transmitter
mixingDelayMilliseconds 1000 Maximum time for any decoding to spend in the mixing queue
minMixingDelayMilliseconds 5 Minimum time to delay between subsequent queue managements
encodeRaddecs false Output raddecs as hex strings rather than as JSON
acceptFutureRaddecs true raddecs with future timestamps are adjusted to current time and accepted, else rejected

In most use cases, enableMixing should be set to true except under extreme memory constraints and/or when absolutely no processing delay can be tolerated. Mixing decodings into a single raddec provides lossless compression and promotes efficient data distribution and processing.

let barnowl = new Barnowl({ enableMixing: true }); // Recommended

barnowl logo

What's in a name?

The Barn Owl has the best hearing of any animal tested. Since this middleware is effectively listening (via hardware 'ears') for all the wireless devices in a Smart Space, barnowl would seem a more than fitting name. Moreover, Wikipedia introduces the Barn Owl as "the most widely distributed species of owl, and one of the most widespread of all birds". An ambitiously inspiring fact considering our vision for a global crowdsourced infrastructure of Wireless Sensor Networks in the Internet of Things (IoT).

Don't think we can top that? Well check out this quote: "the barn owl is the most economically beneficial species to humans". Yes, apparently the U.S. Fish and Wildlife Service is prepared to argue so. Too ambitious? Well, consider this quote from Jeremy Rifkin: "What makes the IoT a disruptive technology in the way we organize economic life is that it helps humanity reintegrate itself into the complex choreography of the biosphere, and by doing so, dramatically increases productivity without compromising the ecological relationships that govern the planet."

Can a few hundred lines of server-side Javascript known as barnowl really live up to that? Owl we know is it can tyto do its nest!

Project History

barnowl is reelyActive's original open source package, which, when initially released in 2014, decoded wireless packets specifically from reelceivers. As third-party hardware became available, and technologies such as Bluetooth Low Energy emerged as global standards, barnowl evolved into the vendor-and-technology-agnostic middleware it is today.

barnowl v1.0.0 was released in January 2019, superseding all earlier versions, the latest of which remains available in the release-0.4 branch and as [email protected] on npm.

Contributing

Discover how to contribute to this open source project which upholds a standard code of conduct.

Security

Consult our security policy for best practices using this open source software and to report vulnerabilities.

Known Vulnerabilities

License

MIT License

Copyright (c) 2014-2022 reelyActive

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].