SlideShare a Scribd company logo
1 of 53
Download to read offline
@matteocollina
matteocollina.com
IoT Day Trento 2013/04/09
Making things
that work with us!
Smartphones are
changing the world
How many people will own
a smartphone by 2014
1.000.000.000
Did you see
it coming
http://www.flickr.com/photos/12738000@N00/360231193/
Steve
did.
http://www.flickr.com/photos/noppyfoto/6216399465/
Thanks.
http://www.flickr.com/photos/noppyfoto/6216399465/
They didn’t!
...
What's next
(hint: it's a big number)
50.000.000.000
1.000.000.000
50.000.000.000
50.000.000.000
interconnected
"things"
by
2020
http://www.flickr.com/photos/jurvetson/2798315677
Monitor my
house
temperature
Goal:
I want to
chat with
my house
>: hi house
hi matteo
>: what's the
temperature?
19
>: 4 8 15 16 23 42
Hubot © 2012-2013 GitHub Inc. All rights reserved.
Enter Hubot
A programmable robot
that is controlled through
chat
Hubot © 2012-2013 GitHub Inc. All rights reserved.
We can supercharge our house with hubot
module.exports = (robot) ->
robot.respond /what’s the temperature?/i, (msg) ->
msg.http("http://mchouse.it/temperature")
.header("Accept", "application/json")
.get() (err, res, body) ->
msg.send JSON.parse(body)
We can supercharge our house with hubot
How
In order to ask our temp
to hubot, we need to:
1. sense the temp
2. get the temp on the web
3. build a web API
From Hubot, I want to do
the equivalent of:
>: curl http://mchouse.it/temp
What about JSON
What protocol do we use
to push our temperature
to our API?
HTTP POST
http://www.flickr.com/photos/clearlyambiguous/48185613/
HTTP is slow and safe
We need a
fast, binary
protocol
http://www.flickr.com/photos/grrphoto/305649629
likes binary
To build a
social web of
things we
need to react
to events.
We need a
publish/subscribe
pattern.
HTTP
Devices need:
• binary protocol
• publish/subscribe
Binary vs REST
“Things” should
interact with our
lives, and all the
technology should
be built to make
them easy to use.
M2M protocols are
ad-hoc, and
researchers and
businesses focus on
low level problems.
• “things” exposed
with binary protocol
• publish/subscribe
• topics as the naming
system
• “things” exposed
to the web
• request/response
• URIs as the
naming system
MQTT is the state of
art protocol for the
Internet of Things
Mosquitto
Really Small
Message Broker
• the base element of the protocol is a topic
• devices and other systems can publish or
subscribe to topics
How to use
on
Step 1: download
PubSubClient, the
library for
on Arduino: Setup
String server = String("qest.me");
PubSubClient client =
PubSubClient(server,
1883,
callback);
if (!client.connected()) {
client.connect("arduino");
}
client.loop();
char s[10];
itoa(get_temperature(), s, 10);
client.publish("temp", s);
on Arduino: publishing
if (!client.connected()) {
client.connect("arduino");
}
client.loop();
char s[10];
itoa(get_temperature(), s, 10);
client.publish("temp", s);
on Arduino: publishing
This is called a topic,
and it is where we publish
things on MQTT.
speaks
, Hubot speak HTTP
speaks
, Hubot speak HTTP
Communication
QEST
Discover
qest.me
• MQTT broker
• REST interface
• HTTP semantics
• no QoS
• built in node.js
• will support MongoDB,
RabbitMQ and many others.
QEST
REST Server
Redis
MQTT Server
QEST
Data Layer
HTTP Clients MQTT Clients
QEST
• retains every message received
: MQTT to REST
curl -H "Accept: txt" 
http://qest.me/topics/temp
client.publish("temp", "30");
• every topic has its own URI: /topics/<NAME>
QEST
• transform every HTTP PUT received into a
MQTT message
: REST to MQTT
void callback(char* topic, byte*
payload, int length) {
...
}
PubSubClient(server, 1883, callback);
client.subscribe("temp");
curl -X PUT -d '{ "housetemp": 42 }' 
-H "Content-Type: application/json" 
http://qest.me/topics/temp
• devices can listen directly to MQTT topics
Web App
Device
SCL
SDA
AREF
GND
IOREF
RESET
3V3
PWM
PWM
PWM
L
TX
RX
ON
ICSP
PWM
PWM
PWM
TX
RX
3
1
2
1
1
1
0
1
9 8
DIGITAL
7 6 5 4 3 2 1 0
1
5V Gnd
POWER
www.arduino.cc
ANALOG IN
Vin 0 1 2 3 4 5
Arduino UNO
IoT
Broker
QEST
state-of-art
approach to IoT apps
QEST-based
solution to IoT apps
Bridge
Web App
Device
SCL
SDA
AREF
GND
IOREF
RESET
3V3
PWM
PWM
PWM
L
TX
RX
ON
ICSP
PWM
PWM
PWM
TX
RX
3
1
2
1
1
1
0
1
9 8
DIGITAL
7 6 5 4 3 2 1 0
1
5V Gnd
POWER
www.arduino.cc
ANALOG IN
Vin 0 1 2 3 4 5
Arduino UNO
Hubot © 2012 GitHub Inc. All rights
Hubot Integration
module.exports = (robot) ->
robot.respond /qest check ([a-z0-9A-Z]+)/i, (msg) ->
topic = msg.match[1]
if topic?
msg.http("http://qest.me/topics/#{topic}")
.header("Accept", "application/json")
.get() (err, res, body) ->
msg.send JSON.parse(body)
else
msg.send "No topic specified"
• What devices can a user monitor?
• What devices can 'listen' to the
state of other devices?
• Who can access the devices state?
• Is the communication secure?
Security Issues
We need OAuth
for Devices!
I’m
working on
it!!
TL;DR
• The Internet of Things
will be big
• Devices need binary
and pub/sub protocols
• Devs need HTTP API
• QEST does both
Matteo Collina
Ph.D. Student @
University of Bologna
@matteocollina matteocollina.com
Credits
• Font-Awesome for the
Icons.
• Flickr for the CC
images.
• Balsamiq Mockup for
the iPhone Mockup.
• Unibo for my Ph.D.
Matteo Collina (matteo.collina2@unibo.it)
Thank You!
@matteocollina
http://www.flickr.com/photos/axel-d/479627824/
http://www.flickr.com/photos/alexindigo/1606826416
Any Questions?

More Related Content

Viewers also liked

The internet of things - Rails Girls Galway
The internet of things - Rails Girls GalwayThe internet of things - Rails Girls Galway
The internet of things - Rails Girls Galway
Matteo Collina
 
Operational transformation
Operational transformationOperational transformation
Operational transformation
Matteo Collina
 
The usability of open data
The usability of open dataThe usability of open data
The usability of open data
Matteo Collina
 
Enter the app era with ruby on rails
Enter the app era with ruby on railsEnter the app era with ruby on rails
Enter the app era with ruby on rails
Matteo Collina
 
E così vuoi sviluppare un'app (ci servono le APi!)
E così vuoi sviluppare un'app (ci servono le APi!)E così vuoi sviluppare un'app (ci servono le APi!)
E così vuoi sviluppare un'app (ci servono le APi!)
Matteo Collina
 
Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)
Matteo Collina
 
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Matteo Collina
 
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Matteo Collina
 

