Taxonomy Icon

IoT

Power your smart fridge to request replacement parts

Get the code View the demo

Summary

The Internet of Things (IoT) enables manufacturers and their customers to make more efficient use of consumer appliances by connecting them to a network of other appliances and diagnostic services and support. IoT-enabled appliances and devices, together with their on-board software, pair with analytics in the cloud to improve functionality and lower the cost of maintenance. The appliance lasts longer and provides a simpler, more positive user experience.

Description

This developer code pattern shows the power of serverless, event-driven architectures to support a cloud analytics workflow that provides better customer service for smarter home appliances. We demonstrate an edge-to-cloud scenario that integrates the Watson IoT Platform, OpenWhisk, and IBM Cloud services. It’s important to know how to maximize the full benefits of your IoT-enabled appliances because this emerging type of application design is becoming the standard.

In this scenario, a network-connected refrigerator sends status messages about its parts to the Watson IoT Platform service in IBM Cloud. The Watson IoT Platform triggers actions in OpenWhisk to analyze the message content and determine whether a part requires replacement. If a part requires replacement, the warranty status of the appliance is checked. If the part is under warranty, a replacement is automatically ordered and an email notification is sent. If the part is no longer under warranty, a pending order is created and a request for authorization of payment is issued.

Flow

flow

  1. The refrigerator periodically sends an MQTT message with a JSON payload to the Watson IoT Platform service on IBM Cloud.
  2. The message triggers a piece of business logic, called an action, that is written in JavaScript to execute on the OpenWhisk platform.
  3. The first action analyzes the message to see whether, for example, the filter life reading is within an acceptable range. If the reading is normal, no further processing is done, which provides a highly efficient and cost-effective workflow. If the part needs to be replaced, the action creates a service report in a Cloudant database.
  4. Another action, which is triggered by the creation of that new service report, looks up the customer and appliance registration information to determine whether the appliance is under warranty. If it is under warranty, the action automatically orders the replacement part and sends an email notification about the status of the appliance to the customer. No further customer input is needed. If the appliance is not under warranty, a pending order is created and a payment authorization request is sent to the customer. When payment is authorized, the pending order is automatically sent for completion.
  5. A final action alerts the customer by email about the status of the appliance. This action is triggered by the creation of the replacement part order. When the appliance warranty is within 30 days of expiring, an overnight batch job triggers an email notification to alert the customer that the warranty is about to run out.

Instructions

Find the detailed steps for this pattern in the README.