IBM/ibm-cloud-functions-serverless-iot-openfridge

Name: ibm-cloud-functions-serverless-iot-openfridge

Owner: International Business Machines

Description: Improving customer service with IoT diagnostics and serverless, event-driven analytics. Highlights the Watson IoT Platform and Apache OpenWhisk powered by IBM Cloud Functions.

Created: 2016-10-06 19:00:08.0

Updated: 2018-05-17 06:10:30.0

Pushed: 2018-05-24 07:14:53.0

Homepage: https://developer.ibm.com/code/patterns/power-smart-fridge

Size: 504

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Read this in other languages: ??, português.

Build Status

Proactive customer service with Apache OpenWhisk on IBM Cloud Functions and the Watson IoT Platform

This project demonstrates serverless technology - powered by Apache OpenWhisk on IBM Cloud Functions - in a smarter home scenario where appliances send diagnostic readings to the cloud for analysis and proactive maintenance.

The application integrates the Watson IoT Platform, OpenWhisk, and IBM Code services in an event-driven use case driven by those status messages from Internet-connected appliances.

This highlights the serverless programming model and discusses the benefits of this approach relative to traditional cloud development for handling IoT workloads. For more background, check out the developer story on IBM Code.

You should have a basic understanding of the OpenWhisk programming model. If not, try the action, trigger, and rule demo first. You'll also need a IBM Code account and the latest OpenWhisk command line tool (wsk) installed and on your PATH.

If you're just interested in the OpenWhisk package for Watson IoT MQTT integration, you can find that in its own package repository.

Project OpenFridge

Components
Improving customer service with IoT device driven analytics

The Internet of Things enables manufacturers and their customers to make more efficient use of hardware devices by attaching them to a network. Software running on a device can be paired with analytics in the cloud to improve the quality of customer service and lower the cost of maintenance for consumer and manufacturer alike.

In this use case an appliance manufacturer proactively manages diagnostic events from machines in a customer's home. A network-connected refrigerator can report that it needs a part serviced (such as a water filter in need of replacement because its filter life reading is low). These message events can trigger analytics logic to send alerts (such as that a replacement part was automatically ordered because the customer was still within the covered warranty period).

Event-driven computing based on a serverless architecture is a compelling programming model for IoT because it offers the following key benefits to the developer:

The diagram below shows how a solution built on the Watson IoT platform and OpenWhisk can enable this connected home use case and provide the benefits of a serverless architecture.

High level diagram

Primary workflow

A refrigerator periodically sends diagnostic readings to a cloud service indicating the status of its parts. It might send these only when certain threshold is breached (using edge analytics) or allow a cloud service to determine a normal range for all readings it receives (cloud analytics).


"appliance_serial": "aaaabbbbcccc",
"part_number": "ddddeeeeffff",
"reading": "15",
"timestamp": 1466632598

Supplementary workflows
Bringing it all together

These workflows come together to demonstrate an end-to-end scenario that can improve customer service with OpenWhisk, IBM Code, and Watson services.

Triggers and actions

Running the sample application
  1. Set up the IBM Code services (Cloudant, SendGrid, Watson IoT, and a Cloud Foundry app).
  2. Set up the OpenWhisk actions, triggers, and rules.

Learn more

License

Apache 2.0


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.