27
FIWARE IoT Proposal & Community Carlos Ralli Ucendo, Telefonica IoT Chapter Architect, FIWARE @carlosralli

FIWARE IoT Proposal & Community

  • Upload
    fiware

  • View
    1.083

  • Download
    0

Embed Size (px)

DESCRIPTION

Brief explanation about the FIWARE environment and its connection to the Internet of Things.

Citation preview

Page 1: FIWARE IoT Proposal & Community

FIWARE IoT Proposal & CommunityCarlos Ralli Ucendo, TelefonicaIoT Chapter Architect, FIWARE@carlosralli

Page 2: FIWARE IoT Proposal & Community

FIWARE (IoT) Target: Developers

ContextBroker

App Logic @FIWARE-Cloud

Desktop/Mobile/TabletUser Interface

Web 3D GE / Advanced UIWirecloud GE / Dashboards

OAuth2.0

SANTANDER

SMARTSPACESSEVILLA

2) IoT Providers. Pretty Heterogeneous solutions/skills.• An incremental approach. Public/Private instances.• KISS philosophy for most (web)developers.• Advanced IoT architecture, e.g. for IoT Advanced Devel.

1) IoT Consumers. Normally not just IoT.• A single point, API & Protocol for IoT, OpenData, etc.• Context: Data Entities + Data Entities events.• A Public & Secured Ecosystem at FIWARE Lab

MultiMediaEvents

ComplexEvent Processing

IoT

SmartcitiesOpenData

BigDataAnalytics

Page 3: FIWARE IoT Proposal & Community

IoT Consumers: Northbound Single Point (API/Protocol): ContextBroker

3

Developers need to know/discover the Ecosystem conventions. Examples:

Developers may:•Query an Entity (whole set or specific attributes) or Subscribe to changes of atttibutes of Entities.•Discover all Entities (entity_IDs) or all Entities with a specific “type”.•Discover all Attributes of an specific Entity (entity_ID).

Full List of FIWARE Lab (Global Context Broker) conventions (section 3.5):https://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/Publish/Subscribe_Broker_-_Orion_Context_Broker_-_User_and_Programmers_Guide

My FIWARE-App

ContextBroker

OAuth2.0

OMA NGSI10 - QueryContext

OMA NGSI10 - SubscribeContext

(type, entity_ID, attributes)

Entities

Page 4: FIWARE IoT Proposal & Community

IoT Providers: Connect any “Thing”/IoT-System to FIWARE Lab

4

ContextBroker

OAuth2.0

Your IoT IoT

Backend

Gateway GEs Backend GEs

NGSI9/10

A) OMA NGSI Agent

B) IoT BE (IDAS/SBC)

C) Advanced Scenarios

SML, UL2.0, MQTT, ETSIM2M, CoAP/OMA-LW

NGSI

PropietaryZigbeeZwave

CoAP/MTRunnerETSIM2M

CoAP/LWM2M

Page 5: FIWARE IoT Proposal & Community

FIWARE IoT: Most Common Scenarios (A & B)

5

ContextBroker

App Logic FI-WARE Cloud

UserInterface

DashboardsUI Prototyping

OAuth2.0

SANTANDER

SEVILLA

IDAS Portal/ADMIN API

IDASSBCSMARTSPACES

Commands

Commands

(Future Delivery)CommandsA

BB

IDASSBC

Page 6: FIWARE IoT Proposal & Community

FIWARE IoT: Advanced Scenario (C)

6

http://wiki.fi-ware.org/Internet_of_Things_(IoT)_Services_Enablement_Architecture

Page 7: FIWARE IoT Proposal & Community

Success Stories: FIWARE Community Kick off @ CPE’13

7

1st Prize………….SmartAdsComplete context-sensitive Ads solution developed in just 4 days & nights.

Neelie Kroes FIWARE Lab LaunchHackathon + Challenges Announcements

Massive, > 6K developersMainly young entrepreneurs

TalentDay&Night

Involving developers, debugging, improving training sessions

Page 8: FIWARE IoT Proposal & Community

Success Stories: Smartcities IoT Data & SMEs involvement

8

Smartcity resources exploitation, involve local market & public policies makers

