SWEST21 s4b

ReButton
2019/9/6
Takashi Matsuoka

Takashi Matsuoka(@matsujirushi12)2017～ MVP for Windows Development

Wio LTE

Wio 3G「e」3つ

Wio LTE M1/NB1(BG96)

MT3620DevBoard

de:code 2019

Azure IoT Hub - Cloud Gateway -Device

DeviceCustom Protocols

Custom Cloud
Gateway(Cloud Service,VM)

Management app
Device registry/Management
Monitoring
Send commands

AMQP, MQTT, HTTPSApplications- Companion apps
- Dashboards- Controllers- …

DeviceField bus / protocol

Field
Gateway

DeviceDeviceField bus / protocol

DeviceField
GatewayAMQP, MQTT, HTTPSOPC, HTTP, CoAP,…
VPN/ExpressRoute

Custom Cloud
Gateway(CloudService, VM)

Management app
Device registry/Management
Monitoring
Send commands

Build 2018 – BRK3803 Azure IoT Platform services - The modern IoT developer toolbox

Azure IoT Hub – クイックスタート

https://docs.microsoft.com/ja-jp/azure/iot-hub/quickstart-send-telemetry-c

Azure IoT Hub – クイックスタート

https://github.com/Azure/azure-iot-sdk-c/blob/master/iothub_client/readme.md#mbed

Azure IoT Central - ハウツーガイド

https://docs.microsoft.com/ja-jp/azure/iot-central/howto-connect-devkit

エッジ

クラウド

Internet
ReButton Azure IoT Hub/Azure IoT Central 最小限のセットアップ
 低価格
 電池駆動 グローバル カスタマイズ最小限のセットアップ
Azure IoT Central
Wi-Fi 2.4G

ReButton

Wi-Fi
Access Point

Internet

Azure IoT Hub

Button LED

 Wi-Fiアクセスポイント情報
User Azure接続情報

グローバル
IoT in Action
Barcelona, Spain
Santa Clara, USA
Taipei, Taiwan
Shinzhen, China
New York, USASeoul, South Korea
Tokyo, Japan
Orlando, USA
Nuremberg, Germany
Sydney, Australia
Hanover, Germany
Taipei, Taiwan

https://twitter.com/SeeedJP/status/1051771382835634177

グローバルグローバルカスタマイズ – ハードウェアI2C Grove connector
Jumper switch
RGB LEDJTAG pads
AAA batteries

PUSH BUTTONUART for debug

カスタマイズ – ハードウェア

https://github.com/SeeedJP/ReButton/tree/master/mechanicals
https://github.com/SeeedJP/ReButton/tree/master/electronics

カスタマイズ – ソフトウェア
Image

ReButton

Debug Adapter
Image

Azure Storage

PCImageカスタマイズ – ソフトウェア
アプリケーション

ReButtonApp

https://github.com/SeeedJP/ReButtonApp

ライブラリ
ボード・プラットフォーム
Arduino IDE

SeeedJP ReButton by Seeed K.K.

https://github.com/SeeedJP/ReButtonArduinoPlatform

Communicate a Device and Azure IoT Hub
Device-to-cloud messages

Physical DeviceFile uploads
C2D messages
Direct methods

Desired properties
Reported properties

IoT HubPartition~7daysConsumerGroup
Blob Storage

Partition~2daysDeviceTwin
DesiredReportedAzure IoT SDK in ReButton
Application
DeviceClientServiceClient

Provisioning
ClientProvisioning
ServiceC shared utility

https://github.com/Azure/
azure-iot-sdk-c

Adapter
Arduino API

Azure IoT C SDKs

Mbed API
WiFiInterface

Azure IoT Device Client API
IoT Hub接続先を指定：
IoTHubClient_LL_CreateFromConnectionString()

ConnectionStateCallbackFunc

D2Cメッセージを送信：
IoTHubMessage_CreateFromByteArray()
IoTHubClient_LL_SendEventAsync()

SendEventCallback

DeviceTwinのReportedを変更：
IoTHubClient_LL_SendReportedState()

DeviceTwinReportCallbackFunc

DeviceTwinのDesiredの変更通知を受ける：
IoTHubClient_LL_SetDeviceTwinCallback()

DeviceTwinCallbackFunc

https://github.com/SeeedJP/ReButtonApp/blob/master/ReButtonClient.cpp

IoT Central
Measurements

Physical Device

Telemetry
D2C
messages

State

Data Export
Rules

DesiredReported

Event Hub

Email

Event
DeviceTwin

Storage

Functions

Settings

Analytics

Properties

Jobs

Commands

Dashboard

Logic Apps
FlowWebhook

ReButton and IoTC Configuration
ReButton Configuration:
Wi-Fi

 SSID / Passphrase

IoT Central

 Scope ID
 Device ID
 SAS KeyIoT Central Configuration:
 Create device template Add telemetry/state/event Add real device
 Copy Scope ID/Device ID/SAS Key

Device

Cloud Services

IoT Plug and Play Overview

DeviceCapability
ModelInterface

IoT Plug and Play Contents
Cloud Services

DeviceProperties

Telemetry

Commands
DeviceCapability
ModelInterface

DEMO: IoT Plug and Play

まとめReButton:
 Azure IoTを体験する最も簡単なデバイス
 カスタマイズ可能
Azure IoT Central / Azure IoT Hub:
 体験はIoT Central、デバイス開発はIoT Hub
デバイス開発: Azure IoT SDK
 IoT Plug and Play