We use proprietary and third party's cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
FIWARE.ArchitectureDescription.IoT.Backend.DeviceManagement - FIWARE Forge Wiki

FIWARE.ArchitectureDescription.IoT.Backend.DeviceManagement

From FIWARE Forge Wiki

Jump to: navigation, search

Contents

Copyright

Legal Notice

Please check the following Legal Notice to understand the rights to use these specifications.

Overview

The Backend Device Management GE is normally the central enabler at the IoT backend for most common scenarios.

Basically, it provides the following features:

  • Connect physical devices to a FIWARE platform. Devices and/or gateways may use different standard or propietary communication protocols and APIs. The following sections provide details on currently/planned supported protocols, how to configure and scale up the translators (IoT-Agents) plus information on extensibility.
  • Manages IoT-related NGSI Context Entities. It handles the connection (northbound) to a FIWARE NGSI Broker to create one Context Entity per physical connected device. For most cases, FIWARE Application developers will only interact with those NGSI Entities. On the other hand, IoT integrators will also interact with the devices' ADMIN API and the devices' protocols APIs.
  • IoT Edge Management. This functionality is provided within the "IoT Manager" module, which has been delivered in FIWARE Release 5. It provides IoT Integrators with the ability of transforming devices specific Data Models into the Data Models defined at the NGSI level by different verticals (Smartcities, SmartAgrifood, Smartports, etc.). In the future it will also help on the configuration, operation and monitoring of IoT end-nodes, IoT Gateways and IoT networks.

The following diagram depicts its overall planned architecture.



Main Components

IoT Agents

The IoT Agents are the software modules handling South IoT Specific protocols and North OMA NGSI interaction. The minimum configuration of a Backend Device Management GE in a FIWARE ecosystem includes at least one IoT Agent.

IoT Agents must:

  • Handle the creation of an NGSI Context Entity in a ContextBroker (at its northbound) per each one of the connected IoT Devices.
  • Act as Context Producer for those attributes related to sensing capabilities or observations.
  • Provide an Administration/Configuration API.

IoT Agents may:

  • Perform Commands triggering whenever a developer updates specific attributes in a Northbound ContextBroker. In this case, the IoT Agent will register itself and play the role of Context Provider of those specific actuation attributes. If this functionality is not provided, the IoT Agent must implement an API to receive commands and deliver them to devices.

Currently, the following IoT Agents are specified in the roadmap:

  • UL2.0. Ultralight2.0 is an open specification for devices semantics (capabilities, observations, commands). This IoT Agent handles devices using this representation over HTTP or MQTT topics and over IPv4 or IPv6 connections. This agent exposes also an ADMIN API over HTTP and the NGSI REST API towards NGSI Brokers, both over IPv4 and IPv6.
  • JSON. This IoT Agent handles JSON objects representing devices comunications using this representation over HTTP or MQTT topics and also over IPv4 or IPv6 connections. This agent exposes also an ADMIN API over HTTP and the NGSI REST API towards NGSI Brokers, both over IPv4 and IPv6.
  • LWM2M/CoAP. This IoT Agent connects devices compliant with the ETSIM2M and OneM2M southbound proposition: OMA Lightweight M2M specification over the REST protocol for constraint devices/networks (IETF CoAP) and UDP/IPv4 or UDP/IPv6 connections. This agent exposes also an ADMIN API over HTTP and the NGSI REST API towards NGSI Brokers, both over IPv4 and IPv6.
  • Generic IoT Agent library (coded in node.js). A skeleton of a generic IoT agent is provided to help IoT integrators to cope with new standards or propietary protocols.

IoT SDKs

For some specific HW Devices/IoT-end nodes and protocols/APIs, SDKs (client/device side tools) might be optionally provided for certain Hardware platforms in order to facilitate testing and integration activities.

Those SDKs are not installed in the Backend but at the devices or gateways to be connected. However, SDKs depend on specific communciation protocols and thus specific IoT Agents, so they are provided together with them and not as IoT Edge GEs.

For FIWARE Release 4, an SDK related to Ultralight2.0/HTTP Agent is provided.

IoT Agent Manager

The IoT Agent Manager is an optional module that will interface with all the IoT Agents installed in a datacenter throughtout their Administration/Configuration API. This will enable a single point to launch, configure, operate and monitor all IoT-Agents in a FIWARE Ecosystem.

This module will be specified in FIWARE Release 5.

IoT Edge Management

The IoT Edge Manager is an optional module that will interface with IoT end-nodes, IoT Gateways and IoT network APIs throughtout their IoT Edge API in order to operate and monitor the IoT Edge insfrastructure, that means connectivity, gateways and devices.

This module will be specified in FIWARE Release 6.

Basic Concepts

The Backend Device Management GE is based on the usage of the following protocols: FIWARE NGSI, Ultralight2.0 and OMA-LWM2M.

Ultralight2.0

OMA LWM2M

MQTT

IETF CoAP

FIWARE NGSI

Main Interactions

IoT Agent: Ultralight2.0/HTTP

This IoT Agent connects devices (or Gateways grouping devices) described with the open description Ultralight2.0 over the HTTP protocol.

For FIWARE Release 4 onwards commands will be triggered from specific attributes in the related NGSI Context Entity.

The following subsections detail the main interactions needed to work with this specific IoT Agent.

