FIWARE Building your own IoT Agent
Daniel Calvo
IoE Lab. ATOS Research & Innovation
daniel.calvo@atos.net
@danicalvoalonso
Building your own IoT Agent: overview
§ Frameworks: Node.js and C++
• https://github.com/Fiware/iot.IoTagent-node-lib
• https://github.com/telefonicaid/fiware-IoTAgent-Cplusplus
§ 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
1
Building your own IoT Agent: Node.js
§ Module provided in NPM Registry:
• Add iotagent-node-lib to your package.json
• Require it as any other module
§ https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/howto.md
§ Possible in few days/weeks:
• Current agents: ~ 1000 lines of source code (supporting several transport protocols)
2
Context Server
NGSI Client
Device
Protocol
Device
Registry
Group
Registry
Provision Server
IoT Agent
Building your own IoT Agent: CoAP + JSON
3
§ CoAP: Constrained Application Protocol
• RESTful protocol designed from scratch
• Transparent mapping to HTTP
• Binary protocol
□ Low parsing complexity
□ Small message size
• Security based on DTLS (TLS/SSL for Datagrams)
• IETF Standard: https://tools.ietf.org/search/rfc7252
GET /status/power
PUT /control/color #00FF00
Building your own IoT Agent: CoAP + JSON
4
APPLICATION
TRANSPORT
SIMPLIFIED OSI
NETWORK
LINK
PHYSICAL
CoAP
UDP
IoT Device
JSON
IoT Agent
UDP
IPv4
TCP
CoAP
JSON
HTTP
NGSI/REST
TCP
CONTEXT BROKER
IPv4
HTTP
NGSI /REST
§ Protocol translation
Building your own IoT Agent: CoAP + JSON
§ Active attributes reporting
• POST coap://{iot_agent_ip}/iot/coap
{
“deviceId": " #00FF00",
“apiKey": “123456",
“Luminosity”:”20”,
“ActivePower”:”0.42”
}
§ Southbound API: Rely on well-know libraries
• coap package: https://www.npmjs.com/package/coap
• coap-cli package: https://www.npmjs.com/package/coap-cli
5
Building your own IoT Agent: CoAP + JSON
1. Create a new node project
• npm init
2. Add iotagent-node-lib dependency
• npm install --save https://github.com/Fiware/iot.IoTagent-node-lib
3. Add your Southbound library
• npm install –save coap
4. Add some usefull packages:
• npm install –save async
• npm install –save logops
• npm install coap-cli -g
6
Building your own IoT Agent: CoAP + JSON
§ Start agent
7
Building your own IoT Agent: CoAP + JSON
§ Start south bound API:
8
Building your own IoT Agent: CoAP + JSON
§ Handle South Bound API requests:
9
Building your own IoT Agent: CoAP + JSON
§ Update attributes in IoT Agent and CB:
10
Building your own IoT Agent: CoAP + JSON
§ From JSON to NGSI:
11
Building your own IoT Agent: CoAP + JSON
§ Starting is quite easy and fast
§ IoT Agent supporting active attributes with CoAP and JSON data model
• 1 single file
• 147 lines of code
• Less than two hours of coding
• https://github.com/dcalvoalonso/iot.IoTagent-CoAP
• https://hub.docker.com/r/danielcalvo/iotagent-coap/
12
Thank you!
http://fiware.org
Follow @FIWARE on Twitter
Daniel Calvo
IoE Lab. ATOS Research &
Innovation
daniel.calvo@atos.net

More Related Content

PDF
FIWARE Global Summit - Connecting to IoT
PDF
FIWARE Tech Summit - Building Your Own IoT Agent
PPTX
Mob324 Windows IoT Core Dave Glover Microsoft Australia
PDF
Home Invasion 2.0 - DEF CON 21 - 2013
PDF
Recipe for good secrets management
PDF
Windows 10 on Raspberry PI 2
PDF
Enhancing traffic analysis with elk and snort
PDF
IoT 'Megaservices' - High Throughput Microservices with Akka
FIWARE Global Summit - Connecting to IoT
FIWARE Tech Summit - Building Your Own IoT Agent
Mob324 Windows IoT Core Dave Glover Microsoft Australia
Home Invasion 2.0 - DEF CON 21 - 2013
Recipe for good secrets management
Windows 10 on Raspberry PI 2
Enhancing traffic analysis with elk and snort
IoT 'Megaservices' - High Throughput Microservices with Akka

What's hot (20)

