Questo Lab presenta come far convivere in maniera semplice internet delle cose e la cloud. Durante il Lab, usiamo FIWARE (http:///www.fiware.org), una piattaforma Open Source supportata da molte industrie europee. Nel Lab utilizziamo una serie di “cose” dalle ridotte capacità computazionali, dotate di sensori, attuatori, e una radio per la trasmissione a corto raggio. I dati raccolti dai sensori vengono passati a un controller/gateway, per poi essere opportunamente consumati e/o contestualizzati nella piattaforma FIWARE e che usa i dati per decidere come interagire con gli attuatori.
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Mettere l' IoT in Cloud con FIWARE - Massimo Vecchio, Attilio Broglio - Codemotion Milan 2014
1. MILAN november 28th/29th, 2014
Massimo Vecchio & Attilio Broglio
Lab Handson: Mettere l' IoT in Cloud con FIWARE
{massimo.vecchio, attilio.broglio}@create-net.org
2. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Agenda
• What is FIWARE?
• Can we leverage on FIWARE to build IoT apps?
• What’s about the “things”?
• What else do I need?
• Is that really all?
• Let’s (socially) fight!
3. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Agenda
• What is FIWARE?
• Can we leverage on FIWARE to build IoT apps?
• What’s about the “things”?
• What else do I need?
• Is that really all?
• Let’s (socially) fight!
4. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
FIWARE = advanced Openstack-based cloud + rich
library of Generic Enablers
Driven by
implementation
Sustainability
ensured
5. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
FIWARE LAB: going beyond technology, the “meeting
point” where a new Open Innovation ecosystem will be
boosted Entrepreneurs, Developers
• Ability to test with real data
• Ability to run trials with real
users
• Visibility, promotion
• Hosting of permanent
showcase
• Connection to potential
customers
• Acceleration of product
development
Customers and Data providers
(e.g., cities)
• Connect to entrepreneurs
• Put their data at work
• Visibility, promotion
• Costs saving
• Better service to customer
FIWARE Technology
Providers
• Added value to just the
technology
• Connecting to
entrepreneurs: Revenue-sharing
opportunities
4,2 M€ promotion
campaign
• Campus Party events
• Startup Weekend
events
• Chambers of
Commerce
• 870 K€ in prizes
80 M€ of funding
devoted to
entrepreneurs in phase
3 of the FI-PPP
6. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
What FIWARE offers to application
developers
Technolog
y
A true open innovation
ecosystem
7. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Agenda
• What is FIWARE?
• Can we leverage on FIWARE to build IoT apps?
• What’s about the “things”?
• What else do I need?
• Is that really all?
• Let’s (socially) fight!
8. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
The FIWARE catalogue
– browse it here [1]*
– It’s the central repository for the implementations of the
Generic Enablers (GEs) that are part of the platform
– You’ll find there all the info, documentation and tools
you need (as a developer) to start using the GEs’
implementations
– It is organized in Chapters (there’s an IoT chapter also!)
* http://catalogue.fi-ware.org/
9. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
What you’re going to see today
A simple demo touching several nerves:
– connect “things” able to sense and actuate
– coordinate the things’ actions/status
– feed the senses/receive feedback to/from a set of
independent FIWARE components:
• Context Broker (CB) [2]**
• Identity Manager (IdM) [3]***
• Complex Event Processing (CEP) [4]****
**
http://catalogue.fi-ware.org/enablers/configuration-manager-orion-context-*** http://catalogue.fi-ware.org/enablers/identity-management-keyrock
****
http://catalogue.fi-ware.org/enablers/complex-event-processing-cep-ibm-proactive-
10. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Demo: in words...
• We have two rooms (Massimo’s office and lab)
– In Massimo’s room one can manually select the light colour and
its “temperature”
– The lab has the same features (except that there is NOT manual
control!)
• To access the lab you need to be “authenticated”
– you pass your badge in front of the door
– if your badge is enabled the door latch is electronically disarmed,
otherwise you cannot enter (de facto Attilio won’t enter ;))
• Once an authenticated user gets in, the 2 rooms “get aligned”
– the light colour of the lab changes to the user’s one
– the temperature threshold of the lab changes to the user’s one
11. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Demo: in blocks...
Updates
Notifications
Ranger-INO
Controller
LED-INO
Lock-INO
IDM-KEYROCK
ContextBroker
Queries
Updates
Notifications
GUI/WEBSOCKET
Queries
Updates
Notifications
Sensors (Things)
NO FI-WARE component
FI-WARE component
FI-WARE component (partial)
CEP
THINGS
12. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Agenda
• What is FIWARE?
• Can we leverage on FIWARE to build IoT apps?
• What’s about the “things”?
• What else do I need?
• Is that really all?
• Let’s (socially) fight!
13. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
"Things" you're going to touch
• All the “things” are arduino-based
boards
• They communicate with a
controller through a wireless
RF serial module (SRF@ciseco)
• They are provided with
different sensors and actuators
(next slides...)
14. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Thing 1: RANGERino
• An ultrasonic distance ranger measures distances
between 5 and 40 cms
• the alarm threshold is customizable through +/-
buttons
• when an obstacle is below the set threshold you
hear a (rather annoying) signal (aka buzzer)!
15. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Thing 2: LEDino
• An RGB LED bulb changes the colour of its light
among a set of 6 predefined colours
(R,G,B,O,Y,N)
• You can select your favourite colour by clicking a
button
16. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Thing 3: LOCKino
• An RFID reader reads the tags/badges you pass in
front of it.
17. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
A barely simple radio protocol
we use LLAP (Lightweight Logical Application Protocol)
• packets of fixed length(12 bytes, all included)
– 1 byte to align
– 2 bytes for the ID
– 2 bytes to identity the property to set/get
– the rest is for the property value to retain/deliver
• Each *ino receives all the other msgs and drops the ones not
directed to itself.
• Upon setting a property, each *ino signals the new status of that
property (not an LLAP feature)
18. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Generic and specific properties
• Generic properties
– I started (async) [aXXSTARTED-- -> no answer]
– are you alive? [aXXHB?------ -> aXXHBOK-----]
– what’s your type? [aXXTY?------ -> aXXTY0/1/2------]
• Specific properties (some of them...)
– What’s your threshold? [aXXTH?------ -> aXXTH30-----]
– Set colour to RED [aXXLLR------ -> aXXLLR------]
– Under threshold (async)! [aXXAL1------]
19. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Agenda
• What is FIWARE?
• Can we leverage on FIWARE to build IoT apps?
• What’s about the “things”?
• What else do I need?
• Is that really all?
• Let’s (socially) fight!
20. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
The controller:
h/w & s/w perspectives
• We need a h/w device acting as a controller
• We need a s/w framework to implement the logic
21. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Agenda
• What is FIWARE?
• Can we leverage on FIWARE to build IoT apps?
• What’s about the “things”?
• What else do I need?
• Is that really all?
• Let’s (socially) fight!
22. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Remotely visualize & control the
rooms
To make the demo more attractive we provided you with a web
interface to remotely play with the things
– you can change the colours (ledinos)
– you can change the thresholds (rangerinos)
– you can see the alarms fired/unfired in realtime (rangerinos)
– you can see when a user’s access gets granted/denied (lockino)
23. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
IDM (IDentity Manager) KEYROCK
The Identity Manager provides IdM systems at connectivity-level and
application-level based on oauth2
• Single Sign-On (SSO)
• users' access to networks services and applications
• secure and private authentication from users to device networks and
services
• authorization & trust management
• user profile management
• privacy-preserving disposition of personal data
http://catalogue.fi-ware.org/enablers/identity-management-
keyrock
24. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
CEP (Complex Event Processing)
• The IBM Proactive Technology Online engine is a runtime tool that receives
information on the occurrence of events from event producers, detects situations,
and reports the detected situations to external consumers.
• The CEP GE analyses event data in real-time and generates immediate insight and
enables instant response to changing conditions (situations vs single events).
– composite events (e.g., sequence),
– counting operators on events (e.g., aggregation)
– absence operators
• The IBM Proactive Technology Online is a scalable integrated platform to support
the development, deployment, and maintenance of event-driven applications.
• The IBM Proactive Technology Online authoring tool allows the definition of CEP
applications using a web user interface.
http://catalogue.fi-ware.org/enablers/complex-event-processing-
cep-ibm-proactive-technology-online
25. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Orion ContextBroker
The value of the attributes that characterize entities
relevant to applications
API
Bus
•Location
•# passengers
•Driver
•Licence plate Person
•Name-Surname
•Birthday
•Preferences
•Location
•ToDo list
Shop
•Location
•Business name
•Franchise
•offerings
My Application
Context Information
http://catalogue.fi-ware.org/enablers/configuration-manager-
orion-context-broker
26. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Orion ContextBroker
Context information may come from many sources using
different interfaces and protocols … but programmers should
just care about entities and their attributes …
A PI
A sensor in a
pedestrian street
The Public Bus
Transport
Management system
A person from his
smartphone
It’s too hot!
27. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Orion ContextBroker
• Context Producers publish data/context elements by invoking the
updateContext operation on a Context Broker.
• Context Consumers can retrieve data/context elements by invoking the
queryContext operation on a Context Broker
queryContext
Context Consumer
Context Producer
updateContext
Context
Broker
28. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Orion Context Broker in a nutshell
Orion Context Broker Context
Consumers
subscriptions
update
query
notify
notify
update
update
DB
1026
1026
30. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Agenda
• What is FIWARE?
• Can we leverage on FIWARE to build IoT apps?
• What’s about the “things”?
• What else do I need?
• Is that really all?
• Let’s (socially) fight!
31. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Are you ready to tweet?
• Feel free to interact with Massimo’s room
– Light (actuate) change the room colour
• use #codemotion_lx (where x is one of [r,g,b,y,o,n])
– “Temperature” (get notified) when an alarm is
fired/unfired
• @massiminov will tweet a notification:
TIMESTAMP + ALARM FIRED/UNFIRED + #codemotion_alarmON
/ #codemotion_alarmOFF
33. MILAN november 28th/29th, 2014 – Massimo Vecchio & Attilio Broglio
Wanna reach us?
drop us an email!
please stop
messing up
my room!!!
stop
up
room!!!
one
...just one
change
ookk...... more...
attilio.broglio@create-net.org
massimo.vecchio@create-net.org