cmmc - cnx - community of practice 1
TRANSCRIPT
ณัฐ วีระวรรณ์
Software Developer (Maker / Mobile / Website / Game)
IoT Technology Review for building a community
The internet of things?
The “Internet of things” elements • Things
• Small Computer (MCU) +Sensors
• Connectivity & Communication
• Data
• Cloud Service (Intelligence)
HAPIfork
http://www.hapi.com/products-hapifork.asp
The HAPIfork is an electronic fork that helps you monitor and track your eating habits. It also alerts you with the help of indicator lights and gentle vibrations when you are eating too fast.
Smart Tooth Brush
http://www.beamtoothbrush.com/toothbrush/
The Beam Brush is a connected toothbrush that engages users with their daily hygiene routine.
Smart A/CAros learns from your budget, location, schedule, and usage to automatically maintain the perfect temperature and maximize savings for your home.
https://www.quirky.com/shop/752-aros-smart-window-air-conditioner
Smart BikeValour by Vanhawks gives directions, reroutes to avoid traffic, and tracks riding metrics.
http://www.vanhawks.com/
Hydroponic SystemNiwa is the first fully automated hydroponic system that attends to all of your plants’ needs and water them, feed them and make sure they have optimal growing conditions 24/7.
http://getniwa.com/
-Smart Garbage CansBigBelly alerts when it needs to be emptied so smarter collection decisions can be made.
http://www.bigbelly.com/solutions/stations/smartbelly/
The Protocols
HTTP / MQTT / CoAP
HTTP: GET, POST, PUT, DELETE
CoAP: GET, POST, PUT, DELETE
MQTT
MQ-TelemetryTransport
MQTT: PUBLISH, SUBSCRIBE
LOW Bandwidth HIGH Latency UNRELIABLE HIGH Cost
NETWORK
MQTTA practical protocol for the Internet of Things
Bryan Boyd (IBM) @bryanboyd
VehiclesCows
OvensPacemakersChildren
Smartphones
The Internet is (in) everything- vehicles!
- children!
- cows!
- smartphones!
- ovens!
- pacemakersData source: IDC
212 BILLION
By the year 2020…
Total number of available sensor enabled objects
30 BILLIONsensor enabled objects connected to networks
57,000 /secnew objects connecting
- open open spec, standard 40+ client implementations !- lightweight minimal overhead efficient format tiny clients (kb) !- reliable QoS for reliability on unreliable networks !- simple 43-page spec connect + publish + subscribe
MQTT
Late 1990s Aug 2010 Nov 2011 Sep 2014
Invented Published Eclipse M2M Standard
a lightweight protocol for IoT messaging
MQTT bi-directional, async “push” communication
MQTT!Broker
CONNECT to MQTT broker SUBSCRIBE to thing3/data
CONNECT to MQTT broker PUBLISH to thing3/data
recv
recv
pub
thing #3
thing #1
thing #2
TCP/IP
WebSocket
MQTT pub/sub decouples senders from receivers
MQTT!Broker
Analytics
Mobile App
Database
car telemetry
tennis scores
sensor dataHTML5 App
Logger
group chat
publish subscribe
MQTT agnostic payload for flexible delivery
MQTT!Broker
CONNECT
0101pub
01010100110011100PUBLISH to thing1/myBinary
{“id”:”thing1”,”lon”:-97.135198, ”lat”:94.19384,”status”:”I’m alive!”}
PUBLISH to thing1/myJSON
data:image/png;base64,A908SFIkjdf…
PUBLISH to thing1/myPicture
{ }pub
:-)pub
MQTT retained messages for last value caching
MQTT!Broker
CONNECT,ID=thing1PUBLISH,thing1/battery,{“value”:95},,RETAIN,,,PUBLISH,thing1/battery,{“value”:94},,RETAIN,,,PUBLISH,thing1/battery,{“value”:93},,RETAIN,,,
CONNECT,ID=thing2SUBSCRIBE,thing1/battery
RETAIN,thing1/battery,{“value”:93},PUBLISH
DISCONNECT
MQTT last will and testament for presence
MQTT!Broker
CONNECT,ID=thing2SUBSCRIBE,thing1/status2
thing1/status,“Goodbye!”,PUBLISH
CONNECT,ID=thing1,LWT=thing1/status,“Bye!”1
2
(client has network problem)
PINGREQ
PINGREQPINGRESP
PINGRESP
(KEEP_ALIVE seconds pass)
MQTT security
MQTT!Broker
CONNECT with username / password
SSL/TLS TCP/IP
- MQTT spec doesn’t define security model aside from username/password authorization on connection
- Brokers *can* implement support for SSL/TLS and policies for connection and messaging
ex. organize topic space by “group” username associated with a group
bboyd is in group “IBM” and can pub/sub IBM/bboyd/#
Resources - MQTT home - Eclipse Paho MQTT clients - Mosquitto broker - IBM MessageSight - IBM IoT Foundation - MQTT demos - IBM Messaging Github - IBM Redbook + PickMeUp
!
- Me!
MQTT.org eclipse.org/paho mosquitto.org ibmdw.net/messaging/messagesight internetofthings.ibmcloud.com m2m.demos.ibm.com github.com/ibm-messaging github.com/ibm-messaging/mqtt-PickMeUp !
Bryan Boyd (IBM) @bryanboyd
(coming soon)
thaiopensource.org
fcfd18fe34db3b985ccf7f09cb3f30fffa010103c4090000540b0000e703000031050000086275646479303031000000000000000000000000000000000090d0a
Thingspeak
open-source embedded operating system for low-power connected microcontrollers.
Thank you ( :