Catalog npm
Back to packageRELEASE DETAILS

0.0.5

npm

2jcie-ble-decode

A simple package to decode the data frames sent by the 2JCIE-BU sensor from Omron

2jcie2jcie-buarchetypeomron
Published12 Jun 2020
Direct dependencies5
Transitive dependenciesNot calculated

README

Current package documentation

2jcie-ble-decode

A simple package to decode the data frames sent by the 2JCIE-BU01 sensor from Omron

Description

This package will allow for easy BLE interfacing with the 2JCIE-BU01 sensor from Omron. There are similar sensors that may also work, but are not tested.

There's no support (in this package) for reading data via USB.

Setup

This package is capable of decoding both "Sensor Data" and "Calculation Data" message types. The sensor only transmits "Sensor Data" by default, but you can use Omron's mobile app to configure it to send both.

PlatformApp Link
App StoreENV Monitor
Google PlayENV Monitor

Usage

  1. Install the package with npm i --save 2jcie-ble-decode
  2. Require the dependency
  3. Instantiate the dependency with optional configuration
  4. Register event handlers
const Sensor = require('2jcie-ble-decode');
const sensor = new Sensor();

(() => {
    // Listener for all events
    sensor.on('event', (data) => console.log(data));

    // Listeners for specific event types (options are 'calculation' and 'sensor')
    sensor.on('calculation', handleCalculationData);
    sensor.on('sensor', handleSensorData);

    // Listener for error events
    sensor.on('error', handleErrors);

}) ();

Configuration

The constructor accepts an options object which can be omitted to accept defaults:

const sensor = new Sensor();

You can provide an options object parameter to the Sensor() constructor as follows:

const sensor = new Sensor({
	// Activate test mode, which doesn't require Bluetooth hardware or a sensor. 
	// You will receive alternating sample "sensor" and "calculation" events ever 1s
	// Sample events defined in ./mock/example.js
    testMode: false, // defaults to false
    
	// Activate the whitelist.  Ignore any events not originating from one of these addresses
    whitelist: [ 'yourSensorMAC' ], 

	// If omitted, a Barnowl instance will be created and register the BarnowlHci listener
	// Use this if you already have a Barnowl instance in your project and you just want to
	// add the ability to process Omron data frames.
    barnowl: existingBarnowlInstance,
    
    // Minimum number of seconds to wait before emitting another reading.
    interval: 5

});

Output

Output will be in the following format:

'sensor' Event Type:

{
    "dataType": 3,
    "sequenceNumber": 54,
    "temperature": 23.97,
    "relativeHumidity": 49.25,
    "ambientLight": 361,
    "barometricPressure": 1018.602,
    "soundLevel": 51.58,
    "eTVOC": 25,
    "eCO2": 565,
    "messageType": "sensor",
    "temperatureF": 75.146,
    "deviceId": "d13e50866f01"
}

'calculation' Event Type:

{
    "dataType": 3,
    "sequenceNumber": 54,
    "discomfortIndex": 70.36,
    "heatStrokeRisk": 20.26,
    "vibration": 0,
    "siValue": 0,
    "peakGroundAcceleration": 0,
    "seismicIntensity": 0,
    "accXAxis": 894.3,
    "accYAxis": 6305.9,
    "accZAxis": 6249.9,
    "messageType": "calculation",
    "deviceId": "d13e50866f01"
}

Resources

OMRON 2JCIE-BU01 Manual: https://omronfs.omron.com/en_US/ecb/products/pdf/A279-E1-01.pdf

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
advlib
Environment
{
  "local_name": "advlib",
  "alias": false,
  "peer_metadata": null
}
^0.1.4runtime
barnowl
Environment
{
  "local_name": "barnowl",
  "alias": false,
  "peer_metadata": null
}
^1.1.0runtime
barnowl-hci
Environment
{
  "local_name": "barnowl-hci",
  "alias": false,
  "peer_metadata": null
}
^0.2.1runtime
binary-parser
Environment
{
  "local_name": "binary-parser",
  "alias": false,
  "peer_metadata": null
}
^1.6.2runtime
events
Environment
{
  "local_name": "events",
  "alias": false,
  "peer_metadata": null
}
^3.1.0runtime

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-go7eyZ7rOs3JYzn5hFdn7kHp5pyYOPuBee/17p7t/0gmFSh5X3Xa/ca5u4DnE6EC+8BV6bUHaw597QNHUNNi9g==",
  "shasum": "83bf3387d7838af01ee97f75c8305ee0c42631f1",
  "tarball": "https://registry.npmjs.org/2jcie-ble-decode/-/2jcie-ble-decode-0.0.5.tgz",
  "fileCount": 6,
  "unpackedSize": 14345,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe49F9CRA9TVsSAnZWagAAd3UP/1mBoH+ZQN+LtVDwSSJ0\nff/YNTzQv3TBX90jXprRuhRQes6Zgj5sldGcr9MVPnDu1aGl6FAh7leXFFRd\nwRCtNuJ+2ADPxwxBIjCqxhR1YQdkGx2885WwtTDChCQ3s/gfVn6gTtjAMa5Q\n2aAEoYxm7cusbzQVLToIJpZlj1iFVW8q8DKCtUZ2sIBNlVW9EE/LIyl6wKaZ\nzC90iq6Owi8oV1chh1l6WcLq3Z9XdZKCoiTgAa3AJx0M/ZFcQC1xnTti8HkU\n07ay1tXkQVeCzUqHskcaUXZdeTJg5bYzwk7BQwvxjFX6AGrGi+Mm/WECPjvv\nXl3O9zESgaoxKO2ZY8EEnYlC7eK7Xko7rEFkOh4IN68SAvlVwnmq9jwcKC2/\n4Nlrr/DZoRy/A+cBDs1fMzWwALIDDrEJnyq4USVfufIC0dCFtsSQ2oo1SNIp\nYsx7KNmRaHMei2unqgowzGC/dTvmTwqJzdcJWtgiO54AWkc1eJItGepHGDRg\n19vUhEqnsJwwu3jMu5U4aN06q4iPMDloYbmm43kYnJEUCi/3sfbZPoCfoMLl\ntqa8TjRAJBYy3zXJsBfT/QtD9gBxqijP/qXCc1HOcanr4exlxQkSPxAd0Dne\nJ4dVbnn88Dy0QkbgFdC3tsnsfI7a+vWDXsxaNASRkHQUN10zg7oezN8xHmtv\nH6C3\r\n=x9EP\r\n-----END PGP SIGNATURE-----\r\n",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQDemaVMnI6yRJ0r5i+gb3EJXiQDhGU90UGay6Z9d4n1zQIgFVWtLOhIrA5hqKsnEwM0y8fHxl/RWaxmXwsf+FE42Hs="
    }
  ]
}

Repository

PENDING
archetypesc/2jcie-ble-decode

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:14 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:48aa69ae5d8fdf5deeb096fbb0e911e2b6a03aa96997cc5b5a9cffa584633975

Other collected versions

0.1.015 Jun0.0.712 Jun0.0.612 Jun0.0.411 Jun0.0.311 Jun0.0.211 JunView all collected versions →