This webinar introduce two important Internet of Things standards: ISO/OASIS MQTT and OGC SensorThings API. MQTT provides an interoperable messaging protocol for IoT, and SensorThings provides an interoperable data model and API for IoT. The combination of the two international standards offers the best IoT interoperability that is open, interoperable, scalable, and rich in features. Recording of the webinar is available here: https://www.youtube.com/playlist?list=PLUSJC5mjKZ9SIASpVJNWKWCSS9hVzjiFA
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
MQTT and SensorThings API MQTT Extension
1. MQTT and SensorThings API MQTT
Extension
sensorweb.geomatics.ucalgary.ca
www.sensorup.com
0.23 litre/minute
0.25 litre/minute
0.27 litre/minuteRH: 85 %
Temp: 18 Celsius
Dr. Steve Liang, Ph.D., P.Eng.
Associate Professor, University of Calgary
Founder and CEO, SensorUp Inc.
2. About Dr. Steve Liang
๏ Associate Professor, Geomatics Engineering, Uni. Calgary
๏ AITF-Microsoft Industry Research Chair on Open Sensor Web
(2011~2014)
๏ Chair OGC SensorThings API Standard Working Group
๏ Rapporteur, ITU-T SG12/11 on Internet of Things Test
Specifications
๏ Founder and CEO, SensorUp Inc
๏ Calgary’s Top 40 Under 40
3. About SensorUp
๏ We are a leader in Sensor Web and
IoT Platforms
๏ We are leading several international
IoT standard development efforts
(OGC and ITU-T)
๏ We are proud member of Eclipse
and Open Geospatial Consortium
4. News -
Whiskers
๏ Whiskers, a new Eclipse
open source project
proposal for OGC
SensorThings API
๏ will includes MQTT support
5. News - Whiskers
๏ Whisker is
๏ a Javascript Client Library for SensorThings
๏ a light-weight SensorThings Server for IoT
gateways (e.g., Raspberry Pi)
๏ First release - 2016 Q2 or Q3
6. What will be covered
๏ MQTT
๏ SensorThings API MQTT Extension
7. Why isn’t HTTP enough?
๏ HTTP: send a request, receive a response
๏ IoT has fundamentally different challenges
๏ IoT needs a event-oriented paradigm
๏ distribute information from 1 to many
๏ get notifications whenever they happen
๏ distributing minimal packets of data in huge volumes
๏ pushing information over unreliable networks
8. Why isn’t HTTP enough - 2?
๏ IoT has fundamentally different challenges
๏ power consumption is a major concern
(battery-powered devices)
๏ responsiveness (near real-time applications)
๏ scalability (50 billion devices!!)
9. MQTT is…
๏ an ISO standard (ISO/IEC 20922)
๏ an OASIS standard
๏ probably the most popular IoT messaging
protocol (more in next slide)
๏ efficient and scalable
11. MQTT vs HTTPS (power consumption)
http://stephendnicholas.com/posts/power-profiling-mqtt-vs-https
12. MQTT vs HTTPS (power consumption)
http://stephendnicholas.com/posts/power-profiling-mqtt-vs-https
13. What MQTT is not…
๏ use MQTT doesn’t mean IoT interoperability
๏ It’s part of the interoperability solution
๏ It still needs a data model standard, such as
SensorThings API to enable data
interoperability
14. MQTT Topics
๏ the central concept in MQTT to dispatch messages
are topics
๏ a topic is a simple string that can have more
hierarchy levels, which are separated by a slash (/),
๏ e.g., house/living-room/temperature
๏ topics are the routing information for the MQTT
broker
15. MQTT in a nutshell
MQTT
Broker
Publisher Subscribers
Subscribers
Subscribers
Instead of client/server, MQTT has the
roles of publisher/subscriber
subscribe: topic1
subscribe: topic1
subscribe: topic1
16. MQTT in a nutshell
MQTT
Broker
Publisher
Subscribers
Subscribers
Publish to: topic1
body
msg
Instead of client/server, MQTT has the
roles of publisher/subscriber
msg
msg
msg
Subscribers
17. MQTT Methods (verbs)
๏ Connect: client request a connection with the
MQTT broker
๏ Disconnect: disconnect notification
๏ Subscribe: subscribe to topics
๏ UnSubscribe: unsubscribe from topics
๏ Publish: Publish message
18. Let’s try
๏ HiveMQ provides a nice web socket-based client
๏ http://www.hivemq.com/demos/websocket-
client/
๏ Today I’m gonna use an Eclipse open source tool
called mosquitto
๏ GIST here: http://gist.github.com/liangsteve/
bb7468fb9e97060f4676d3e544c11a77
19. MQTT Topics cont.
๏ plus sign (+) is the single level wild card
๏ e.g., a subscription of house/+/temperature will
receive messages published to both house/
living-room/temperature and house/bed-
room/temperature
๏ # is multi-level wildcard
๏ e.g., house/# is subscribing to all topics begins with
house
23. MQTT QoS
๏ QoS-0: fire-and-forget
๏ QoS-1: deliver at least once
๏ the broker stores messages on disk and retries until clients
have acknowledged their delivery. (Possibly with
duplicates.)
๏ QoS-2: deliver exact once
๏ have a second acknowledgement round-trip, to ensure that
non-idempotent messages can be delivered exactly once
24. MQTT Retain Flag
๏ Second, messages have a ‘retain’ flag, indicating
that they should be stored for delivery to new
subscribers. For topics that are infrequently
updated, it’s often useful to give new subscribers
the last-known message right away (with an
indication that it isn’t fresh). Newer retained
messages replace previously ones.
25. What not included in MQTT?
๏ What does the topic mean?
๏ h/p/t ??
๏ How to interpret the data pushed to you??
SensorThings API MQTT Extension!!
26. ๏ MQTT Subscribe
v1.0/Datastreams(id)/Observations
SensorThings MQTT Extension
MQTT + OData URL Pattern + O&M
URL path tells you how to
find metadata, entity
name tells you how to
interpret the data
29. Demo - Client received notifications when
new THINGS join a SensorThings server
30. Summary
๏ MQTT is very suitable for IoT!!
๏ SensorThings API provides the greatness of
both HTTP and MQTT.
๏ SensorThings HTTP REST is suitable for
historical data and analytics.
๏ SensorThings MQTT is suitable for real-time
applications.