IoT Seminar (Oct. 2016) Juan Perez - Microsoft

14
The IoT Developer Opportunity with Azure IoT Hub Juan J. Perez Principal Program Manager Azure IoT

Transcript of IoT Seminar (Oct. 2016) Juan Perez - Microsoft

The IoT Developer Opportunity with Azure IoT Hub

Juan J. Perez

Principal Program Manager

Azure IoT

IoT solutions are very diverse and multi-dimensional Vertical (stack) and Horizontal (flow and translation)

Device IoT Gateway Cloud Service

Physical WiFi

Physical WiFi

Physical GSM

Network

Transport

Presentation

Application

IPv4

TCP

TLS

MQTT

App Code

Physical Ethernet

Application HTTP

Cloud Platform as a Service

Network

Transport

Presentation

Application

IPv4

TCP

TLS

MQTT

Azure IoT Hub

Physical Ethernet

App Code

Network

Transport

Presentation

Application

IPv4

TCP

TLS

HTTP

Network

Transport

Presentation

Application

IPv4

UDP

DTLS

CoAP

Network

Transport

Presentation

Application

IPv4

UDP

DTLS

CoAP

Gateway App Azure IoT Gateway SDK

Different profiles of IoT developers

Device IoT Gateway Cloud Service

Azure IoT Gateway SDK App Code Cloud Platform as a Service

Azure IoT Hub

App Code

Module

Module

Module

Device Developer Gateway/Device Developer

Cloud Service Application Developer

• Embedded/sensors • Hardware aware • Firmware aware • Radio and protocol

aware

• Messaging aware • Radio and protocol

translation aware • OS aware • Embedded/Sensors • Hardware aware

• Cloud/web/mobile aware • Messaging aware • Stream processing and

machine learning aware • Line of business aware

How does Azure IoT Hub help?

• Given 1 million devices deployed world-wide, how do you find the 10 that you’re looking for? • Device twin properties • Query based on device resources in device twin • SELECT * from devices where ‘/3/0/1’ == ‘Acme Manufacturing Inc.’

• How do you read or execute on 10, 20k, or 1 million devices? • Schedule the request for the right time • Do the request • Wait for response • Track results • Deal with failures

Azure IoT Hub Device Management

Enables synchronization of (desired and reported) properties between cloud and device

Enables interactive device actions

Enables the broadcast and scheduling of twin changes and methods at scale

Enables dynamic reporting to attest device status and healt

Enables management on a diverse set of device platforms and connectivity models

Device app Back end

Azure IoT Device Twin

Device twin

Properties

Desired

Reported

Tags Read, write

Read, write

Read

Read, receive change notifications

Read, write

IoT Hub

Physical Device IoT Hub

IoT Hub Device Method

Back end application

Invoke Method Device method

handler

Request

Response

Request

Response

1 2

3 4

Physical Device

IoT Hub

IoT Hub Device Method (disconnected device) Back end application

Invoke Method Device method

handler

Physical Device IoT Hub Back end application

Invoke Method Device method

handler Device

Disconnected

Request

Response

Request

Response

1 2

3 4

Request

Response

1

2

IoT Hub

Jobs for scheduling device updates

Back end application

Schedule Update/Method • DeviceList • TwinPatch/Method • StartTime (TStart)

1

Job Update

T0

TStart

2

Physical Device Device 1

Event handler 3

Update TStart

2

Physical Device Device 2

Event handler 3

Scheduling and tracking updates against a large set of device is a non-trivial problem.

IoT Hub

Jobs for scheduling device twin updates

Back end application

ScheduleTwinUpdate • DeviceList • TwinPatch • StartTime (TStart) • MaxTimeExecution

1

Device twin Device 1

Properties.Desired

Data

Job

Twin Update

T0

TStart

2

Physical Device Device 1

Twin changed handler

Twin Changed

Event (when device

connects)

3

IoT Hub

Twin update jobs for many devices

Back end application

ScheduleTwinUpdate • TwinPatch • DeviceList • StartTime (TStart) • MaxTimeExecution

Get Job or Job Query

1

4

Query

Device twin Device 1

Properties.Desired

Data

Device twin Device 2

Properties.Desired

Data

Device twin Device (n)

Properties.Desired

Data

Job

Twin Update

Twin Update

Twin Update

T0 TStart

TStart

TStart

2

2

2

Physical Device Device 1

Twin changed handler

Physical Device Device 2

Twin changed handler

Physical Device Device (n)

Twin changed handler

Twin Changed Event

Twin Changed Event

Twin Changed Event

3

3

3

IoT Hub

Jobs for invoking device methods

Back end application

ScheduleDeviceMethod • MethodParams • DeviceList • StartTime (TStart) • MaxTimeExecution

1

Job

Invoke Device

Method

T0

2

Physical Device Device 1

Device method handler

Device Method Request at TStart*

3

* Requires device to be connected. IoT Hub responds immediately with error for disconnected device.

Device Method Response

IoT Hub

Device method jobs for many devices

Back end application

ScheduleTwinUpdate • TwinPatch • DeviceList • StartTime (TStart) • MaxTimeExecution

Get Job or Job Query

1

4

Query

Job

Invoke Device Method

Invoke Device Method

Invoke Device Method

T0

2

2

2

Physical Device Device 1

Device method handler

Physical Device Device 2

Device method handler

Physical Device Device (n)

Device method handler

Device Method Request at TStart

Device Method Request at TStart

Device Method Request at TStart

Device Method Response

Device Method Response

Device Method Response

3

3

3

LWM2M and Azure IoT

Azure IoT Gateway SDK

LWM2M Device

Azure IoT Hub LWM2M

/CoAP Protocol Module

Azure IoT

client Translation

Device twin Methods Jobs Queries

IoT Cloud Application

LWM2M

Device Twin Methods