Access to IoT Platforms Services
Users must develop the nodes to access to their IoT Platform services and applications. Once they have developed a node, then they will have it available to create flows between different services using the Modeller component.
IoT platforms provide an API to access to their services. They offer a REST APIs or other alternatives like SOAP Web Services, programming libraries or wrapping their information to access to it. In order to create a mecanism to make the access to the services compatible with Node-RED the users need to develop pieces of code to wrap the functionalities of these services. This task is done taking advantage of their available API. The pieces of code are a set of nodes. These nodes provide the mechanism to access and interact with the IoT service.
A node needs input parameters and offer output information. It executes a series of internal processes in the application that is calling. The interaction between the different nodes will be defined by an execution flow, which is the one that defines and manages this interoperability process between services.
Paying attention to technical issues, a node consists in a JavaScript file that runs in the Node-RED service, and an HTML file consisting in a description of the node. The description appears in the node panel with a category, colour, name and an icon, code to configure the node, and help text. Nodes can have at most one input, and zero or more outputs. During the initialization process, the node is loaded into the Node RED service. When the browser accesses the Node RED editor, the code for the installed nodes is loaded into the editor page. Node RED loads both HTML for the editor and JavaScript for the server from the node packages.

Steps to wrap funcionalities of IoT service in a node
The following steps guarantee to users and developers to have available all their services in the framework that offers the Node-RED tool and ready to start to design flows of interoperability between them.
These are the steps to wrap a service using a node:
- Analysis of the service:
- Development or access to a functional instance of the IoT platform.
- Get access to the services that the platform offers.
- Deploy or access an instance of the service.
- Test the service with data.
- Analyze the functionalities offered by the service.
- Study the API that provides the service.
- Document the functionalities and APIs.
- Analyze the methods of access and execution of these functionalities.
- Analyze the messages or actions that return the execution of the functionalities of the service.
- Node Implementation:
- Group the functionality of the service, to choose the number of nodes and how they will be the nodes that implement it.
- Identify the parameters needed to access the service.
- Creation of configuration nodes. For example, they store the connection variables.
- Create the interface that collects the parameters that will consume the service. (html)
- Create the code that will execute the functionality (JavaScript).
- Define the messages that the node sends and receives.
- If it is possible attach an instance of the service in docker.
- Test:
- Access to the node with real data.
- Test the correct operation.
- Fix bugs and catch errors.
- Documentation:
- Document about how to deploy service with real data, to have examples of operation.
- Document about the characteristics of the node