1st Prize………….MagicBox…………………………………………….….…..…TVs displaying Smartcities & Smartspaces.2nd Prize………….FI-BOT……………………………………………………..….…Robotics exploiting opendata & sensors.3rd Prize.…………OpenAlerts……..…..............................................Interfaces for citizens (mobile If-Then App). 4th Prize………….Traffic Heatmap…..............................................Traffic routing based on city real-time Info.

Winning Teams

33 succeeded building a product-like working App (of 77 registered developers)

Several participants own a Start-up & keep on using FIWARE

Page 9: FIWARE IoT Proposal & Community

Success Stories: Emerging IoT Trends fast adoption

9

iBeacons in FI-WARE by Context Team.

•3rd prize within SmartBusiness FIWARE challenge.(Jan 2014 @ CPBR7 Sao Paulo)

Page 10: FIWARE IoT Proposal & Community

FIWARE Lab OpenData/IoT Resources Ecosystem is growing fast

10

SANTANDER

SEVILLA

MALAGA

TRENTO

Page 11: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: IDAS/SBC Ultralight2.0 (Option B.1)

For testing use:- Service: OpenIoT

Step 1 – Create ModelStep 2 – Create Asset (device)Step 3 – Send MeasurementsStep 4 – Send Commands

IDAS/SBC Testing details: •IPv4: 130.206.80.47 •IPv6: 2001:720:1514:80::47•UL2.0 Port: 8002 (only IPv4)•REST API Port: 5371 (IPv4 or IPv6)•Testing Service: OpenIoT•APIKEY: 4jggokgpepnvsb2uv4s40d59ov•Service URL: <SBC_HOST>/m2m/v2/services/OpenIoT

Page 12: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: IDAS Ultralight2.0 (B.1)

Step 1 – Create Model(REST ADMIN API)

Payload JSON Format: - Check IDAS documentsAt FIWARE Catalogue.- TOKEN = FIWARE Oauth Token.- Measurements have an “alias”. E.g: Temperature=t

“Open IoT” example Models:•SENSOR_TEMP•SENSOR_HUM•SENSOR_LUM•SENSOR_MOV•SENSOR_ZWAVE_4IN1

HTTP POST: http://130.206.80.47:5371/m2m/v2/services/OpenIoT/models/Headers: {'content-type': 'application/json’; 'X-Auth-Token' : [TOKEN]}Payload:{ "name": "SENSOR_TEMP", "capabilities" : [ { "name" : "Temperature", "property" : "temperature", "format" : { "name" : "Temperature", "alias" : "t" , "phenomenon": "urn:x-ogc:def:phenomenon:IDAS:1.0:temperature", "type" : "Quantity", "uom": "celsius” } } ], "protocol": "ul-2_0” }

Page 13: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: IDAS Ultralight2.0 (B.1)

Step 2 – Create AssetASSET = LOGICAL DEVICE(REST ADMIN API)

Payload JSON Format: - Check IDAS documentsAt FIWARE Catalogue.- TOKEN = FIWARE Oauth Token.- Must reuse an existing Model.- DEV_ID = 1st “name” - ASSET_ID = 2nd (asset) “name”

HTTP POST: http://130.206.80.47:5371/m2m/v2/services/OpenIoT/assets/ Headers: {'content-type': 'application/json’; 'X-Auth-Token' : [TOKEN]}Payload:{ "name": "RPI:79:ed:af:TEMP-LivingRoom", "model": "SENSOR_TEMP", "asset": { "name": "asset-RPI:79:ed:af:TEMP-LivingRoom", "description": "asset model protocol” } }

Page 14: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: IDAS Ultralight2.0 (B.1)

Step 3 – Send Measurements(UL2.0 DEVICE API)

Payload JSON Format: - TOKEN = FIWARE Oauth Token.- DEV_ID = Asset name (Step 2).

* Read Last Measurements:HTTP GET:/m2m/v2/services/OpenIoT/assets/[ASSET_ID]

HTTP POST: http://130.206.80.47:8002/d?k=[APIKEY]&i=[DEV_ID]http://130.206.80.47:8002/d?k=4jggokgpepnvsb2uv4s40d59ov&i=RPI:79:ed:af:4IN1-Salon

