Build an asset lifecycle and location tracking app with blockchain and IoT
Create a local Hyperledger Fabric network using the IBM Blockchain Platform extension for VS Code
Blockchain and IoT make a very powerful combination when used together. This combo allows for all parties in a business network to know exactly where an asset has been, and since the blockchain is immutable, the parties can trust that the information has not been tampered with. This pattern explores the use of a simulated IoT device built using Node-RED, which triggers events that update the current location of the asset on the ledger.
In this pattern, you will learn how to create a local Hyperledger Fabric network using the IBM Blockchain Platform extension for VS Code which makes it easy to start developing smart contracts.
The solution that you will be creating is an asset lifecycle and tracking solution that keeps a record of the asset from creation to deletion. You will also create and manage asset leases that keep track of the terms in a lease agreement, such as end date, price, and deposit amount.
For the IoT integration, you will leverage the IBM Watson IoT Platform to handle device scanning at various locations as the asset is being transferred. Instead of having an actual physical device, you will create a web app that pretends to be a device that triggers these scans and notifies a local Node.js app to invoke the
- The smart contract is deployed to a local Hyperledger Fabric network via the IBM Blockchain Platform extension for VS Code.
- As the asset is moved from place to place it is scanned via RFID or barcode by an IoT device. In this pattern, the device is simulated.
- The IoT device publishes an event notification to the IBM Watson IoT Platform, which then notifies all listening applications that a scan has taken place.
- An application listening to the IBM Watson IoT Platform for scanning events then invokes a transfer transaction.
- The location of the asset is updated in the ledger automatically.
Find the detailed instructions for this pattern in the README file.