5. Slide 5 www.medando.deDroidcon Berlin2014, 08.05.2014
What is The Quantified Self?
Self-knowledge through numbers
• Analyze trends and set goals to improve yourself
Recording of daily activities
• Fitness, sleep, location, …
• Monitoring and display of information from various devices,
services, and applications
12. Slide 12 www.medando.deDroidcon Berlin2014, 08.05.2014
Technologies for Self-Tracking
0%
10%
20%
30%
40%
50%
60%
70%
Mobile phones
and apps
Web- and
desktop
applications
Self-tracking
hardware
Self-made
desktop tools
(spreadsheets
etc.)
Pen and paper Other
Deployed technologies for self-tracking
Source: Marcia Nißen, Quantified Self – An Exploratory Study on the Profiles and Motivations of Self-Tracking, Bachelor Thesis (2013)
27. Slide 28 www.medando.deDroidcon Berlin2014, 08.05.2014
Internet of Things
Billions of devices, sensors, and chips
• Connected physical objects (devices)
• Embedded controllers, sensors, actuators
• Connected via the internet
• Uniquely identified
• They interact
28. Slide 29 www.medando.deDroidcon Berlin2014, 08.05.2014
Growth
Number of devices connected to the internet grow every day
50.000.000.000 “Things” by 2020
32. Slide 33 www.medando.deDroidcon Berlin2014, 08.05.2014
MQTT Protocol
• One-to-many message distribution over TCP/IP
• Notifies if clients disconnect abnormally
• Message format
• Fixed 2-byte header
• Variable header for some message type
• Payload (e.g., the topic or small pieces of data)
33. Slide 34 www.medando.deDroidcon Berlin2014, 08.05.2014
MQTT Topics
• Messages in MQTT are published on topics
• No need to configure, just publish on it
• Topics are hierarchical, with “/” as separator
my/home/temperature/kitchen
my/home/temperature/livingroom
my/server/temperature
35. Slide 36 www.medando.deDroidcon Berlin2014, 08.05.2014
Open Source Broker Mosquitto
Implemented in C. Fast. Small.
For testing: Publicly available Mosquitto MQTT broker
39. Slide 40 www.medando.deDroidcon Berlin2014, 08.05.2014
Android Push Notifications
Getting data from Quantified Self gadgets to Android
• The Gadget sends data to “somewhere” in the Cloud
• Withings, Fitbit, etc. provide APIs to access the data
• Register for callbacks to get notifications
• We use a Django app that registers as callback listener and
send MQTT messages on updates
• MQTT Java client on Android receives notifications
48. Slide 49 www.medando.deDroidcon Berlin2014, 08.05.2014
Conclusions
• Quantified Self community
is growing
• Many devices and apps
• Mobile! Wearable!
• Communication in the IoT
• Messaging with MQTT
• Platform independent push
notification services
Source: Kölner Stadt-Anzeiger, http://bit.ly/JsnQ3s