IoT Agents (Introduction)

12
Introduction to the IoT Agents Contact email [email protected] om (Reference Orion Context Broker version: 0.24.0)

Transcript of IoT Agents (Introduction)

Page 1: IoT Agents (Introduction)

Introduction to the IoT Agents

Contact [email protected]

(Reference Orion Context Broker version: 0.24.0)

Page 2: IoT Agents (Introduction)

• IOT Agents• Provisioning APIs• Interaction models• Where to start

Outline

Page 3: IoT Agents (Introduction)

IOT Agents

• IoT Architecturehttp://bit.ly/iotArchitecture

• Device Protocolo to NGSI Bridge– One entity per device– Constrained set of interactions

• Design principles:– Modular approach– Deployment flexibility– Ease the creation of Custom IOT Agents

• Provisioning of devices and group of devices

• Additional services (e.g.: security, device registration, stats)

IOTA IOTA IOTA

DEVDEVDEV

DEVDEV

DEVDEVDEVDEV

UL 2.0 LWM2M MQTT

NGSI

Page 4: IoT Agents (Introduction)

Device Provisioning: Models

4

Context Broker

IoT AgentLightweight M2M

NGSI

Dev. Protocol

IoT AgentThinking Things

Context BrokerApp Backend

Configuration APIDevice Provisioning API

Page 5: IoT Agents (Introduction)

Device Provisioning: Device Provisioning API{ "devices": [ { ”device_id": "Light1", "entity_name": "TheFirstLight", "entity_type": "TheLightType", "attributes": [ { "name": "attr_name", "type": "string" } ], "lazy": [ { "name": "luminance", "type": "lumens" } ], "commands": [ { "name": "commandAttr", "type": "commandType" } ] }  ]}

• /iot/devices/:deviceId• Not exactly REST

(check doc):– POST– GET– DELETE– PUT

• Service headers:– Fiware-service– Fiware-servicepath

• Mandatory– Device_id– Entity_type

• Internal_attributes

Page 6: IoT Agents (Introduction)

Device Provisioning: Configuration API

{ services: [ { resource: '/deviceTest', apikey: '801230BJKL23Y24HV8732', type: 'Light', trust: '8970A9078A803HAMS’, commands: [], lazy: [ { name: 'luminescence', type: 'Lumens' } ], active: [ { name: 'status', type: 'Boolean' } ] } ]}

• /iot/services• Not exactly REST (check

doc)– POST– GET– DELETE– PUT

• Service headers:– Fiware-service– Fiware-servicepath

• Mandatory– Resource– Api_key– Type

Page 7: IoT Agents (Introduction)

Interaction models: Active Attributes

IOT Agent

DB

DeviceProtocol NGSI

Entity information

Interaction begins

Page 8: IoT Agents (Introduction)

Interaction models: Lazy Attributes

IOT Agent

DeviceProtocol NGSI

Entity information

Interaction beginsRequires the IOT Agent to be

registered as a Context Provider

Completely synchronous model

Page 9: IoT Agents (Introduction)

Interaction models: Commands

IOT Agent

DeviceProtocol NGSI

CommandExecution

Interaction begins

Result Information

Requires the IOT Agent to be registered as a Context Provider

Page 10: IoT Agents (Introduction)

And now… where do I start?

• Install an IoT Agent:– UL 2.0 is a common option– Use Docker

https://github.com/telefonicaid/fiware-IoTAgent-Cplusplus/tree/develop/docker

• Use testing tools to send the data:– Some agents have built-in test consoles– Use figway for UL 2.0

https://github.com/telefonicaid/fiware-figway/tree/develop

• ReadTheDocs

http://fiware-iot-stack.readthedocs.org/en/latest/device_api/index.html

Page 11: IoT Agents (Introduction)

Resources

• Github Projects:– Node.js IOT Agent frameworkhttps://github.com/telefonicaid/iotagent-node-lib

– C++ IOT Agent frameworkhttps://github.com/telefonicaid/fiware-IoTAgent-Cplusplus

– LWM2M IOT Agenthttps://github.com/telefonicaid/lightweightm2m-iotagent

• IoT Architecture

http://bit.ly/iotArchitecture

• MQTThttp://mqtt.org

• COAPhttps://tools.ietf.org/html/rfc7252

• Lightweight M2Mhttp://openmobilealliance.org/about-oma/work-program/m2m-enablers/

Page 12: IoT Agents (Introduction)

BACKUP SLIDESBackup slides

12