Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Smart Studio
Search
jinqian
June 11, 2015
Technology
0
160
Smart Studio
Presented @ Breizhcamp 2015 #IoT
jinqian
June 11, 2015
Tweet
Share
More Decks by jinqian
See All by jinqian
KotlinConf 2019 | Bridge the physical world: Kotlin/Native on Raspberry Pi
jinqian
2
260
Bridge The Physical World: Kotlin Native on Raspberry Pi
jinqian
0
2.9k
From TensorFlow to ML Kit: Power your Android application with machine learning
jinqian
0
790
From TensorFlow to ML Kit: power your mobile application with machine learning
jinqian
0
64
Play Rock-Paper-Scissors-Spock-Lizard with your Android Things
jinqian
0
330
EPF IoT class 2018
jinqian
0
73
ML Kit in Action
jinqian
1
370
From ProGuard to R8: take care of your byte code
jinqian
6
2k
[DroidCon London] Heat the neurons of your smartphone with Deep Learning
jinqian
0
340
Other Decks in Technology
See All in Technology
ServiceNow Knowledge Learning Rise up
manarobot
0
190
AOAI をきっかけに 社内の Azure 管理を見直した話
recruitengineers
PRO
1
200
コンパウンドスタートアップのためのスケーラブルでセキュアなInfrastructure as Codeパイプラインを考える / Scalable and Secure Infrastructure as Code Pipeline for a Compound Startup
yuyatakeyama
3
4.6k
サーバー間 GraphQL と webmock-graphql の話 / server-to-server graphql and webmock-graphql
qsona
2
170
DevOpsDays History and my DevOps story
kawaguti
PRO
9
2.3k
Compose Compiler Metricsを使った実践的なコードレビュー
tomorrowkey
1
210
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
180
MLOpsの「壁」を乗り越える、LINEヤフーの Data Quality as Code
lycorptech_jp
PRO
3
120
EMとして2023年度に頑張ったこと / What we did well in FY2023 as a EM
pauli
1
150
オーナーシップを持つ領域を明確にする
konifar
13
3k
長期運用プロジェクトでのMySQLからTiDB移行の検証
colopl
2
810
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
2
140
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
Building Flexible Design Systems
yeseniaperezcruz
318
37k
Building Adaptive Systems
keathley
30
1.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
226
16k
Practical Orchestrator
shlominoach
181
9.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
GraphQLの誤解/rethinking-graphql
sonatard
50
9.2k
Faster Mobile Websites
deanohume
298
30k
Adopting Sorbet at Scale
ufuk
67
8.6k
Documentation Writing (for coders)
carmenintech
59
3.9k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Code Review Best Practice
trishagee
54
15k
Transcript
BreizhCamp 2015 #BzhCmp #IoT BreizhCamp 2015 #BzhCmp On a connecté
le studio ! Qian JIN - @bonbonking Sameh BEN FREDJ - @SamehBenF
Speakers Sameh Ben Fredj IoT Consultant & Data passionate
[email protected]
@SamehBenF Qian Jin Android Developer & Pythonista
[email protected]
@bonbonking
Xebia Studio
Xebia Studio
Ground Floor Xebia Studio 1st Floor Mezzanine
Xebia Studio XL Room Lannister Room Stark Room Targaryen Room
Meeting Room Toilet TV Xbox Hallway & Leisure Space Pinball Machine
Yes! A pinball machine!
A Day in Studio
A Day in Studio • Temperature differences • Surge of
noise level • Meeting room (a.k.a lunch room) occupied • Lights/TV left on • Coffee capsule shortage • Mobile device gone missing
What about connecting the Studio?
IoT: What is it?
IoT: How big?
IoT: How much? Source : EMC, IDC, 2013
IoT: Why should I care?
IoT@Work
IoT@Work: How ?
None
Get Hands Dirty
MQTT \ Backend Architecture Overview Hardware Data Service Frontend Publish
Subscribe Deliver Hardware Publish
Electronics
Hardware Nano Computer Micro Controller
Hardware • TI LaunchPad CC3200 + Platform Energia
Sensors Grove Temperature & Humidity Sensor Grove Motion Sensor Grove
Sound Sensor
Sensors
Example: data lecture & publish #include <WiFi.h> #include <PubSubClient.h> #include
<DHT.h> // PIN POSITIONS #define TEMP_HUMI_PIN 24 #define SOUND_SENSOR 6 #define LIGHT_SENSOR 2 #define ROOM_ID 1 DHT dht(TEMP_HUMI_PIN, DHT22); WiFiClient wifiClient; PubSubClient client(server, 16301, callback, wifiClient); char temp_buffer[256]; char humidity_buffer[256]; void setup() { // Setting up ... dht.begin(); } void loop() { }
Example: data lecture & publish void loop() { // read
values from sensors & pubish to mqtt _temperature = dht.readTemperature(); _humidity = dht.readHumidity(); sprintf(temp_buffer, "{\"value\": %d,\"room_id\": %d}", _temperature, ROOM_ID); sprintf(humidity_buffer, "{\"value\": %d,\"room_id\": %d}", _humidity, ROOM_ID); if (client.publish("temp", temp_buffer) && client.publish("humidity", humidity_buffer){ log("Data published succeeded!"); } else { log("Data publish failed"); } delay(5000); } void log() {}
Hack the Coffee Machine
Hack the coffee machine
Hack the coffee machine FC-51 Infra Red Distance Sensor
Hack the coffee machine
Communication Protocol
Why MQTT? • Invented in 1999 by IBM and Eurotech
• Version 3.1.1 is now an OASIS Standard (Since November 2014) • mqtt.org
MQTT: light Pub/Sub model
Why MQTT? • Low overhead • Based on TCP/IP •
Low energy consumption • Support of WebSocket • Different implementations: Java/Python/C++ • Commercial and Open Source version
Backend
Backend • Node.js app on Heroku ◦ Connect to CloudMQTT
via Websocket ◦ REST service using Express ◦ Index/Query Elasticsearch data • Data in ElasticSearch ◦ JSON over HTTP ◦ Data aggregation made easy
Elasticsearch Aggregation "aggregations" : { "<aggregation_name>" : { "<aggregation_type>" :
{ <aggregation_body> } [,"aggregations" : { [<sub_aggregation>]+ } ]? } [,"<aggregation_name_2>" : { ... } ]* }
Frontend
Frontend • Data Visualization • Data Pulling: auto refresh every
5min • Deployed on Github pages • Tools we love
MQTT Broker (Cloud- MQTT) Architecture Overview CC3200 Sensors (Meeting room)
ElasticSearch (Bonsai Cluster) REST Service (Heroku Instance) FrontEnd Web Dashboard (Github Pages) Publish Subscribe Deliver Data Indexing Search & Aggregation CC3200 Sensors (Mezzanine) Publish
Difficulties
Difficulties • Newbies in electronics • Unstable Wi-Fi condition •
Curiosity visitors • Time! Time! Time!
Dashboard
Dashboard live: http://bit.ly/1e1sCER
Coworkers’ Reaction
Before
After
1st tweet
Next Steps
Physical Indications • Meeting room occupation sign • Button obsession
◦ Check-in button ◦ Croissant button • Hack the LED screen
Connected X • Connected Chairs • Connected Fridge • Connected
storage for mobile device ◦ RFID + Monitor Screen ◦ Inventory Made Easy
iBeacons • Presence tracking • Information pushing
Data mining • Data analysis and correlation • Prediction
Acknowledgment
Acknowledgment • Qian Jin (hardware + back) • Sameh Ben
Fredj (hardware) • Benjamin Lacroix (front) • Thomas Guerin (back) • Julien Buret (hardware) • Xebians who actively give suggestions ;)
Working Session
Thank you! Q&A