cloud-centric ecosystem approach to address iot interoperability
TRANSCRIPT
Cloud-Centric Ecosystem Approach to address IoT Interoperability
Dr. Yujing WuDeveloper Evangelist https://artik.cloud/@yujingwuhttps://www.linkedin.com/in/yujingwu
1. IoT challenge and methodology to address it
2. Case study: build a fire detection system w/o integration pain
Outline
artik.cloud
As a device developer, you created an innovative thing…
Step 1: Connect the awesome device to the Internet
artik.cloud
A lot of options to implement a system where this device interacts with apps/things created by YOU
artik.cloud
Step 2: How to make it smarter?
• Interact with many other things from different vendors
• Customized integration is not scalable and not future proof
Today: IoT = collections of silo systems
artik.cloud
New Smart City Service
New Smart Building App
New Home Security Service
Not Yet Invented
Vision: Connect EVERYTHING and enable …
IoT = Interoperability of Things
artik.cloud
Realize vision: IoT Open data exchange platform
Any device Any cloudAny data
Data Sources Applications
New class of applicationsservices
Make connections, not silos.
Rich Open APIs
artik.cloud
• Cloud is the best place to do it
• Three capabilities• Define and discover device Manifests• Powerful cross-device rule engine• Diverse ways to interact with devices and 3rd
party clouds
How to achieve interoperability?
artik.cloud
1. IoT challenge and methodology to address it
2. Case study: build a fire detection system w/o integration pain• Device development• Application development• Add on rule capability
Outline
artik.cloud
artik.cloud
Smart Light
Monitor & Control
app
Fire Detector
Vendor A
Vendor B
Vendor C
turn on/off light
Set rules
state
state
state
Case study: Fire detection system using solutions from multiple vendors
Rules: IF fire is on/off, THEN turn on/off light
Now assume we are developers from Vendor A…
How can we build a fire detector device typeso that other developers can discover and use it?
Device development
Four steps for device development
1. Know your device data and capability
2. Define your device manifest
3. Obtain an access token
4. Make API calls: send data to or receive commands
Device dev (1/4): Know device data/capability
Four steps for device development
1. Know your device data and capability
2. Define your device manifest
3. Obtain an access token
4. Make API calls: send data to or receive commands
Device Dev (2/4):define device Manifest in the Developer Dashboard
Device Dev (3/4): Connect a device in User Portal
Four steps for device development
1. Know your device data and capability
2. Define your device manifest
3. Obtain an access token
4. Make API calls: send data to or receive commands
Device Dev (3/4) : Get Access Token
Four steps for device development
1. Know your device data and capability
2. Define your device manifest
3. Obtain an access token
4. Make API calls: send data to or receive commands
REST API call
POST: https://api.artik.cloud/v1.1/messages headers: {"Authorization": "bearer <DEVICE TOKEN>"}, body:{"sdid":"<DEVICE ID>", "data": {"temp": temperature, "onFire": onFire }, "ts": timeStamp }
Device Dev (4/4): Send data to ARTIK Cloud
See live data in User Portal
Four steps for device development
1. Know your device data and capability
2. Define your device manifest
3. Obtain an access token
4. Make API calls: send data to or receive commands
Smart Light
Monitor & Control
app
Fire Detector
Vendor A
Vendor B
Vendor C
turn on/off light
Set rules
state
state
state
Device development is done!
1. IoT challenge and methodology to address it
2. Case study: build a fire detection system w/o integration pain• Device development• Application development• Add on rule capability
Outline
Now assume we are developers from Vendor C…
How can we build an app to use device typesbuilt by others?
Application development
What does the app look like to an end user?
NO FIRE
Four steps for app development
1. Discover device type and learn data/capability
2. Create app and request permissions
3. Obtain an access token
4. Make API calls: get data from or send commands to
App Dev (1/4) : Discover device types
App Dev (1/4) : learn the Manifest
Four steps for app development
1. Discover device type and learn data/capability
2. Create app and request permissions
3. Obtain an access token
4. Make API calls: get data from or send commands to
App Dev (2/4): Create app and
request permissions
Four steps for app development
1. Discover device type data/capability
2. Create app and request permissions
3. Obtain an access token
4. Make API calls: get data from or send commands to
App Dev (3/4): get access token – OAuth2
https://accounts.artik.cloud/authorize? client_id=xxx&response_type=token&redirect_uri=android-app://redirect
android-app://redirect#expires_in=1209600&token_type=bearer &access_token=xxxx
Example: Step 1: make an authentication call
Step 2: catch callback to get the token
Four steps for app development
1. Discover device type data/capability
2. Create app and request permissions
3. Obtain an access token
4. Make API calls: get data from or send commands to
App Dev(4/4): get data from ARTIK Cloud
https://api.samsungsami.io/v1.1/messages/last?count=1&sdids=xxxxHeader: "Authorization": "Bearer <ACCESS_TOKEN>"
"data": { "onFire": false "temp": 80 }
HTTP request:
HTTP response:
Four steps for app development
1. Discover device type data/capability
2. Create app and request permissions
3. Obtain an access token
4. Make API calls: get data from or send commands to
Application development (monitoring) is done!
FIRE!!!!!
1. IoT challenge and methodology to address it
2. Case study: build a fire detection system w/o integration pain• Device development• Application development• Add on rule capability
Outline
Smart Light
Monitor & Control
app
Fire Detector
Vendor A
Vendor B
Vendor C
turn on/off light
Set rules
state
state
state
Add Rules capability
Rules
Rule #1: If onFire is true, turn on lightRule #2: If onFire is false, turn off light
Two ways to manage rules• Manually manage them on User
Portal by the user • Programmatically manage them
through API calls within the app
Smart Light
Monitor & Control
app
Fire Detector
Vendor A
Vendor B
Vendor C
turn on/off light
#1 Make API callSet rules
statestate
state
Rules in action
Rules
If onFire is true/false, then turn on/off light
#2 Rules are working
Diverse way to communicate
Light
APP
Fire Detect
or
turn on/
off light
Set rules
state
state
state
Devices: • REST• WebSocket• MQTT• CoAP
3rd party clouds:• Cloud Connector• Subscription and
Notification• Integration using
REST/WebSocket
• Define and discover device Manifests• Powerful cross-silo rule engine • Diverse ways to interact with devices and 3rd party
clouds
Recap: how to achieve interoperability
• Build comprehensive solutions without integration pain• Each of the players focuses on what they do best
SDKs, tutorials, samples
List of “Works With” Devices
Thank you!
• https://artik.cloud
• https://developer.artik.cloud/
• https://blog.artik.cloud/
• https://github.com/artikcloud• @ArtikCloud | @SamsungIoT
Sign up for our ARTIK Cloud for IoT Challenge!
www.hackster.io/challenge/artikcloud