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

node-red-contrib-sentilo

v0.5.1

Published

A Sentilo/Thingtia platform server nodes collection for node-red

Downloads

32

Readme

node-red-contrib-sentilo

What is it?

node-network-contrib-sentilo is a collection of nodes for Node-RED that brings you the possibility to connect to a Sentilo or Thingtia platform server in order to interact with your data in a simple way.

Install

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

$ npm install node-red-contrib-sentilo

Usage

Package adds 4 nodes to the Node-RED's palette that provide basic interactions with a Sentilo / Thingtia platform server: retrieve, publish and subscribe to data and platform events.

Retrieve Node

Retrieves data from the platform server.

Data types

Possible data types to retrieve are:

  • ALARM
  • ALERT
  • CATALOG
  • DATA
  • ORDER
  • SUBSCRIBE

Depending of data type, you will be able to fill some extra filter parameters, such like limit number of observations, or from/to observations publish dates.

Input / output

This node must be triggered by plugging an inject node in the input. Node will output the returned Sentilo message as well as the HTTP status code, in two separate outputs.

Publish Node

Publishes data to the Thingtia / Sentilo platform server.

Data types

You can publish data of types:

  • ALERT
  • CATALOG
  • DATA
  • ORDER
Input / output

This node must be triggered via an inject node on the input (event might either be empty or might contain a JSON payload input message). Node will output the returned Sentilo message (if any) as well as the HTTP status code, in two separate outputs.

Subscribe With Endpoint node

Creates a HTTP endpoint that will use Sentilo to forward its event messages. Your Node-RED instance has to be therefore reachable from your Sentilo instance. Also creates a subscription to a Sentilo/Thingtia platform server via API. Possible data types are:

  • ALARM
  • DATA
  • ORDER This node is an all-in-one Sentilo subscription feature. It is ideal if you need to subscribe to single channel (be it one data type, one sensor, one provider etc).
Input / output

No input - the Subscribe With Endpoint Node is activated on Node-Red flow deployment. At this moment it creates the HTTP endpoint, as well as it creates or re-creates the subscription. Outputs:

  • First output returns the retrieved subscription notification messages.
  • Second output returns Sentilo response message of the subscription creation call (executed only once on each deploy)
  • Third output returns Sentilo HTTP status code of the subscription creation call (executed only once on each deploy)

Subscribe Without Endpoint node

At a difference with the previous node, this node only creates a subscription to a Sentilo/Thingtia platform server via API. Another HTTP have to be used as callback URL, for example "Http In" node of even "Subscribe With Endpoint". Possible data types are:

  • ALARM
  • DATA
  • ORDER This node is created for bulk-manage the subscriptions. It can be parametrized by properties in the incoming msg object.
Input / output

The Subscribe Without Endpoint Node has one input and expects given properties in the msg object.

  • First output returns Sentilo response message of the subscription creation call
  • Second output returns Sentilo HTTP status code of the subscription creation call

Related documentation

Please, feel free to look into the official Sentilo/Thingtia documentation to get more info:

Revisions

  • 0.5.1
    • Sentilo/Thingtia API token in plaintext. Environment variable use encouraged.
  • 0.4.0
    • Compatibility with Node-RED's environment variables
  • 0.3.0
    • Added the 'subscribe-without-endpoint' node
    • The 'subscribe' node renamed to 'subscribe-with-endpoint'
  • 0.2.0
    • Node-RED 1.0 compatibility
    • Fixed server configuration, allowing non-standard ports
    • All nodes get specific outputs with HTTP status of the Sentilo REST API call. Can be useful for handling errors.
  • 0.1.5
    • Solved some litle visual issues
  • 0.1.4
    • Added one dependency, that add support to old node.js versions
  • 0.1.3
    • Added one dependency
  • 0.1.2
    • Added catalog support to the publish node
    • Modified the format of the response message in case of error in the connection to the platform, now the payload and the error message returned are shown
  • 0.1.1
    • Fixed some errors in the connection and data processing
  • 0.1.0
    • First version