Skip to main content

Hitachi
Contact InformationContact Information

    Highlight

    IoT technologies that use data to increase business efficiency have been attracting interest. Creating these technologies requires a framework to bring together associated systems and data, and enable rapid creation of applications. Lumada’s Digital Innovation Platform uses Node-RED as the application development environment for providing this framework. Node-RED lets developers create solutions rapidly by combining a wide range of highly functional components on-screen. This article provides an overview of Node-RED and looks at its use in developing solutions. Also presented are the OSS activities being done in partnership with the developer community.

    Table of contents

    Author introduction

    Hiroyasu Nishiyama, Ph.D.

    Nishiyama Hiroyasu

    Yutaka Nakamura

    Nakamura Yutaka

    • OSS Solution Center, Software CoE, Services & Platforms Business Unit, Hitachi, Ltd. Current work and research: Development of OSS support & solutions.

    Introduction

    Internet of Things (IoT) technologies have been attracting interest as a way to create new value by connecting various physical objects to the Internet so that information can be exchanged among them. The use of IoT technologies to bring together network-connected devices and services in a way that overcomes the barriers between systems and organizations enables greater possibilities for service and business innovation.

    Developing these types of IoT services calls for innovative improvements to applications through connections to various existing systems, data usage, and trial-and-error. The Digital Innovation Platform uses the graphical user interface (GUI)-based programming tool Node-RED*1 as a framework for helping make these improvements possible(1).

    This article provides an overview of Node-RED and looks at its use in developing solutions. It also presents the open source activities being done in partnership with the developer community.

    *1
    Node-RED is a trademark or registered trademark of the OpenJS Foundation in the United States and other countries.

    Node-RED’s Role in the Digital Innovation Platform

    Hitachi’s Lumada is designed to enable the creation of new services and technologies through collaborative creation (co-creation) with clients. The participants in these co-creation activities include specialists from a wide range of areas besides information technology (IT). So a common language understood by all the participants is needed when these experts generate ideas through trial-and-error.

    The fields of IT and operational technology (OT) have always used architectural drawings for the design and operation of large systems. While architectural drawings use many different notation formats, their basic purpose is to make the system represented easily understandable to humans by bringing together the inputs and outputs between basic function blocks to show complex and advanced functions.

    Lumada takes these architectural drawings that are easily understood by humans and turns them into live architectural drawings that can be executed immediately by a computer. It enables the drawings to be used as a common language for participants in co-creation projects. To achieve this goal, the Digital Innovation Platform has Node-RED installed in Studio (the development environment layer) and recommends the use of Node-RED.

    Overview of Node-RED

    Node-RED is a program development environment that uses highly functional components called nodes. It lets developers create applications just by combining nodes as building blocks on-screen. When using conventional program development methods, programs need to be created through the use of programming languages by expert programmers with in-depth programming knowledge. Node-RED makes it easy for even non-IT specialists to create programs by combining diagrams.

    The Node-RED software was originally developed by the IBM Hursley Laboratory in the UK. It is currently open source software (OSS) being developed as a project of the OpenJS Foundation, the organization under the Linux Foundation in charge of promoting JavaScript*2 technology. Node-RED runs on Node.js*3, a JavaScript execution environment widely used in web systems. It runs in many different environments ranging from edge devices to back-end servers. Node-RED lets developers create applications using nodes as components. About 2,500 nodes can currently be used as OSS, making it easy to implement a wide range of functions. These benefits have led a large number of companies and organizations around the world to use Node-RED for their products and services, and made it one of the de facto environments for IoT application development.

    *2
    JavaScript is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
    *3
    Node.js is a trademark of Joyent, Inc. and is used with its permission. We are not endorsed by or affiliated with Joyent.

    Integration with Container Technology

    Composable design approaches are preferable on the Digital Innovation Platform, which assists co-creation activities spanning multiple areas. For example, engineering software environments such as MATLAB*4 and ANSYS*5 are widely used for OT applications, and applications created in these environments should ideally enable use as Node-RED function blocks. The Digital Innovation Platform supports these environments by incorporating container technology. The user can develop applications in the environment they are used to, and then containerize them by adding a microservice application programming interface (API) to them. This feature makes it easy to connect applications developed in different development environments or programming languages.

    Lumada applications should also ideally be portable. For example, when creating a wide-area surveillance system by containerizing a video recognition application developed on a public cloud and sending it to edge systems located near a large number of surveillance cameras, Node-RED functions as the hub that connects the large number of edge systems.

    Various systems can be connected through Node-RED’s GUI in this way, making solutions quick and easy to implement.

    *4
    MATLAB is a trademark or registered trademark of The MathWorks, Inc.
    *5
    ANSYS is a trademark or registered trademark of ANSYS, Inc. in the United States and other countries.

    Using Node-RED to Develop Solutions

    Fig. 1—Node-RED Development Environment Fig. 1—Node-RED Development Environment Nodes are moved from the palette and placed in the workspace by a drag-and-drop operation. The node inputs/outputs are connected, and then the application is made executable by pressing the Deploy button.

    Figure 1 shows the Node-RED development environment, which is accessed and used from a web browser. Usable nodes are placed in the area on the left of the screen known as the palette. (1) These nodes are set by being placed in the central workspace with a drag-and-drop operation, and then (2) inputs/outputs between nodes are connected. A process composed of multiple nodes in this way is known as a flow. After a flow has been created, (3) it is made executable just by clicking the Deploy button at the top-right.

    Node-RED can use various nodes, such as nodes for database access or nodes for communication with the Message Queue Telemetry Transport (MQTT) protocol used for calling web APIs and exchanging information with edge devices. There are also nodes for creating dashboard screens, which make it easy to create complex GUI screens (see Figure 2). An example of solution development with Node-RED is described below. This example uses Node-RED to connect MathWorks MATLAB and Microsoft Dynamics*6 365 (see Figure 3)(2).

    In this example, vibration data obtained from machine tool sensor data is stored in a storage device and analyzed using the MATLAB numerical analysis software to predict bearing wear states. The solution analyzes the wear state prediction results and registers an incident for maintenance in Microsoft Dynamics 365 if an equipment problem is likely to occur in the near future.

    By using Node-RED to connect two systems, this example creates a new solution that links data analysis and operations.

    Fig. 2—Dashboard Screen Created Using Node-RED Fig. 2—Dashboard Screen Created Using Node-RED Node-RED comes with functions for creating graphical user interface (GUI) screens, which can be created easily by combining nodes.

    Fig. 3—Example of Solution Development Using Node-RED Fig. 3—Example of Solution Development Using Node-RED The diagram below illustrates the use of MATLAB/Simulink to predict bearing wear states in a machine tool. The results can be used to register equipment problem prediction information in Microsoft Dynamics 365 to enable smoother maintenance or other operations.

    *6
    Microsoft Dynamics is a trademark or registered trademark of Microsoft Corporation in the United States and other countries.

    Developer Community Activities

    Hitachi has been participating in Node-RED community activities since 2017, and is currently (April 2020) the second largest contributor of code to the Node-RED project worldwide. Hitachi’s participation in these community activities is guided by the following objectives:

    1. Augmenting functions required by the Digital Innovation Platform
    2. Making Node-RED internationalized by providing multilingual support in languages such as Japanese, Chinese, and Korean
    3. Improving reliability such as by fixing bugs
    4. Popularizing Node-RED by presenting at conferences, writing introductory guides, and doing public activities

    In relation to objective (1) above, the following functions have previously been proposed by Hitachi or have been developed under Hitachi’s leadership:

    • Functions for componentizing created flows
    • Functions for guaranteeing sequence processing
    • Functions enabling data being processed to be saved/restored on external storage devices
    • GUI-based dashboard layout functions
    • Functions for new definitions of dashboard components; GUI components for elements such as tables or other data displays
    • Node-RED test functions

    The benefits of these functions go beyond just improving convenience and development efficiency on the Digital Innovation Platform —they have also been given widespread publicity as a way to promote Node-RED as a de facto development environment and expand its ecosystem of users, developers, and others. Hitachi is working on this goal by actively pursuing the activities of objective (4) above, such as publishing introductory guides and exchanging information with the community.

    These community activities are being done in close contact with the Node-RED community. New function proposals are incorporating functions into Node-RED by methods such as creating design notes, discussing detailed specifications for these nodes, and reviewing code on the GitHub*7 software development platform. These processes involve working closely with the community in settings such as periodic online conferences and online video conferences made possible by the social media tool Slack*8. A venue for in-person discussion is also selected about twice per year. These discussions are a way to share issues and make designs more concrete or detailed.

    *7
    GitHub is a trademark or registered trademark of GitHub, Inc.
    *8
    Slack is a trademark or registered trademark of Slack Technologies, Inc.

    Business Use

    Hitachi has started promoting business use of Node-RED, which has been used in multiple client systems since 2018. The use of Node-RED is on the rise for operations such as plant equipment data-collecting functions and creation of in-house solution development environments. However, using Node-RED with working systems requires support, making this type of use an issue since Node-RED is community-developed OSS with no vendor support service. Hitachi has responded by training engineers through Node-RED community activities, and using them to provide support for Node-RED used in Hitachi solutions.

    Conclusions

    This article has provided an overview of the Node-RED environment that enables rapid development of IoT solutions, along with the related OSS activities Hitachi is taking part in. Platforms that enable Lumada solutions to be rapidly combined to create new value should become increasingly important as growing numbers of Lumada solutions are stored in repositories such as the Lumada Solution Hub. Hitachi will continue to work with the OSS community to improve Node-RED’s functions, make it easier to use, and establish it as a de facto development environment. The company will continue to gain the expertise needed to enable Node-RED’s use on the Digital Innovation Platform and expand the lineup of solutions.

    Acknowledgments

    The Node-RED community activities described in this article were made possible by the tireless and generous support of Nick O’Leary and Dave Conway-Jones of International Business Machines Corporation (IBM). The authors would like to express their heartfelt appreciation.

    Related information