2021 Call for Code Awards: Live from New York, with SNL’s Colin Jost! Learn more

Archived | Build an asset lifecycle and location tracking app with blockchain and IoT

Archived content

Archive date: 2021-06-09

This content is no longer being updated or maintained. The content is provided “as is.” Given the rapid evolution of technology, some content, steps, or illustrations may have changed.


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 updateAssetLocation transaction.



  1. The smart contract is deployed to a local Hyperledger Fabric network via the IBM Blockchain Platform extension for VS Code.
  2. 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.
  3. 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.
  4. An application listening to the IBM Watson IoT Platform for scanning events then invokes a transfer transaction.
  5. The location of the asset is updated in the ledger automatically.


Find the detailed instructions for this pattern in the README file.