npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

thing-it-device-ibeacon

v0.2.3

Published

[thing-it-node] Device Plugin for iBeacon Devices.

Downloads

56

Readme

thing-it-device-ibeacon

NPM NPM

[thing-it-node] Device Plugin for iBeacon

This allows you to configure distributed iBeacons together with other devices by means of thing-it-node and thing-it.com.

You may react to low battery levels and initiate workflows to exchange those.

You can also use the BLE functionality of the Gateway Computer hosting the iBeacon Device to run a "built-in", virtual beacon (without additional hardware) on that Gateway Computer for which you can specify UUID, Major, Minor and Measured Power.

Additionally, a Beacon Scanner Device is provided, which allows you to report arbitrary scanning events for beacons. Combining the rssi values for those and the position of - possibly multiple - of the Beacon Scanner Devices configured for distributed Gateways with a well-defined position will allow you to perform "tracking of everything".

In addition to using the gateway computer as a beacon scanner, you can also use scanners from BlueUp. To distinguish between gateway and BlueUp, use the scannerType Property: 0 stands for built-in, 1 for BlueUp. Other properties that are needed for BlueUp Scanners:

  • IP adress
  • update frequency (i.e. how often data is requested from the BlueUp API)

Installation

Installation of NodeJS and [thing-it-node]

First, install nodejs on your computer (e.g. your PC or your Raspberry Pi).

Then install [thing-it-node] via

npm install -g thing-it-node

Initialization and Start of [thing-it-node]

The [thing-it-device-ibeacon] Plugin is installed with [thing-it-node], hence there is no need to install it separately.

The Plugin supports Autodiscovery, hence you only have to create a directory in which you intend to run the configuration, e.g.

mkdir ~/ibeacon
cd ~/ibeacon

and invoke

tin init

and then start [thing-it-node] via

tin run

Install the thing-it Mobile App from the Apple Appstore or Google Play and set it up to connect to [thing-it-node] locally as described here or just connect your browser under http://localhost:3001.

Configuration

Beacon

You may measure the RSSI in 1, 3 and 5 meters distance (e.g. via your Beacon App) and provide the measured values via Measured Power (1m), Measured Power (3m) and Measured Power (5m).

This will allow for more accuracy in indoor positioning algorithms.

If you are running a virtual beacon on your Gateway, Measured Power (1m) has to be set. Default is -50dB.

With Surpress Threshold you can define a value for the RSSI below which no beacon events will be published.

Beacon Scanner

  • Cumulation Interval (cumulationInterval) - interval after which cumulated ranging data are submitted independently of all other settings
  • Ranging Interval (rangingInterval) - interval after which data on a new beacon ranging event is submitted independently of the RSSI change
  • Event Interval (eventInterval) - interval after which data on a new beacon ranging event is submitted independently of the RSSI change
  • RSSI Threshold (rssiThreshold) - threshold for the difference in the RSSI in dB for which a new beacon ranging event is submitted
  • Exclude Filter (excludeFilter) - regular expression filter applied against the UUID/major/minor string to generally exclude beacons from creating events and being counted
  • Include Filter (includeFilter) - regular expression filter applied against the UUID/major/minor string to generally include beacons (all others are excluded) to creating events and being counted
  • Count Interval (eventInterval) - interval for which the count of distinct beacons seen is calculated and submitted

Setting state variable ignoreRangingThrottling allows to ignore the settings for eventInterval and rssiThreshold.

User Interface

The UI for iBeacon Devices shows as follows.

The proximity values are those for the Gateway computer running [thing-it-node] and the Bluetooth Adapter connecting to the iBeacon.

Using the Beacon Scanner on a Gateway Computer as well as real or virtual beacons you can use thing-it.com to perform tracking of users with smart phones (if they are allow you to do so) and equipment (with a beacon attached to it).

Where to go from here ...

After completing the above, you may be interested in