Meeting IoT Developers’ Challenges

In my various engagements with IBM Watson IoT ecosystem partners, I meet scores of IoT developers- some who have transformed themselves into the new role coming the from hardware world, some who come from application development paradigms, and some who were erstwhile firmware developers. Whichever world they come from, IoT is a big melting pot where the hardware and software boundaries merge in the most effective way.

The IoT developer of today has to know about the hardware specs of devices, device management capabilities that the devices support, small apps that are interacting with firmware, edge software standards, protocols that are supported, and the list is never ending. Yes, the job of an IoT developer is not easy!

When developers create IoT apps, they need to take care of these new considerations while still applying some aspects of old style of programming apps. IoT use cases are so varied in nature — from cars to medical devices to turbines — that developers need easy mechanisms to simplify the complex world of IoT. Node-RED is a boon for developers as it is an easy way of visually wiring the various stakeholders in an IoT app.

Of late, node-RED developers have swelled in numbers as node-RED offers immense benefits and ease of use to all kinds of IoT developers. While using Node-RED for IBM Watson IoT Platform, the following observations have been captured by my team, and I am going to talk about the enhancements that we are doing to make it easy to make Watson IoT Platform apps using node-RED:

1. Developers have consistently expressed the need to simulate device events before the IoT app is deployed
2. Developers need a consistent and prescribed manner of visualization / dashboards- UI during development.
3. Developers want to use the client libraries for connecting to Watson IoT, within Node-RED environment, so that development of apps is made easier
4. Developers are keen to create, read, update, delete devices and device types in Watson IoT from within the Node-RED environment itself, so that they do not have to keep on switching between IBM Watson IoT and the Node-RED environments during development.

We have worked on several enhancements on Node-RED so that developers can get a better experience while developing Watson IoT apps and the creation of apps is smoother. Some of the key modifications include:

1. Device type and Device instance CRUD operations are now provided as Node-RED nodes. These are the nodes for registering the devices/gateways with Watson IoT. While developing the solution, if we need to create a device, we can use these nodes to register the devices or creating device types. Also, we can update the device metadata and remove devices from this node as well. These nodes can also be used to perform bulk device registrations.

2. Simulation mechanism is now provided in Node-RED for generating a virtual device. This is a significant add on as virtual device enables developer to simulate the behavior of a device even before its made available physically. We use these simulation nodes to create a virtual device (with device properties and events), simulate the device events, modify the properties and listening to

3. HTML Form like UI Node have been made available for generating basic UI. We use widgets from Node-RED dashboard UI to give more functionality in the hands of a developer.

4. IBM IoT App node has been modified to support shared subscription. Shared subscription functionality, as the name suggests, makes it possible for multiple applications to subscribe to same events such that only of the shared applications would receive the event.

5. Another enhancement in IBM IoT App node ( within node-RED) has been the support for binary content. Developers can now use IBM IoT App Node to transfer binary messages (as long as the size is less than 128 kB).

To show these enhancements, we created a climate control app that incorporates all the new features.

iot solution for climate control

Check out the new app in Github:
https://github.com/ibm-watson-iot/iot-climate-control-sample

With the new year, these enhancements should definitely make your life easier and raise your spirits. We are hoping you will code your way through 2017 – The year of the IoT Developer.

Have fun building IoT Apps!

5 comments on"Improving Watson IoT application development with Node-RED"

  1. This is super cool. Starting to dig in and deployed the app to bluemix. I receive this error when I open Node-RED:

    Using an unsupported version of Node.js
    You should upgrade to latest Node.js LTS release

  2. Jeffrey Dare February 06, 2017

    Hi Dave,
    Yes, the sample has been upgraded to the latest Node.js version. The sample updated on the Jan 20th has this fix. Please deploy the sample with the latest code.
    Thanks!

  3. Good example, thank you. I had difficulty following the node-red recipes.
    If it is not too much trouble, it would be good if you would create a video and walk through the node-red nodes and talk about what is going on. Otherwise it is unfortunately very difficult to understand the cool example you have created with schema, alerts, etc.

  4. I am trying to install a new node-red module:node-red-contrib-statistics in my iot-platform-bluemix (from Settings/Palette/Install), and get a generic error message:
    msg : string[107], “Error: Command failed: npm install –save –save-prefix=”~” –production node-red-contrib-statistics@1.0.1″

    Any ideas what may be going on?
    thanks

Join The Discussion

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