Headers: {'content-type': 'application/text’; 'X-Auth-Token' : [TOKEN]}Payload: ‘ t|25‘

- Sending multiple measurements with one request:

http://130.206.80.47:8002/d?k=4jggokgpepnvsb2uv4s40d59ov&i=RPI:79:ed:af:4IN1-Room

Headers: {'content-type': 'application/text’; 'X-Auth-Token' : [TOKEN]}Payload: ‘t|23#h|80#l|95#m|Quiet‘

Page 15: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: IDAS Ultralight2.0 (B.1)

Step 4 – Sending Commands to Devices

Page 16: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: IDAS Ultralight2.0 (B.1)

Step 4.2 - Send Commands via IDAS REST ADMIN API

Step 4.1 - Register Command URL (PUSH) / Get Commands from Device (POOLING)

Page 17: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: More IDAS Southbound Options (B.2)

Option B.2: MQTT3.1•SW Ready, manuals coming up soon.•Devices publish measures as MQTT clients.•Devices subscribe for commands at SBC (MQTT broker).

Receiving Commands•Collect pending Commands: <api-key>/<device_id>/cmdget•Receive Commands: <api-key>/<device_id>/cmd/+

Commands received:•Topic: <api-key>/<device_id>/cmd/<new_topic_level>•Payload: cmdid|<cmid>#<param1>|<value1>…

Message formatting aligned to UL2.0•Topic: <api-key>/</device-id>/<alias> or <api-key>/</device-id>/multi•Payload: <measure_value> or <alias1>|<value1>#<alias2>|<value2>..

SBC

Page 18: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: More IDAS Southbound Options (B.3)

Option B.3: OMA-LWM2M/CoAP.•Adopted by OneM2M•Compatible with ETSI-M2M architecture •Planned for JAN 2015.

Extra tools: FIGWAY https://github.com/telefonicaid/fiware-figway/

New Release (Nov 17th 2014):•Coded in Python for RaspberryPI, MACOS & Linux.•UL2.0 Sensors via IDAS/SBC (UL2.0 REST API)•Tools to access a ContextBroker.

Page 19: FIWARE IoT Proposal & Community

Thanks!Thanks!

Page 20: FIWARE IoT Proposal & Community

Annex: Connect your IoT to FIWARE Lab: FIGWAY Dec’14 Release

figway/python/ContextBrokerGetEntities.py [ENTITY_TYPE]- Tool for Contextbroker- Prints all NGSI Entities of a specific type.- ENTITY_TYPE= ALL -> Get Summary + all entities

Page 21: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: FIGWAY Dec’14 Release (II)

figway/python/ContextBrokerGetEntity.py [ENTITY_ID]- Tool for Contextbroker- Prints an NGSI Entity if ID is known.

Page 22: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: FIGWAY Dec’14 Release (III)

figway/python/Sensors_UL20DiscoverModels.py - Tool for IDAS/SBC- Prints all Models in a Service (Default: OpenIoT)

Page 23: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: FIGWAY Dec’14 Release (IV)

figway/python/Sensors_UL20GetModel.py [MODEL_Name]- Tool for IDAS/SBC- Prints dedtails of a Model in a Service (Default Service: OpenIoT)

Page 24: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: FIGWAY Dec’14 Release (V)

figway/python/Sensors_UL20RegisterDevice.py [DEV_TYPE] [DEV_NAME]- Tool for IDAS/SBC- Registers (creates asset) a Device- DEV_TYPE is the MODEL_Name- DEV_NAME is used for DEV_ID=hostid:DEV_NAME

Page 25: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: FIGWAY Dec’14 Release (VI)

figway/python/Sensors_UL20SendObservation.py [DEV_ID] [MEASURES]- Tool for IDAS/SBC- Sends a device observations (meausrements)- DEV_TYPE is the MODEL_Name- DEV_ID=hostid:DEV_NAME- MEASURES = alias1|value1#alias2|value2

Page 26: FIWARE IoT Proposal & Community

Connect your IoT to FIWARE Lab: FIGWAY Dec’14 Release (VII)

ReadDeviceStatus.py [DEV_ID] - Tool for IDAS/SBC- Returns last measurements of a Device- DEV_TYPE is the MODEL_Name- DEV_ID=hostid:DEV_NAME

Page 27: FIWARE IoT Proposal & Community

Thanks!Thanks!