Service Creation

This operation is thought for private instances of the component or Admin users of the FIWARE Lab public instance.

Each tenant (customer or group of users) is expected to use a different service. This is the way this GE enables multitenancy.

A Service is tied to a shared secret, called API-KEY, that all devices (or gateways) need to know to be able to send measurements or receive commands to/from the IoT Agent.

Devices sending observations with a FIWARE-Service "S1" and FIWARE-Service-Path "PATH" headers will be represented up north in the ContextBroker as NGSI Entities with the same FIWARE-Service and FIWARE-Service-Path.

In order to create a Service, an admin will run a specific HTTP POST request. HTTP GET operation at the same URL will return the existing services.



Device Registration/Creation

Before a device sends observations it needs to be registered. This registry will include the Device ID, Entity ID, Entity type, attributes, static attributes and command parameters related to the device.

Depending on the specific service agreements, device resgistration might be carried out by an Admin, regular users or both.

To register a device, an HTTP POST request will be run.


Device Observation

Once a device is registered, observations might be sent with a simple HTTP POST request (executed from the Device or a gateway) that includes the Device ID and the API-KEY in the URL.



Device Commands

There are two ways to send UL2.0 commands: Push and Pooling modes.

  • Push commands are send to devices in a synchronous way. Therefore it assumes always-on reachable devices (or gateways) implementing an HTTP server.
  • Pooling commands are queued in the IoT Agent until a Device asks for them. The Admin APÎ implements a method to check out the status of commands addressed to a specific device.

For the case of Pooling commands, Devices (or gateways) will run an HTTP request and get the full queue of pending commands. Push devices will run an HTTP serever to synchronously receive the command once delivered to the IoT-Agent.


Administration/Configuration API

The current Admin/Config for this IoT Agent comprises the above-described Functions "Service Creation", "Device Model Creation" and "Device Register".

IoT Agent: Ultralight2.0/MQTT

To be provided in the next Architecture release.

IoT Agent: LWM2M/CoAP

This IoT Agent connects Lightweight M2M Clients (devices), communicating over COAP, to the NGSI Context Broker in the Data Chapter. In this release, the IOT Agent accepts writes to device attributes through writes in the Context Entities, but it doesn’t support full commands.


The following sections detail the main interactions with the agent (without entering in low-level details).


Device Provisioning

In order for the system to recognize the device and do the appropriate mapping to NGSI context elements, one of two things must happen: either the device is provisioned in advance into the system, or a service is provisioned in the system and the device assigned to it. In the former case, the DeviceID will be used to identify the device, using it as the Endpoint name in LWM2M. The following pieces of data can be specified in provisioning: device ID, security information, NGSI entity mappings and types of attributes provided.



Service creation

For those cases where the devices are not specified individually, services can be provisioned as a whole. A service is identified by a pair of (resource, APIKey) attributes, and can contain roughly the same kind of information as the device provisioning requests. The specified resource corresponds to a LWM2M server endpoint where the clients will send their requests (the APIKey will be used in southbound security interactions, not implemented in the first version of the Agent).


Each time a device arrives to the specified endpoint, it will be assigned to the proper service based on the endpoint.



Device Registration

Every device in LWM2M must register to the LWM2M server before starting any interaction. In this registration the LWM2M client has to indicate the following information to the server: Endpoint name (DeviceID) and supported objects (a list of links for every OMA LWM2M object that can be accesed by the server). The LWM2M server uses this information to assign the device to a service (or to retrieve the device information in case it has been individually provisioned).


Based on the service or device information, the server will decide what attributes of the objects provisioned by the device are active, lazy or commands, and it will register itself in the Context Broker as the Context Provider of those in the two last categories (lazy and commands).



For those attributes defined as active, the server will emit an Observe request (Information Reporting interface in LWM2M), indicating the desired timeout between measures to be received (using the WriteAttributes operation).


Device lazy observation

For those attributes of the devices that marked as lazy, the updates and reads of Context Entities in the Context Broker GE will be mapped to Read and Write operations from the Device Management Interface in LWM2M.


Device active observation

For those attributes of the devices marked as active, a Observe operation is issued from the server upon registration, expecting subsequent measures to be issued as Notify responses to the Observe message (as stated in the Information Reporting Interface of the LWM2M Specification).


Device command

Commands are issued as changes in a particular value in the Context Entity, and are mapped to Execute operations from the server to the client. The status of the execution is mantained in a special attribute in the Context Entity, that is updated with any upcoming information to the server.


Basic Design Principles

  • Face IoT fragmentation: Today's IoT framework considers a number of vertical silos exploiting different M2M technologies and protocols. The Backend Device Management GE aims to offer a simple and flexible solution to connect any kind of IoT devices to a FIWARE ecosystem.
  • Modular design: Functionalities (including supporting different IoT southbound protocols) are provided as modules. The minimum configuration of a Backend Device Management GE in a Datacenter comprises one single IoT-Agent. Other configurations may add other IoT Agents, the IoT Agent Manager or the IoT Edge Manager. All those modules might be installed in the same or different virtual machines for the sake of scalability and redundancy.
  • Easy extensibility: An skeleton of an IoT-Agent should be provided to allow IoT integrators to create new IoT Agent modules for non supported standards or propietary device/gateway protocols.
Personal tools
Create a book