Processing IoT Sensor Data at platform using hosted NodeRED

Processing IoT Sensor Data

In order to process Sensor data sent by IOT Device or IOT Fog Node, vitalpointz IoT Core/Core Lite bundles its own Node RED tool. Node RED itself comprises of a visual graphical editor with drag and drop components and the back end to run the code expressed on the editor UI. Node RED in Vitalpointz IoT Core/Core Lite is pre-installed with vitalpointz’ own custom nodes that help IoT App developer to quickly view, process the messages sent by their devices.

Custom Nodes

Vitalpointz provides two custom nodes namely ‘service-in’ and ‘service-out’. Service-In Node is used to receive messages from the platform and deliver to user defined functions.

Service-Out node takes a message as input. This message is sent inside the Platform. Using Rules engine, the message can be either sent to Device or to OutPort.

Whenever a new device is registered in the platform using ‘Device Add’ process (see: Device Registration) a device decoder can be provided. The Decoder has to be implemented in this NodeRED tool using vitalpointz custom nodes.

For Example, bunch of devices are registered using ‘Device Add’ process with decoder name provided is ‘moistureproc_func’. This sets up rules such a way that whenever any of these devices sent data, the messages are routed and handed over to function named ‘moistureproc_func’.

In order to implement the ‘moistureproc_func’, user should navigate to NodeRED tab, add vitalpointz service-in component and give a name ‘moistureproc_func’. The outpout of the node can be connected to Debug node to view the data on debug panel of NodeRED.

In order to process the sensor data, drag and drop a ‘function’ node and user can input the code. This way, the messages from IoT Devices can be processed in Node RED.

Click on top right-hand corner button “Deploy” to make the code deployed and run.