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

thunderboard-ble

v0.1.2

Published

A library to help reading/writing characteristic and service values with Silicon Labs Thunderboards using JSON configurations for quick and easy setup.

Downloads

6

Readme

thunderboard-ble

by: Ryan Rutan

A Node.js library to assist with the reading of data from the following Silicon Labs products.

Note: This code was pulled out of a project and converted into an npm module. It still has a lot of refactoring and features to be added to make it complete, but in it's state ... it does a good job at auto-subscribing to Thunderboard data-events for processing. Pull requests and feedback are always welcome; however, time to maintain this library is limited ... so patience is appreciated. So hope you enjoy. =)

Install

npm install thunderboard-ble --save

Usage

Below is an example use of this library.

  • config - JSON map of ble devices by MAC address.
  • dataCallback - Function to handle callbacks as defined by readIntervals in the config
  • normalizeData (optional)- [true|false (default)] Used to interpret the raw data values and convert them to clean measurement values.
    var config = {
        "000b5bbbaaaa" : {
         "uuid" : "000b5bbbaaaa",
         "enabled" : false,
         "family" : "thunderboard",
         "type" : "react",
         "autoconnect" : true,
         "readIntervals" : {
           "environment" : {
             "humidity" : 15000,
             "temperature" : 15000,
             "uv" : 15000
           },
           "ambient-light" : {
             "ambient-light" : 15000
           }
          },
         "services" : {
           "generic-access" : ["device-name"],
           "device-info" : ["manufacturer"],
           "environment" : ["humidity","temperature","uv"],
           "ambient-light" : ["ambient-light"]
        }
      }
    };

    var dataCallback = function(data) {
      console.log('Thunderboard Event',data);
    };

    var normalizeData = true;

    var ThunderBoard = require('thunderboard-ble');
    var tb = new ThunderBoard(config,dataCallback,normalizeData);

Service / Characterstic Names

Thunderboard React

| Service | Characteristics | |--- |:-- | | generic-access | device-name, appearance | | generic-attribute | service-changed | | device-info | manufacturer, model-num, hardware-revision, firmware-revision, system-id | | battery | battery-level | | environment | humidity, temperature, uv | | ambient-light | ambient-light | | cycling-speed-cadence | csc-measurement, csc-feature, sc-control-point | | acceleration-orientation | acceleration, orientation, control-point, | | automation | digital, characteristic-format, num-digitals |

Thunderboard Sense

Note: I have not mapped all the Sense services/characteristics yet, but will complete in the near future.

| Service | Characteristics | |--- |:-- | | generic-access | device-name, appearance | | generic-attribute | service-changed | | device-info | manufacturer, model-num, hardware-revision, firmware-revision, system-id | | battery | battery-level | | environment | humidity, temperature, uv, ambient-light, microphone | | cycling-speed-cadence | csc-measurement, csc-feature, sc-control-point | | acceleration-orientation | acceleration, orientation, control-point, | | automation | digital, characteristic-format, num-digitals |