Viewers also liked (16)

The internet of things - Rails Girls Galway
The internet of things - Rails Girls GalwayThe internet of things - Rails Girls Galway
The internet of things - Rails Girls Galway
 
No. la sottile arte di trovare il tempo dove non esite - codemotion 2015
No. la sottile arte di trovare il tempo dove non esite - codemotion 2015No. la sottile arte di trovare il tempo dove non esite - codemotion 2015
No. la sottile arte di trovare il tempo dove non esite - codemotion 2015
 
Operational transformation
Operational transformationOperational transformation
Operational transformation
 
Star Guide Delivery Performance (2.2)
Star Guide Delivery Performance (2.2)Star Guide Delivery Performance (2.2)
Star Guide Delivery Performance (2.2)
 
E così vuoi sviluppare un'app
E così vuoi sviluppare un'appE così vuoi sviluppare un'app
E così vuoi sviluppare un'app
 
The usability of open data
The usability of open dataThe usability of open data
The usability of open data
 
Enter the app era with ruby on rails
Enter the app era with ruby on railsEnter the app era with ruby on rails
Enter the app era with ruby on rails
 
Crea il TUO database con LevelDB e Node.js
Crea il TUO database con LevelDB e Node.jsCrea il TUO database con LevelDB e Node.js
Crea il TUO database con LevelDB e Node.js
 
E così vuoi sviluppare un'app (ci servono le APi!)
E così vuoi sviluppare un'app (ci servono le APi!)E così vuoi sviluppare un'app (ci servono le APi!)
E così vuoi sviluppare un'app (ci servono le APi!)
 
Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)
 