PDF
Icinga Camp New York 2018 - Opening
PDF
Icinga Camp New York 2018 - Icinga2 and Elastic
PDF
Docker & IoT: protecting the Datacenter
PPTX
Using Puppet With A Secrets Server
PDF
Icinga Camp New York 2018 - What's evolving in icinga 2018
PPTX
FIWARE Developers Week_Kurent_exercises
PPTX
Windows 10 iot core dot net notts - 27-07-15
PDF
Azure Low Lands 2018: Monitoring real life Azure applications when to use wha...
PDF
Troubles in Kubernetes Land: Vault to the Rescue
PPTX
Introduction to Windows IoT Nov 2017
PPTX
What is FIWARE Lab
PPTX
.NET Fest 2018. Андрей Тарарака. Как порулить грузовиком в Австралии, находяс...
PDF
Next Generation Infrastructure - Devops Enterprise Summit 2018
PPTX
Identity Summit UK: KEEP TALKING: LESSONS LEARNED DURING OUR MIGRATION FROM L...
PPTX
OpenWhisk JavaOne
PPTX
Linux routing and firewall for beginners
PDF
Serverless security - how to protect what you don't see?
PPTX
Chatbots Workshop SF JS Meetup May 2018
PPTX
Blackhat Europe17 - Cloud Security Suite
PDF
Will ServerLess kill containers and Operations
Icinga Camp New York 2018 - Opening
Icinga Camp New York 2018 - Icinga2 and Elastic
Docker & IoT: protecting the Datacenter
Using Puppet With A Secrets Server
Icinga Camp New York 2018 - What's evolving in icinga 2018
FIWARE Developers Week_Kurent_exercises
Windows 10 iot core dot net notts - 27-07-15
Azure Low Lands 2018: Monitoring real life Azure applications when to use wha...
Troubles in Kubernetes Land: Vault to the Rescue
Introduction to Windows IoT Nov 2017
What is FIWARE Lab
.NET Fest 2018. Андрей Тарарака. Как порулить грузовиком в Австралии, находяс...
Next Generation Infrastructure - Devops Enterprise Summit 2018
Identity Summit UK: KEEP TALKING: LESSONS LEARNED DURING OUR MIGRATION FROM L...
OpenWhisk JavaOne
Linux routing and firewall for beginners
Serverless security - how to protect what you don't see?
Chatbots Workshop SF JS Meetup May 2018
Blackhat Europe17 - Cloud Security Suite
Will ServerLess kill containers and Operations
Ad

Similar to FIWARE Global Summit - Building Your Own IoT Agent (20)

PPTX
OpenShift Enterprise 3.1 vs kubernetes
PPTX
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
PDF
The Twelve Factor App - Pivotal Tracker
PPTX
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
PDF
321 codeincontainer brewbox
PDF
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
PPTX
Docker Networking in OpenStack: What you need to know now
PDF
DevOps of Python applications using OpenShift (Italian version)
PPTX
Modern Web-site Development Pipeline
PPT
Front-End Tools and Workflows
PDF
Continuous Integration for your Android projects
PPTX
Quick workflow of a nodejs api
PDF
OSMC 2009 | NConf - Enterprise Nagios configurator by Angelo Gargiulo
KEY
Building production-quality apps with Node.js
PPTX
ASP.NET 5 auf Raspberry PI & docker
PDF
The path to a serverless-native era with Kubernetes
PDF
DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...
PDF
Getting started with kubernetes
PDF
Lessions from building a high available cloud foudry on top of open stack
PDF
Building Serverless APIs (January 2017)
OpenShift Enterprise 3.1 vs kubernetes
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
The Twelve Factor App - Pivotal Tracker
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
321 codeincontainer brewbox
ONUG Tutorial: Bridges and Tunnels Drive Through OpenStack Networking
Docker Networking in OpenStack: What you need to know now
DevOps of Python applications using OpenShift (Italian version)
Modern Web-site Development Pipeline
Front-End Tools and Workflows
Continuous Integration for your Android projects
Quick workflow of a nodejs api
OSMC 2009 | NConf - Enterprise Nagios configurator by Angelo Gargiulo
Building production-quality apps with Node.js
ASP.NET 5 auf Raspberry PI & docker
The path to a serverless-native era with Kubernetes
DevOpsDays Houston 2019 - Shaun Ladewig, Robert Stone - From OverTheWallOps t...
Getting started with kubernetes
Lessions from building a high available cloud foudry on top of open stack
Building Serverless APIs (January 2017)
Ad

More from FIWARE (20)

PPTX
Behm_Herne_NeMo_akt.pptx
PDF
Katharina Hogrebe Herne Digital Days.pdf
PPTX
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
PPTX
Behm_Herne_NeMo.pptx
PPTX
Evangelists + iHubs Promo Slides.pptx
PPTX
Lukas Künzel Smart City Operating System.pptx
PPTX
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
PPTX
Dennis Wendland_The i4Trust Collaboration Programme.pptx
PPTX
Ulrich Ahle_FIWARE.pptx
PPTX
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
PDF
Water Quality - Lukas Kuenzel.pdf
PPTX
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
PPTX
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
PPTX
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
PPTX
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
PDF
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
PDF
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
PPTX
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
PPTX
WE_LoRaWAN _ IoT.pptx
PPTX
EU Opp_Clara Pezuela - German chapter.pptx
Behm_Herne_NeMo_akt.pptx
Katharina Hogrebe Herne Digital Days.pdf
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Behm_Herne_NeMo.pptx
Evangelists + iHubs Promo Slides.pptx
Lukas Künzel Smart City Operating System.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Ulrich Ahle_FIWARE.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Water Quality - Lukas Kuenzel.pdf
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
WE_LoRaWAN _ IoT.pptx
EU Opp_Clara Pezuela - German chapter.pptx

