42
This work is licensed under a Creative Commons Attribution-Share Alike 4.0 ( CC BY-SA 4.0 ) GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countries Copyright © GENIVI Alliance 2016 5-Oct-16 1 Genivi OCF Demonstrator 2016-04-27 | 14 th Genivi AMM A collaborative effort by Genivi JLR Samsung

IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Embed Size (px)

Citation preview

Page 1: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

This work is licensed under a Creative Commons Attribution-Share Alike 4.0 (CC BY-SA 4.0)GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countries

Copyright © GENIVI Alliance 2016 5-Oct-161

Genivi OCF Demonstrator

2016-04-27 | 14th Genivi AMM

A collaborative effort byGenivi

JLRSamsung

Page 2: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

This work is licensed under a Creative Commons Attribution­Share Alike 4.0 (CC BY­SA 4.0)GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countries

Copyright © GENIVI Alliance 2016 5-Oct-162

IoTivity connects GDP to Tizen2016-04-27 | IoT developmentIoTivity connects GDP to Tizen2016-04-27 | IoT development

Philippe CovalSoftware Engineer

Samsung OpenSource Group

Philippe CovalSoftware Engineer

Samsung OpenSource Group

Page 3: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countriesCopyright © GENIVI Alliance 2016

● Why ?

– Infinite use cases: monitoring, convergence, behaviour, AI...● What ?

– Linking user's devices together in a secure way– Cross products applications or services

● How ?

– Open protocols, standards and FLOSS● When ?

5-Oct-153

Connected devices : It's all about interconnection

Page 4: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

What is Open Connectivity Foundation

“OCF is a standard & open source project that delivers “just-works” interconnectivty for developers, manufacturers and end users.”

Page 5: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

OCF Approach to Standardization & Adoption

A SPEC + Open Source Implementation approach

openconnectivity.org

Specification & certification

Open Specification

IP protection and branding

WG & TG* headed by industry experts

Certification by OCF

www.iotivity.org

Open Source Implementation

Apache 2.0 License

Linux Foundation co-operative project

Android, iOS, Tizen, Linux, RTOS

Open governance model

Page 6: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

OCF Specification

OCF

Page 7: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

OCF Members (~170 and growing)

Diamond

Platinum

Gold

Page 8: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

IoTivity Architecture

Page 9: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countriesCopyright © GENIVI Alliance 2016

● : a FLOSS software plaform based on GNU/Linux

– Split into Profiles : Wearable, Mobile, TV, IVI...– Shipped into Consumer Electronic products:

● Gear S, Z1, Z3, Gear S2, TVs J*

● : Seemsless device to device connectivity framework for IoT

– C/C++ FLOSS library (Apache 2)– IoTivity is part of Tizen 3.0 platform– Can be integrated into Tizen 2.x products

5-Oct-159

What is Tizen / IoTivity ?

Page 10: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countriesCopyright © GENIVI Alliance 2016

● Genivi Demo platform

– is a Yocto based Linux distribution for IVI– so supports meta-oic yocto layer that brings IoTivity

● Let's prototype a Server

