Upload
raul-chong
View
319
Download
3
Tags:
Embed Size (px)
DESCRIPTION
These are the slides used in the Toronto-SMAC meetup: "Rapidly developing IoT (Internet of Things) applications - Part 2" http://www.meetup.com/Toronto-SMAC-Social-Mobile-Analytics-Cloud-Meetup/events/195132732/ Topics covered: - Arduino and sensors: Bus simulation project - Freakduino and solar panels: Vibrometer project - Raspberry-Pi: Home security system (part 2) - Oculus Rift: Developing an Educational game (part 2) - Beacons: Tracking customer patterns at a retail store - Introduction to Node-Red
Citation preview
#TOSMAC
Toronto SMAC Meetup – Welcome!Rapidly Developing Internet of Things (IoT) Applications - Part 2
#TOSMAC
IoT using Node-REDRapidly Developing Internet of Things (IoT) Applications - Part 2
| © 2014 IBM Corporation *
Túlio Pascoal - [email protected] Leão - [email protected]
#TOSMAC
Winter in Toronto...
#TOSMAC
Let’s go to Mexico!
#TOSMAC
Meanwhile ...
#TOSMAC
Meanwhile ...What happened?
#TOSMAC
But how can we help preventing
this?
#TOSMAC
#TOSMAC
Let’s explore it better...
#TOSMAC
IoT using Node-REDRapidly Developing Internet of Things (IoT) Applications - Part 2
| © 2014 IBM Corporation *
#TOSMAC
#TOSMAC
#TOSMAC
#TOSMAC
#TOSMAC
What about TI Sensor Tag CC2541?
#TOSMAC
What about BeagleBone Black?
#TOSMAC
IBM Internet of Things Cloud Beta
#TOSMAC
Fire Alarm App
#TOSMAC
Use Case - Fire Alarm App Sequence
TI Sensor Tag
BeagleBone Black
Internet of Things
#TOSMAC
Use Case - Fire Alarm App Sequence
TI Sensor Tag
BeagleBone Black
Internet of Things
#TOSMAC
Use Case - Fire Alarm App Sequence
TI Sensor Tag
BeagleBone Black
Internet of Things
#TOSMAC
Use Case - Fire Alarm App Steps
1. Connect the USB Hub (with Wireless adapter + Bluetooth adapter) to the BeagleBone Black.
1. Connect the BeagleBone Black to the computer.
1. Make sure to have a WiFi connection (my cellphone is hotspotting).
1. Set up the BeagleBone Black.
#TOSMAC
Use Case - Fire Alarm App DevicesBeagleBone Black
USB Hub
TI Sensor Tag
Cellphone
Computer
USB adapterWireless adapter
#TOSMAC
Use Case - Fire Alarm App Steps
1. Connect the USB Hub (with Wireless adapter + Bluetooth adapter) to the BeagleBone Black.
1. Connect the BeagleBone Black to the computer.
1. Make sure to have a WiFi connection (my cellphone is hotspotting).
1. Set up the BeagleBone Black.
#TOSMAC
Use Case - Fire Alarm App Devices
USB adapterWireless adapter
BeagleBone Black
USB Hub
TI Sensor Tag
Cellphone
Computer
#TOSMAC
Use Case - Fire Alarm App Steps
1. Connect the USB Hub (with Wireless adapter + Bluetooth adapter) to the BeagleBone Black.
1. Connect the BeagleBone Black to the computer.
1. Make sure to have a WiFi connection (my cellphone is hotspotting).
1. Set up the BeagleBone Black.
#TOSMAC
Use Case - Fire Alarm App Devices
USB adapterWireless adapter
BeagleBone Black
USB Hub
TI Sensor Tag
Cellphone
Computer
#TOSMAC
Use Case - Fire Alarm App Steps
1. Connect the USB Hub (with Wireless adapter + Bluetooth adapter) to the BeagleBone Black.
1. Connect the BeagleBone Black to the computer.
1. Make sure to have a WiFi connection (my cellphone is hotspotting).
1. Set up the BeagleBone Black.
#TOSMAC
Setting up the BeagleBone Black
#TOSMAC
Use Case - Fire Alarm App Devices
USB adapterWireless adapter
BeagleBone Black
USB Hub
TI Sensor Tag
Cellphone
Computer
#TOSMAC
Use Case - Fire Alarm App Sequence
TI Sensor Tag
BeagleBone Black
Internet of Things
#TOSMAC
Use Case - Fire Alarm App Sequence
TI Sensor Tag
BeagleBone Black
Internet of Things
#TOSMAC
Use Case - Fire Alarm App Node-RED flow
#TOSMAC
Cloudant Node - Under development
#TOSMAC
Definitely relax...
#TOSMAC
Vibration Recorderand Analyzer
| © 2014 IBM Corporation 35
Vinícius Guzman – [email protected] Domingues – [email protected] Lima – [email protected]
#TOSMAC
The problemOverhead transmission lines are often vibrating due to the action of winds.As a consequence:
• Cables experience alternate stresses due to wind-induced vibration• Alternate stresses may lead them to fatigue failure
April 21, 2014| © 2014 IBM Corporation
Cable vibrating Cable/clamp assembly Cable failure due to fatigue
#TOSMAC
Vibration recorders and the project ideaDevices which measure cables vibration and predicting its remaininglife based on these measurements. This manner this project will try tosolve this problems using:
April 21, 2014| © 2014 IBM Corporation
• Solar panel• Cloud computing
Prototype design Vibration recorder
#TOSMAC
System Architecture
April 21, 2014| © 2014 IBM Corporation
Vibration Recorders
BlueMix Cloud
#TOSMAC
Arduino
Open-source platform
Single-board microcontroller
#TOSMAC
Freakduino
Based on Arduino Long range wireless
• Few km
Low power• 0.2 W (average)• 2.5 W (max)
#TOSMAC
Ethernet Shield
Wired internet connection for the Freakduino
Sends collected data using HTTP requests
#TOSMAC
Accelerometer
3 axis acceleration information
Use cases: • Object falling• Cable movement
#TOSMAC
The prototype
TowersFreakduino + Accelerometer
Last DeviceFreakduino + Ethernet Shield
#TOSMAC
Web Application
| © 2014 IBM Corporation 44
BlueMixRuby on Rails
#TOSMAC
Manipulating the data sent by devices
| © 2014 IBM Corporation 45
DATA
Collect Store Analyze Show
HTTP SQL DatabaseService
RUBY Google CHARTS
#TOSMAC
Demo
#TOSMAC
Arduino and sensors: Bus simulation and Parking lot Simulator
Rapidly Developing Internet of Things (IoT) Applications - Part 2
| © 2014 IBM Corporation *
Wilton Cesar Leite PelicariBrayan Crispiano KsenhuckThiago de Aguiar Leal DominguesCesar Henrique Bernabe
#TOSMAC
| © 2014 IBM Corporation 48
Client-sideServer-side
Technologies used
Bluemix
#TOSMAC
Projects
| © 2014 IBM Corporation *
#TOSMAC
ArduinoRapidly Developing Internet of Things (IoT) Applications
| © 2014 IBM Corporation 50
#TOSMAC
Arduino (Setup)Rapidly Developing Internet of Things (IoT) Applications
| © 2014 IBM Corporation 51
#TOSMAC
Arduino (Setup)Rapidly Developing Internet of Things (IoT) Applications
| © 2014 IBM Corporation 52
#TOSMAC
Arduino + BlueMixRapidly Developing Internet of Things (IoT) Applications
| © 2014 IBM Corporation 53
Bluemix
#TOSMAC
| © 2014 IBM Corporation *
#TOSMAC
Arduino + BlueMixRapidly Developing Internet of Things (IoT) Applications
| © 2014 IBM Corporation 55
#TOSMAC
| © 2014 IBM Corporation 56
Back-end Settings
Socket.IO Used to receive data from Arduino Update the client browser in real time
Cradle Used to connect with Cloudant Store passenger history for future evaluation
Node.js modules
#TOSMAC
| © 2014 IBM Corporation 57
Socket.IO – APP.jsNode.js modules
var socket = require('socket.io');
var server = app.listen(3000);var io = socket(server);
io.on('connection', function(socket){console.log('A user is connected');
});
app.post('/refresh', function(req, res){var buses = String2Array(req.body.data);saveCloudant(buses);io.emit('refresh', {data: buses});res.send('Data Received');});
#TOSMAC
| © 2014 IBM Corporation 58
Socket.IO – js/controller.jsNode.js modules
var socket = io();var ids = [];
socket.emit('connection', {});socket.on('refresh', function(buses){buses.forEach(function(bus){
update(bus[0], bus[1], bus[2]);});});
function update(id, passengers, lotation){$('#' + id + " span").html(passengers + " of " + lotation + " passengers");changeColor(id, passengers, lotation);}
#TOSMAC
| © 2014 IBM Corporation 59
Cradle – APP.jsNode.js modules
#TOSMAC
| © 2014 IBM Corporation 60
Cradle – APP.jsNode.js modules
var cradle = require('cradle');var env = JSON.parse(process.env.VCAP_SERVICES);var credentials = env["cloudantNoSQLDB"][0].credentials;var cloudant = new(cradle.Connection)(credentials.url, credentials.port, {cache: true,secure: true,raw: false,auth: {
username: credentials.username,password: credentials.password
}});
var passengers = cloudant.database('passengers');
#TOSMAC
| © 2014 IBM Corporation 61
Cradle – APP.jsNode.js modules
var saveCloudant = function(buses){buses.forEach(function(bus){
passengers.save(bus[0], {date: new Date().getTime(),passengers: bus[1],lotation: bus[2]
}, function(err, res){err ? console.log('err: ', err) : console.log('res: ', res);
});});}
#TOSMAC
| © 2014 IBM Corporation *
Front-end Settings
Open Data Collection● Retrieving information from Toronto Transit Comission's Open Data Service
using Ajax
Node.js modules
#TOSMAC
| © 2014 IBM Corporation
#TOSMAC
| © 2014 IBM Corporation
#TOSMAC
| © 2014 IBM Corporation
URL ParametersRoutes:
"http://webservices.nextbus.com/service/publicXMLFeed?command=routeList&a=" + agencyTag
Stops:"http://webservices.nextbus.com/service/publicXMLFeed?command=routeC
onfig&a=" + agencyTag + "&r=" + routeTag + "&terse"
Predictions:http://webservices.nextbus.com/service/publicXMLFeed?command=predicti
ons&a=" + agencyTag + "&r=" + routeTag + "&s=" + stopTag
#TOSMAC
| © 2014 IBM Corporation
Live Demos
http://parkingproject.mybluemix.net/
http://busproject.mybluemix.net/
Parking Lot
Bus Project
#TOSMAC
Final Considerations
| © 2014 IBM Corporation 67
#TOSMAC
Virtual Reality based learningRapidly Developing Internet of Things (IoT) Applications
| © 2014 IBM Corporation *
#TOSMAC
Virtual Reality Geography GameInfo & Demonstration
| © 2014 IBM Corporation *
#TOSMAC
Integrating VR game with BluemixThe Architecture behind it
| © 2014 IBM Corporation *
Web applicationGame ApplicationRunning locally
Internet
HTTP
#TOSMAC
Professor scenario
Environment
Historical facts
Population and economy
#TOSMAC
Cloudant to game
Facts and curiositiesWeb application
#TOSMAC
Combining first and second phase
#TOSMAC
Future enhancements
● Log in● Create classroom● Rank
#TOSMAC
Thank you!
Questions?
| © 2014 IBM Corporation *
#TOSMAC
Beacons: Tracking customer patterns at a retail store with indoor mapping
Rapidly Developing Internet of Things (IoT) Applications – Part 2
| © 2014 IBM Corporation76
Danilo Augusto SilvaYuka Kyushima Solano
Pargles Wenz Dall'Oglio
#TOSMAC
Agenda
| © 2014 IBM Corporation
1. What is an iBeacon?2. Indoor Mapping Motivation3. Solution Using Beacons4. Demonstration5. Android Application6. Web Application7. Analytics with R8. Questions
2
#TOSMAC
What is an iBeacon
| © 2014 IBM Corporation
- Apple trademark for location and proximity detection technology.
3
#TOSMAC
What is an iBeacon
| © 2014 IBM Corporation
- Apple trademark for location and proximity detection technology.
How it works?
4
#TOSMAC
What is an iBeacon
| © 2014 IBM Corporation
- Unique ID (UUID).- proximityUUID- major- minor
- RSSI (Received Signal Strength Indicator).
#TOSMAC
What is an iBeacon
| © 2014 IBM Corporation
#TOSMAC
Contextual Applications
| © 2014 IBM Corporation5
#TOSMAC
Contextual Applications
| © 2014 IBM Corporation6
#TOSMAC
Indoor Mapping Motivation
| © 2014 IBM Corporation7
#TOSMAC
Indoor Mapping Motivation
| © 2014 IBM Corporation8
#TOSMAC
Indoor Mapping - Current Scenario
| © 2014 IBM Corporation9
- Global Positioning System (GPS).- Wi-Fi SLAM (Simultaneous Localization and Mapping).- Problems:
- Applicability.• - Precision.
#TOSMAC
Indoor Mapping – The idea
| © 2014 IBM Corporation10
#TOSMAC
Indoor Mapping – Theory
| © 2014 IBM Corporation9
#TOSMAC
Indoor Mapping – Theory
| © 2014 IBM Corporation9
#TOSMAC
Indoor Mapping – Our approach
| © 2014 IBM Corporation9
#TOSMAC
Indoor Mapping – Our approach
| © 2014 IBM Corporation9
#TOSMAC
Indoor Mapping – Our approach
| © 2014 IBM Corporation9
#TOSMAC
Indoor Mapping – Our approach
| © 2014 IBM Corporation9
#TOSMAC
Indoor Mapping – Final equation
| © 2014 IBM Corporation9
#TOSMAC
Demonstration
| © 2014 IBM Corporation12
#TOSMAC
Android Application – What you need to know
| © 2014 IBM Corporation9
- Estimote Android SDK (https://github.com/Estimote/Android-SDK)- Bluemix Account (http://www.bluemix.net)
#TOSMAC
Android Application – Estimote SDK for Android
| © 2014 IBM Corporation9
#TOSMAC
Android Application – Estimote SDK for Android
| © 2014 IBM Corporation9
#TOSMAC
Web Application System
Web ApplicationMobile Data Analytics Warehouse
#TOSMAC
Mobile Data
#TOSMAC
Web Application System
Web ApplicationMobile Data Analytics Warehouse
Name, d1, d2, d3
#TOSMAC
Web Application
#TOSMAC
Web Application System
Web ApplicationMobile Data Analytics Warehouse
Name, d1, d2, d3
x = f(d1,d2,d3)y = f(d1,d2,d3)
#TOSMAC
Analytics Warehouse
#TOSMAC
Web Application System
Web ApplicationMobile Data Analytics Warehouse
Name, d1, d2, d3 Name, x, y, date
x = f(d1,d2,d3)y = f(d1,d2,d3)
#TOSMAC
Create a Mobile App on Bluemix
#TOSMAC
Create a Mobile App on Bluemix
#TOSMAC
Create a Mobile App on Bluemix
#TOSMAC
Create a Mobile App on Bluemix
#TOSMAC
Get data via Node.js
Initializationapp.js file
#TOSMAC
Get data via Node.js
Server Side
Client Side
#TOSMAC
Website
#TOSMAC
Add Analytics Warehouse Service
#TOSMAC
Add Analytics Warehouse Service
#TOSMAC
Add Analytics Warehouse Service
#TOSMAC
Add Analytics Warehouse Service
#TOSMAC
Send data via Node.js
Server Side
#TOSMAC
Send data via Node.js
Client Side
#TOSMAC
Launch Analytics Warehouse
#TOSMAC
Launch Analytics Warehouse
#TOSMAC
Launch Analytics Warehouse
#TOSMAC
Work with tables
#TOSMAC
Work with tables
#TOSMAC
Work with tables
#TOSMAC
Analyze data with R
#TOSMAC
Analyze data with R
#TOSMAC
Analyze data with R
#TOSMAC
Analyze data with R
#TOSMAC
Analyze data with R
#TOSMAC
Analyze data with R
#TOSMAC
Questions?
| © 2014 IBM Corporation
#TOSMAC
DIY Home Surveillance SystemRapidly Developing Internet of Things (IoT) Applications - Part 2
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance System - Scenario
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance System - Scenario
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance SystemRapidly Developing Internet of Things (IoT) Applications
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance System - What we had?
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance SystemRapidly Developing Internet of Things (IoT) Applications
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance System - What’s New?
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance System - Architecture
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance System - Raspberry Pi
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance System - Bluemix
| © 2014 IBM Corporation *
#TOSMAC
Live Demo
http://homeguard.mybluemix.net
| © 2014 IBM Corporation *
#TOSMAC
DIY Home Surveillance SystemFuture developments
| © 2014 IBM Corporation *
● Motion detection;● Video recording and upload to cloudant;● Android interface;
#TOSMAC
Questions?
| © 2014 IBM Corporation *
#TOSMAC
Thank you!Let’s network!
| © 2014 IBM Corporation *