Taxonomy Icon

IoT

Develop an IoT app with Node-RED and Watson

Get the code View the demo

Summary

Build an IoT project. Expand it into a fully functional business application. Use PaaS services and leverage the Watson IoT platform to proactively maintain it. This code pattern creates a simulated motor and uses the Watson IoT Platform to monitor commands that you send to the motor. It processes commands like start, stop, accelerate. Use the IoT Platform dashboard to continuously monitor and persist the device data by using a Cloudant database.

Description

Whether you are part of an enterprise or startup company, you’ll likely find an occasion where your team needs to start with a proof-of-concept similar to the conveyor belt code pattern.

You have the option of using any device with the Node-Red web page application that gives you the ability to visualize incoming data. This pattern takes you step-by-step through the process of simulating a device connected to the Watson IoT Platform.

Try to pick a real device of your choice to connect to the app from the sensor, gateway, microcontroller, etc. The data will stream from the device to the platform. You can check the chart in IBM Cloud to see the real-time streaming and then perform analytics sampling to identify trends and anomalies. This is a perfect approach for maintaining devices.

You have the option of replicating this application outside of Node-RED. To see how, visit the sister pattern.

Flow

flow

  1. Create and deploy a Node-RED instance on IBM Cloud and connect it to the Watson IoT Platform by using the Cloud Foundry CLI.
  2. Build and deploy the simulate-iot sample app (copy and paste the JSON flow into the app editor).
  3. Save device data by using the Watson IoT Platform dashboards and Cloudant.
  4. Inject IoT data into the IoT Platform.
  5. Monitor and visualize device data by using the Watson IoT Platform dashboards.