– Exposes a physical resource (MinnowMax's GPIO)– Share a virtual GPS position to near devices

● And use Tizen devices as clients to interact with

5-Oct-1510

IoTivity on GDP

Page 11: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countriesCopyright © GENIVI Alliance 2016

● https://vimeo.com/164000646#tizen-genivi-20160424rzr

5-Oct-1511

IoTivity on GDP

Page 12: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countriesCopyright © GENIVI Alliance 20165-Oct-15

12

IoTivity Client / Server Flow

OCPlatform::Configure(OC::PlatformConfig )

OCPlatform::registerResource ...

OC::EntityHandler(OCResourceRequest) { switch(getRequestType) { case 'GET' : ... OCPlatform::sendResponse();; case 'PUT' : ... OCPlatform::sendResponse() OCPlatform::notifyAllObservers();; }}

OCPlatform::findResource(...)

OCPlatform::Configure(OC::PlatformConfig )

OC::FindCallback(...) OCResource::observe()

OC::OCResource::put(...) OC::PullCallback(...)

OC::OCResource::get(...) OC::GetCallback(...)

IoTivity Server(on Genivi)

IoTivity Client(s)(on Tizen)

OC:ObserveCallback(...)

IP Network (* multicast for discovery)

Page 13: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countriesCopyright © GENIVI Alliance 2016

● Entry points:

– https://wiki.iotivity.org/community– https://wiki.iotivity.org/tizen– https://at.projects.genivi.org/jira/projects/GOCF

● Related:

– http://slideshare.net/SamsungOSG/iotivity-on-tizen-how-to– http://blogs.s-osg.org/iotivity-ready-automotive/– https://github.com/TizenTeam/

5-Oct-1513

References

Page 14: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Keep in touch

● Questions ?

– Contact me online for support or resources– https://wiki.tizen.org/wiki/User:Pcoval– irc://irc.freenode.net/#automotive

● Thank you:

– GENIVI, Samsung OSG– Intel/Minnowboard, CampOSV, Flaticons (CC BY 2.0)

Page 15: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

This work is licensed under a Creative Commons Attribution­Share Alike 4.0 (CC BY­SA 4.0)GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countries

Copyright © GENIVI Alliance 2016 5-Oct-1615

RVI Details

2016-04-27 | 14th Genivi AMM

RVI Details

2016-04-27 | 14th Genivi AMM

Anson FanArchitect

JLR

Anson FanArchitect

JLR

Page 16: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countriesCopyright © GENIVI Alliance 201627-April-16 16

RVI Service Flow

Node 1 “Client” Node 2 “Server”Connect

Register Service X Service X Available

Service X Callback Send Service X: a=b

TLS Transport

Message Received

Got:a=b

Page 17: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countriesCopyright © GENIVI Alliance 201627-April-16 17

RVI JSON-RPC

{"jsonrpc“ : "2.0","id“ : "1","method“ : "message","params“ : {

"timeout“ : 1559388884,"service_name“ : “genivi.org/node/vehicle_id/rvi/vehiclecontrol","parameters“ : {

"function“ : "fanSpeed","newValue“ : 20,"target“ : "SETHVAC"

}}

}

Page 18: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countriesCopyright © GENIVI Alliance 201627-April-16 18

GDP Application Architecture

HTTP/WS

Qt/QML

D-Bus Connector

CAN interface

CAN Router

HVAC

RVI

Service Handlers

OCF GatewayD-Bus

CAN

Qt/QML

D-Bus Connector

SmartHome

RVI

GDP

Apps

Page 19: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

This work is licensed under a Creative Commons Attribution­Share Alike 4.0 (CC BY­SA 4.0)GENIVI is a registered trademark of the GENIVI Alliance in the USA and other countries

Copyright © GENIVI Alliance 2016 5-Oct-1619

Realizing Connected Car ScenariosWith IoTivity and RVI

2016-04-27 | 14th Genivi AMM

Realizing Connected Car ScenariosWith IoTivity and RVI

2016-04-27 | 14th Genivi AMM

Sanjeev BASenior Engineer

Samsung OpenSource Group

Sanjeev BASenior Engineer

Samsung OpenSource Group

Page 20: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Background

● Developers looking for niche areas

– Direct revenues from apps slowing down

– 52% make < $1000 / month● 53% working on IoT related apps already.

– Estimated 5.5 Million mobile app devs.

– Smart Home and Wearables● Users already have app fatigue

* Source : VisionMobile™ Developer Economics Q1 2015: State of the Developer Nation

Page 21: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Challenges

Page 22: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

IoT & Connected Services

Critical

Consumer Specific

Just in TimeRegulatory User Context

Customization

Page 23: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

SDK Overload for Developers

Developer.Tizen.org

Developer.android.com

Developer.apple.com

developers.facebook.com

developer.paypal.com

dev.twitter.com

Iotivity SDK

Weave SDK

MQTT SDK

Platform SDK

Web Service SDKIoT SDK

Proprietary SDKs

Connected Car SDK

App Developer (ex. Streaming Music Service)

Page 24: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Siloed Connected Car Ecosystems

Store 1

{ Subset #2 of Apps }

Store 2

{ Subset #1 of Apps }

Store 3

{ Subset #3 of Apps }

Car Makers / OEMGroup 1

Car Makers / OEMGroup 2

Car Makers / OEMGroup 3

Page 25: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

App Overload for Users

Smart Things

Flipkart

Sonos

Sphero

Car

Twitter

Skype Hue

User

!=Service

Integrator

Page 26: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Approaches

How to make this simpler ?

For users, developers & service providers

Page 27: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Dedicated Hub + Cloud Service Model

IoT Network

AppApp

Cloud Service

Page 28: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Service Plugin Model

Web Service Plugin Plugin Download

Server

IoT Network

AppApp

Cloud Service

Page 29: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Distributed App Control Model

IoT NetworkDistributed App Control

AppApp

IoT Protocol

AppAppApp

Service Integration

Backend

Page 30: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

IoTivity Web Service Interface

Page 31: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Web Service Interface

Enabler of interactionsFrom IoTivity devices to a variety of Services

Service abstraction

Web Service

Interface

IoTivityNetworkIoTivity

Device

IoTivity

Device

IoT Data Stays LocalService AccessCredentials Caching

RESTful Web Services

VoIP Services

“Other” Services

Page 32: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Service Representation : JSON Blocks

"name":“Openweathermap","id":“org.openweathermap","description":“A service that has weather for more than 200,000 cities",“logo" : "http://openweathermap.org/images/OWM_logo32_32.png"

SERVICE META DATA

"tags":[ "search",

“weather” ]

SERVICE TAGS

Page 33: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Service Representation : JSON Blocks

capability:[  {  id : org.openweathermap.findbycity,isauthrequired : true,description : Find the weather by cityname string.,endpoint : api.openweathermap.org/data/2.5/weather? endpointtype : REST,operation : GET,params :{ q : {{cityname}}},response :{ <response JSON body format>}

CAPABILITY DESCRIPTION

Page 34: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Service Description details

Mustache syntax for variables{{ variable }}

ServicesAuthorization SectionCapability Section

Params SectionCues using tagsExtensible and customizable

Page 35: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Service Representation : JSON Blocks

auth:{        type :oauth2.0,      subtype :application-only,      appcredentials: {        cust_key :{{cust_key}}       cust_sec :{{cust_secret}}       oauth_key :{{oauth_key}}       oauth_sec :{{oauth_secret}} }}Supported Types : Supported SubTypes :

oauth2.0, application-onlyoauth1.0a, client credentialsoauth1.0 oob

AUTH SECTION

Page 36: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Putting it all together

Web Services Interface

Platform Adaptation Linux

nodejsAndroid Web

WSI API Interface

Service Management

Service Request Processing

Config & Caching

Auth Workflow

ManagementWSI Daemon / Service

Tizen

Page 37: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

RVI Service Description

"capability": [ {

"cid": "org.genivi.rvi.connect", "isauthrequired": "false", "description": "Connect to RVI.", "endpoint": "{{rviurl}}", "endpointtype": "rvi", "chain" : "http://localhost:8081/callback", "operation": "RVICONNECT"

}, { "cid": "org.genivi.rvi.send", "isauthrequired": "false", "description": "Post Message to RVI.", "endpoint": "{{rviurl}}", "endpointtype": "rvi", "operation": "RVISEND", "params": { "message": "None" } }

Connect Capability

Send Capability

Notify URL for remote RVI msgs.

Page 38: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Genivi OCF Demo Theme

• Vehicle to Smart Device Control• Associating a set of devices using rules

• Executing the rule to change device states

• Getting the status of home devices• Smart Device to Vehicle Control

• Control Vehicle Parameters (HVAC, Temperature)• Getting the status of Vehicle

• Notifications• Vehicle Location Notifications

Page 39: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

https://at.projects.genivi.org/wiki/display/PROJ/GENIVI-OCF+Demonstrator

OCF Smart Home

Tizen Z1

Tizen Gear S2

OCF to RVI Bridging Gateway

Simulated OCF Devices

Smart TV Aircon

RVI

Services

App #1App #2

Genivi Head Unit

AndroidNexus

Tizen Z3

RVI­OCF Gateway Demo Concept

Page 40: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Openness

What did we publish ?

git clone https://gerrit.iotivity.org/gerrit/iotivity(wsi-dev branch)

Tizen Mobile/Wearable & Android applicationshttp://git.projects.genivi.org/?p=meta-genivi-ocf-demo.git;a=summary

* cleanup and publishing to be done post demo

Page 41: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Openness

What did we publish ?

git clone https://gerrit.iotivity.org/gerrit/iotivity(wsi-dev branch)

Tizen Mobile/Wearable & Android applicationshttp://git.projects.genivi.org/?p=meta-genivi-ocf-demo.git;a=summary

* cleanup and publishing to be done post demo

Page 42: IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices

Challenges Addressed

App Overload ?App Overload ?SDK Overload ?SDK Overload ?

Siloed Ecosystems ?Siloed Ecosystems ? New IoT Apps ?New IoT Apps ?

Developer.Tizen.org

Developer.android.com

Developer.apple.com

developers.facebook.com

developer.paypal.com

dev.twitter.com

Iotivity SDK

AllJoyn SDK

MQTT SDK

Platform SDK

Web Service SDKIoT SDK

Smart Things

Flipkart

Sonos

Sphero

Path

Twitter

Skype Hue

Store 1 Store 2 Store 3

Healthcare Service

User Context Location + Time

Smart Home + Retail

Partial No

Open StandardsOCF & RVI Yes !!!