3. IOT Agents
• IoT Architecture
http://bit.ly/iotArchitecture
• Motivation:
– Modular approach
– Deployment flexibility
– Custom IOT Agents
• NGSI Bridge
– Constrained set of interactions
– One entity per device
• Provisioning of devices and group of devices
• Additional services (e.g.: security, device registration,
stats)
4. Interaction models: Active Attributes
IOT Agent
DB
Device
Protocol
NGSI
Entity information
Interaction
begins
5. Interaction models: Lazy Attributes
IOT Agent
Device
Protocol
NGSI
Entity
information
Interaction
begins
Requires the IOT Agent to be
registered as a Context Provider
Completely synchronous model
6. Interaction models: Commands
IOT Agent
Device
Protocol
NGSI
Command
Execution
Interaction
begins
Result Information
Requires the IOT Agent to be
registered as a Context Provider
7. Device Provisioning: Models
7
Context Broker
IoT Agent
Thinking Things
NGSI
HTTP (2G)
IoT Agent
Thinking Things
Context BrokerApp Backend
Configuration APIDevice Provisioning API
10. Security
• North bound: using PEP Proxies
• South bound: IOTAgent specific
• Use of trust tokens for communicating with other GEs
IOT Agent
PEP Proxy
PEPProxy
Keystone
11. Building an IoT Agent: Overview
• Frameworks: Node.js and C++
• North bound features provided by the platform:
– NGSI Context Provision server
– NGSI Client
– Device Provisioning API
– Configuration API
• All South bound features are protocol specific
– External library
– Ad-hoc development
12. IOT Agent
Building an IoT Agent: Node.js
• Device registry (in-memory or MongoDB)
• Group Registry (in-memory or MongoDB)
• Module provided in NPM Registry:
– Add it to your package.json
– Require it as any other module
Context Server
NGSI Client
Device
Protocol
Device
Regitry
Group
Regitry
Provision Server
18. OMA Lightweight M2M
• Based on COAP:
– UDP
– Lightweight payload
– REST Oriented
• Interfaces:
– Bootstrapping
– Client registration
– Device management
– Information reporting
• Object model
– Based on Object and Resource hierarchy (e.g.: /1/12/3)
– OMA Registry
20. Lightweight M2M IOT Agent
• Github project
https://github.com/telefonicaid/lightweightm2m-iotagent
• Work in progress
• Quickstart guides
• OMA Registry mapping
– Default lazy mapping for attributes not declared
– Attributes can be declared as active using the resource name
– Custom mappings by type using Device Provisioning API:
"internal_attributes": {
"lwm2mResourceMapping": {
"TheTemperature" : {
"objectType": 34000,
"objectInstance": 0,
"objectResource": 5
} }