@blockbax/node-red-contrib-blockbax

A set of Node-RED nodes to interact with the Blockbax Platform. Please read our documentation for more information.

Usage no npm install needed!

<script type="module">
  import blockbaxNodeRedContribBlockbax from 'https://cdn.skypack.dev/@blockbax/node-red-contrib-blockbax';
</script>

README

node-red-contrib-blockbax

A set of Node-RED nodes to interact with the Blockbax Platform. Please read our documentation for more information.

Install

Run the following command in the root directory of your Node-RED install:

npm install -s @blockbax/node-red-contrib-blockbax

Usage

There are a number of different nodes available. The first node can be used to parse measurement data to a common format which can be used by the other nodes. Once this is done, you can use nodes to aggregate the resulting measurements and send this data to our platform.

Parse

Takes a msg from another node and creates a new object that can be used by the other Blockbax nodes. You can configure what message properties represent the date, the value and the ingestion ID. There is also an option to generate a timestamp on input if the message has no timestamp property. The Parse node adds a series property to the message and sends it on input. The node has three configurable properties besides the Name property:

  • Ingestion ID: Can either be a static Ingestion ID or a dynamic Ingestion ID by changing the type to msg.
  • Date: Can either be a message property or it can be set to use the current date.
  • Value: Measurement value. Usually values are stored in the msg.payload property.

Aggregate

This node applies an aggregate function over a a specified time period. The available functions are: maximum, minimum, sum, average, downsample (using the Ramer–Douglas–Peucker algorithm). The node has three configurable properties besides the Name property:

  • Function : Aggregation function to apply.
  • Period : Time period to aggregate over.

Send

This node sends batches of measurements upon a specified time interval. The minimal frequency at which data can be sent is 1 second. The available send options are:

  • HTTP: Recommended if irregular batches of data are being collected.
  • MQTT: Recommended if the incoming data is a frequent and regular stream of data points.

The node has three configurable properties besides the Name property:

  • Project: Configuration of your project ID and access token information. You can also check the 'Use environment variables' checkbox to use the environment variables PROJECT_ID, ACCESS_TOKEN_PUBLIC_ID and ACCESS_TOKEN_SECRET instead.
  • Type: Type of connection used.
  • Batch Period: Period for which measurements are batched before they are being send.