Recently uploaded (20)

PPTX
Modernising the Digital Integration Hub
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPTX
The various Industrial Revolutions .pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Getting Started with Data Integration: FME Form 101
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
O2C Customer Invoices to Receipt V15A.pptx
DOCX
search engine optimization ppt fir known well about this
PPTX
Tartificialntelligence_presentation.pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
STKI Israel Market Study 2025 version august
Modernising the Digital Integration Hub
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Chapter 5: Probability Theory and Statistics
WOOl fibre morphology and structure.pdf for textiles
Web Crawler for Trend Tracking Gen Z Insights.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
Final SEM Unit 1 for mit wpu at pune .pptx
The various Industrial Revolutions .pptx
Enhancing emotion recognition model for a student engagement use case through...
Getting Started with Data Integration: FME Form 101
NewMind AI Weekly Chronicles – August ’25 Week III
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
O2C Customer Invoices to Receipt V15A.pptx
search engine optimization ppt fir known well about this
Tartificialntelligence_presentation.pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
Group 1 Presentation -Planning and Decision Making .pptx
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
DP Operators-handbook-extract for the Mautical Institute
STKI Israel Market Study 2025 version august

FIWARE Global Summit - Building Your Own IoT Agent

  • 1. FIWARE Building your own IoT Agent Daniel Calvo IoE Lab. ATOS Research & Innovation daniel.calvo@atos.net @danicalvoalonso
  • 2. Building your own IoT Agent: overview § Frameworks: Node.js and C++ • https://github.com/Fiware/iot.IoTagent-node-lib • https://github.com/telefonicaid/fiware-IoTAgent-Cplusplus § 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 1
  • 3. Building your own IoT Agent: Node.js § Module provided in NPM Registry: • Add iotagent-node-lib to your package.json • Require it as any other module § https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/howto.md § Possible in few days/weeks: • Current agents: ~ 1000 lines of source code (supporting several transport protocols) 2 Context Server NGSI Client Device Protocol Device Registry Group Registry Provision Server IoT Agent
  • 4. Building your own IoT Agent: CoAP + JSON 3 § CoAP: Constrained Application Protocol • RESTful protocol designed from scratch • Transparent mapping to HTTP • Binary protocol □ Low parsing complexity □ Small message size • Security based on DTLS (TLS/SSL for Datagrams) • IETF Standard: https://tools.ietf.org/search/rfc7252 GET /status/power PUT /control/color #00FF00
  • 5. Building your own IoT Agent: CoAP + JSON 4 APPLICATION TRANSPORT SIMPLIFIED OSI NETWORK LINK PHYSICAL CoAP UDP IoT Device JSON IoT Agent UDP IPv4 TCP CoAP JSON HTTP NGSI/REST TCP CONTEXT BROKER IPv4 HTTP NGSI /REST § Protocol translation
  • 6. Building your own IoT Agent: CoAP + JSON § Active attributes reporting • POST coap://{iot_agent_ip}/iot/coap { “deviceId": " #00FF00", “apiKey": “123456", “Luminosity”:”20”, “ActivePower”:”0.42” } § Southbound API: Rely on well-know libraries • coap package: https://www.npmjs.com/package/coap • coap-cli package: https://www.npmjs.com/package/coap-cli 5
  • 7. Building your own IoT Agent: CoAP + JSON 1. Create a new node project • npm init 2. Add iotagent-node-lib dependency • npm install --save https://github.com/Fiware/iot.IoTagent-node-lib 3. Add your Southbound library • npm install –save coap 4. Add some usefull packages: • npm install –save async • npm install –save logops • npm install coap-cli -g 6
  • 8. Building your own IoT Agent: CoAP + JSON § Start agent 7
  • 9. Building your own IoT Agent: CoAP + JSON § Start south bound API: 8
  • 10. Building your own IoT Agent: CoAP + JSON § Handle South Bound API requests: 9
  • 11. Building your own IoT Agent: CoAP + JSON § Update attributes in IoT Agent and CB: 10
  • 12. Building your own IoT Agent: CoAP + JSON § From JSON to NGSI: 11
  • 13. Building your own IoT Agent: CoAP + JSON § Starting is quite easy and fast § IoT Agent supporting active attributes with CoAP and JSON data model • 1 single file • 147 lines of code • Less than two hours of coding • https://github.com/dcalvoalonso/iot.IoTagent-CoAP • https://hub.docker.com/r/danielcalvo/iotagent-coap/ 12
  • 14. Thank you! http://fiware.org Follow @FIWARE on Twitter Daniel Calvo IoE Lab. ATOS Research & Innovation daniel.calvo@atos.net