No. la sottile arte di trovare il tempo dove non esite.
No. la sottile arte di trovare il tempo dove non esite.No. la sottile arte di trovare il tempo dove non esite.
No. la sottile arte di trovare il tempo dove non esite.
 
CI-18n
CI-18nCI-18n
CI-18n
 
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...
 
Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...Designing and developing mobile web applications with Mockup, Sencha Touch an...
Designing and developing mobile web applications with Mockup, Sencha Touch an...
 
Building a multi protocol broker for the internet of things using nodejs
Building a multi protocol broker for the internet of things using nodejsBuilding a multi protocol broker for the internet of things using nodejs
Building a multi protocol broker for the internet of things using nodejs
 
L'universo dietro alle App
L'universo dietro alle AppL'universo dietro alle App
L'universo dietro alle App
 

Similar to Making things that works with us - First Italian Internet of Things Day

Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2
Alessandro Molina
 
CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdf
Ricky Garg
 

Similar to Making things that works with us - First Italian Internet of Things Day (20)

Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
 
WebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC applicationWebRTC 101 - How to get started building your first WebRTC application
WebRTC 101 - How to get started building your first WebRTC application
 
Creating a Java EE 7 Websocket Chat Application
Creating a Java EE 7 Websocket Chat ApplicationCreating a Java EE 7 Websocket Chat Application
Creating a Java EE 7 Websocket Chat Application
 
MQTT with Eclipse Paho: A protocol for IoT and M2M communication
MQTT with Eclipse Paho: A protocol for IoT and M2M communicationMQTT with Eclipse Paho: A protocol for IoT and M2M communication
MQTT with Eclipse Paho: A protocol for IoT and M2M communication
 
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
 
Interledger Workshop Berlin (1 June 2017)
Interledger Workshop Berlin (1 June 2017)Interledger Workshop Berlin (1 June 2017)
Interledger Workshop Berlin (1 June 2017)
 
Fiware IoT Proposal & Community
Fiware IoT Proposal & Community Fiware IoT Proposal & Community
Fiware IoT Proposal & Community
 
#PDR15 - PebbleKit iOS 3.0
#PDR15 - PebbleKit iOS 3.0#PDR15 - PebbleKit iOS 3.0
#PDR15 - PebbleKit iOS 3.0
 
JAX 2014 - M2M for Java Developers with MQTT
JAX 2014 - M2M for Java Developers with MQTTJAX 2014 - M2M for Java Developers with MQTT
JAX 2014 - M2M for Java Developers with MQTT
 
Eclipsecon Europe: Blockchain, Ethereum and Business Applications
Eclipsecon Europe: Blockchain, Ethereum and Business ApplicationsEclipsecon Europe: Blockchain, Ethereum and Business Applications
Eclipsecon Europe: Blockchain, Ethereum and Business Applications
 
Network programming with Qt (C++)
Network programming with Qt (C++)Network programming with Qt (C++)
Network programming with Qt (C++)
 
Arduino and the real time web
Arduino and the real time webArduino and the real time web
Arduino and the real time web
 
Realtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & BeyondRealtime Web Apps in 2014 & Beyond
Realtime Web Apps in 2014 & Beyond
 
Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2Reactive & Realtime Web Applications with TurboGears2
Reactive & Realtime Web Applications with TurboGears2
 
CSU33012-I-microservices.pdf
CSU33012-I-microservices.pdfCSU33012-I-microservices.pdf
CSU33012-I-microservices.pdf
 
Observation of the temperature of remote
Observation of the temperature of remoteObservation of the temperature of remote
Observation of the temperature of remote
 
FIWARE IoT Proposal & Community
FIWARE IoT Proposal & CommunityFIWARE IoT Proposal & Community
FIWARE IoT Proposal & Community
 
How to build a chat application with react js, nodejs, and socket.io
How to build a chat application with react js, nodejs, and socket.ioHow to build a chat application with react js, nodejs, and socket.io
How to build a chat application with react js, nodejs, and socket.io
 
twMVC#46 一探 C# 11 與 .NET 7 的神奇
twMVC#46 一探 C# 11 與 .NET 7 的神奇twMVC#46 一探 C# 11 與 .NET 7 的神奇
twMVC#46 一探 C# 11 與 .NET 7 的神奇
 
Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2MLeveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Making things that works with us - First Italian Internet of Things Day