IoT

Adding a new node type to Node-RED

Node-RED in BlueMix
Node-RED in BlueMix

Adding a new node type to Node-RED

In my post I introduced Node-Red application where you can use nodes in your Node-Red flow. Today I am going to show how you can install new nodes and deploy it to your application on Bluemix.

Adding a new node type to Node-RED: follow the steps below:

 

ONE: visit Network Package Manager and search your package. NPM makes it easy for JavaScript developers to share and reuse code, and it makes it easy to update the code that you’re sharing.

Adding a new node type to your Node-RED flow application on Bluemix
npm package manager for JavaScript

TWO: search your package, for example Watson developer cloud to use IBM Watson APIs directly on node.js / node-RED environment:

search package on npm
search package on npm

THREE: click on git-hub link repository and download the package:

download package from github
download package from git-hub

FOUR: access to your node-RED application dashboard on Blue-mix

node-RED application dashboard ob Bluemix
node-RED application dashboard ob Bluemix

FIVE: click on EDIT CODE to work with DevOps environment and import the package in to nodes directory:

add package to nodes in DevOps environment
add package to nodes in DevOps environment

SIX: edit package.json configuration file to add the new imported package definition:

edit package json configuration file
edit package json configuration file

SEVEN: redeploy the application using the play button in previous DevOps environment.

 

Based on package installed type you should be able to use new package in bluemix-settings.js by require directive

require watson-developer-cloud package

so you can use the new APIs in any function node

Watson APIS in node-RED function node
Watson APIS in node-RED function node

otherwise¬†if the new node can be used directly by its graphical shape you will able to see it in node’s menu, for example I added the freeboard and emoncms nodes, two web dashboard nodes usefully to visualize graphically the IoT sensor data:

node-RED new custom nodes
node-RED new custom nodes

 

All comments are welcomed !

 

Tags

Related Articles

5 Comments

  1. Hi, I tried to install your cronofy package, I got error during the application re-deploy, did you test my procedure with a different package ?

  2. Hello, can you please help me with Step 5 above, I am trying to add the cronofy (https://github.com/warbrett/node-cronofy) node to my node-red instance on BlueMix but am failing to do so after I then add it to bluemix-settings.js. What exactly I need to upload to the GIT? I am currently just unzipping the package from NPM and jsut uploading it to BlueMix in the nodes folder. Thanks for the help

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close