Build an IoT app and IoT dashboards with Watson IoT Platform and Node-RED to analyze IoT data sent from a Blockchain network

Summary

With this pattern, you build an IBM Cloud IoT app that inserts incoming values from a Blockchain application into a Cloudant database and that sends events to Watson IoT Platform. The data is analyzed in the Node-RED application and then posted to the Node-RED dashboard and the Watson IoT Platform dashboard for your IBM Cloud IoT app. You can choose which dashboard best serves your purpose.

Description

To understand a set of transactions in a Blockchain network without having to access the Hyperledger network, you can build an IoT app and IoT dashboards that can display and analyze the data. The IoT app organizes the users and receives values from the transactions. The IoT app registers users as devices, takes the generated values (such as steps), to provide an overall count of the values and transactions across the users. The IoT app parses the incoming Blockchain blocks and filters the users and its data based on whether the user already exists in the database. If the user exists, its data is passed on and analyzed, and the output is displayed on the dashboards. All of these transactions are recorded in the Cloudant database.

Flow

Blocks are sent as JSON objects from the Hyperledger Blockchain Network. The blocks are users and their data.

The blockchain transactions (create a user, validate a user, generate fitcoins based on steps) and the user data are stored in the Cloudant database of the IoT app in IBM Cloud. Users are registered as devices in Watson IoT Platform.

Use either the Watson IoT Platform dashboard or the Node-RED dashboard to view and analyze the IoT data.

Instructions

Find the detailed steps for this pattern in the README. The steps will show you how to:

Create the IoT app. Make sure you have the Cloudant service and Internet of Things service created and binded to your IBM Cloud app instance.

Import the JSON file into Node-RED.

Create the Node-RED dashboard, if the import did not automatically create it. You can use the Node-RED dashboard instead of or in addition to the Watson IoT Platform dashboard.