Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
www.spiria.com
Smart Homes Made
Smarter With Javascript
Presented By
JOEL LORD
Ottawa Javascript
November 9th, 2016
@ottawa_js
@joel__lord
JOEL LORD
About me
• Javascript Junkie
• Tinkerer
• Technology enthusiast
@ottawa_js
@joel__lord
AGENDA Wink Ecosystem
Macros (or Robots)
IFTTT
Introducing WinkJS
Demos
Q&A
@ottawa_js
@joel__lord
I <3 GADGETS
About me, eh?
State of the Market
HOME AUTOMATION
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
@joel__lord
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
@joel__lord
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
@joel__lord
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
@joel__lord
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
@jo...
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
• S...
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
• S...
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
• S...
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
• S...
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
• S...
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
• S...
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
• S...
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
• S...
@ottawa_js
@joel__lord
The Home automation market
• There are many options out there !
• Nest
• GE
• Philips
• Insteon
• S...
@ottawa_js
@joel__lord
The home automation market
• Each device has it’s own app
• Soon, your phone is a mess and you can’...
@ottawa_js
@joel__lord
Wink ecosystem
• Connect various devices from various providers within a single
application
11/10/1...
@ottawa_js
@joel__lord
Wink ecosystem
• Connect various devices from various providers within a single
application
• But e...
@ottawa_js
@joel__lord
Wink ecosystem
• Connect various devices from various providers within a single
application
• But e...
@ottawa_js
@joel__lord
Wink ecosystem
• Connect various devices from various providers within a single
application
• But e...
@ottawa_js
@joel__lord
Wink ecosystem
11/10/16
@joel__lord
25
@ottawa_js
@joel__lord
Wink ecosystem
11/10/16
@joel__lord
26
@ottawa_js
@joel__lord
Wink ecosystem
11/10/16
@joel__lord
27
@ottawa_js
@joel__lord
Wink demo
11/10/16 28
@joel__lord
@ottawa_js
@joel__lord
Wink demo
11/10/16
@joel__lord
29
• Pretty limited
@ottawa_js
@joel__lord
Wink demo
11/10/16
@joel__lord
30
• Pretty limited
• Robots are the Wink equivalent to macros
Wink Robots
MAKE IT SMARTER
@ottawa_js
@joel__lord
Wink demo
11/10/16
@joel__lord
32
@ottawa_js
@joel__lord
Wink demo
11/10/16
@joel__lord
33
@ottawa_js
@joel__lord
Wink demo
11/10/16
@joel__lord
34
@ottawa_js
@joel__lord
Wink demo
11/10/16
@joel__lord
35
@ottawa_js
@joel__lord
Wink demo
11/10/16
@joel__lord
36
@ottawa_js
@joel__lord
Wink demo
11/10/16
@joel__lord
37
@ottawa_js
@joel__lord
Wink demo
11/10/16
@joel__lord
38
IFTTT Integration
MAKE IT SMARTER
@ottawa_js
@joel__lord
Let’s make it smarter
11/10/16
@joel__lord
40
• Integration with Amazon Echo
• Integration with IFT...
@ottawa_js
@joel__lord
Introducing IFTTT
11/10/16
@joel__lord
41
• IFTTT is a free web-based service that allows users to ...
@ottawa_js
@joel__lord
IFTTT demo
11/10/16
@joel__lord
42
• http://cl.ly/300R1310191F
@ottawa_js
@joel__lord
And even more smart !
11/10/16
@joel__lord
43
• Let’s make it even smarter
• We need more control o...
@ottawa_js
@joel__lord
And even more smart !
11/10/16
@joel__lord
44
• We need :
– Variables
– Functions
– More third part...
Introducing WinkJs
MAKE IT SMARTER
@ottawa_js
@joel__lord
Introducing Winkjs
11/10/16
@joel__lord
46
• REST API
• Uses OAUTH
• More or less standard API obje...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
47
• Door Lock object
{
last_reading: {
locked: true
},
des...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
48
• Thermostat object
{
last_reading: {
temperature: "18.5...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
49
• Light Bulb object
{
last_reading: {
brightness: 0.5,
p...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
50
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
51
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
52
• A simple Hello World
var Wink = require("wink");
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
53
• A simple Hello World
var apiCredentials = require("./c...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
54
• A simple Hello World
var wink = new Wink(apiCredential...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
55
• A simple Hello World
wink.on("ready", function() {
});
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
56
• A simple Hello World
var light = wink.getDeviceByName(...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
57
• A simple Hello World
light.on();
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
58
• A simple Hello World
light.off();
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
59
• A simple Hello World
light.toggle();
IT’S CODING TIME!
LET’S GET SERIOUS
IT’S CODING TIME!
LET’S GET SERIOUS
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
62
• Integrating with other objects
var Wink = require("../...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
63
• Integrating with other objects
var apiCredentials = re...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
64
• Integrating with other objects
var wink = new Wink(api...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
65
• Integrating with other objects
wink.on("ready", functi...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
66
• Integrating with other objects
var thermostat = wink.g...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
67
• Integrating with other objects
console.log("Temp: " + ...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
68
• Here comes Johnny !
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
69
• Integrating with Johnny-Five
var five = require("johnn...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
70
• Integrating with Johnny-Five
var five = require("johnn...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
71
• Integrating with Johnny-Five
var board = new five.Boar...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
72
• Integrating with Johnny-Five
var button;
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
73
• Integrating with Johnny-Five
board.on("ready", functio...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
74
• Integrating with Johnny-Five
button = new five.Button(...
@ottawa_js
@joel__lord
Introducing winkjs
11/10/16
@joel__lord
75
• Integrating with Johnny-Five
button.on("down", functio...
@ottawa_js
@joel__lord
How about Security?
11/10/16
@joel__lord
76
• You have to be intentional
@ottawa_js
@joel__lord
How about Security?
11/10/16
@joel__lord
77
• You have to be intentional
• Keep in mind that you ar...
@ottawa_js
@joel__lord
How about Security?
11/10/16
@joel__lord
78
• You have to be intentional
• Keep in mind that you ar...
@ottawa_js
@joel__lord
How about Security?
11/10/16
@joel__lord
79
• Killing a Jeep on the highway:
https://www.wired.com/...
DOCUMENT CONFIDENTIEL, TOUT DROIT RÉSERVÉ
PRESENTED BY
The End !
Questions ?
JOEL LORD
November 2016
TWITTER: @JOEL__LORD
...
Upcoming SlideShare
Loading in …5
×

Smart Homes Made Smarter With Javascript

247 views

Published on

Nowadays, more and more things are getting connected on the Internet. It is now easier than it has ever been to automate some stuff around your house. It's nice to have a button to control lights from your phone but what if you wanted to add some more advanced interactions with your other connected devices. Using WinkJS, a wrapper around the Wink ecosystem APIs, the attendees will learn how to make their smart home smarter.

Published in: Technology
  • Be the first to comment

Smart Homes Made Smarter With Javascript

  1. 1. www.spiria.com Smart Homes Made Smarter With Javascript Presented By JOEL LORD Ottawa Javascript November 9th, 2016
  2. 2. @ottawa_js @joel__lord JOEL LORD About me • Javascript Junkie • Tinkerer • Technology enthusiast
  3. 3. @ottawa_js @joel__lord AGENDA Wink Ecosystem Macros (or Robots) IFTTT Introducing WinkJS Demos Q&A
  4. 4. @ottawa_js @joel__lord I <3 GADGETS About me, eh?
  5. 5. State of the Market HOME AUTOMATION
  6. 6. @ottawa_js @joel__lord The Home automation market • There are many options out there ! @joel__lord
  7. 7. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest @joel__lord
  8. 8. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE @joel__lord
  9. 9. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips @joel__lord
  10. 10. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon @joel__lord
  11. 11. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings @joel__lord
  12. 12. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo @joel__lord
  13. 13. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot @joel__lord
  14. 14. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot • Schlage @joel__lord
  15. 15. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot • Schlage • Lutron @joel__lord
  16. 16. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot • Schlage • Lutron • Zigbee @joel__lord
  17. 17. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot • Schlage • Lutron • Zigbee • Z-wave @joel__lord
  18. 18. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot • Schlage • Lutron • Zigbee • Z-wave • X10 @joel__lord
  19. 19. @ottawa_js @joel__lord The Home automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belking Wemo • iRobot • Schlage • Lutron • Zigbee • Z-wave • X10 @joel__lord
  20. 20. @ottawa_js @joel__lord The home automation market • Each device has it’s own app • Soon, your phone is a mess and you can’t control your devices @joel__lord
  21. 21. @ottawa_js @joel__lord Wink ecosystem • Connect various devices from various providers within a single application 11/10/16 21 @joel__lord
  22. 22. @ottawa_js @joel__lord Wink ecosystem • Connect various devices from various providers within a single application • But even better… 11/10/16 22 @joel__lord
  23. 23. @ottawa_js @joel__lord Wink ecosystem • Connect various devices from various providers within a single application • But even better… They have an API 11/10/16 23 @joel__lord
  24. 24. @ottawa_js @joel__lord Wink ecosystem • Connect various devices from various providers within a single application • But even better… They have an API • It’s not what you do with it that counts, it’s what you can do 11/10/16 24 @joel__lord
  25. 25. @ottawa_js @joel__lord Wink ecosystem 11/10/16 @joel__lord 25
  26. 26. @ottawa_js @joel__lord Wink ecosystem 11/10/16 @joel__lord 26
  27. 27. @ottawa_js @joel__lord Wink ecosystem 11/10/16 @joel__lord 27
  28. 28. @ottawa_js @joel__lord Wink demo 11/10/16 28 @joel__lord
  29. 29. @ottawa_js @joel__lord Wink demo 11/10/16 @joel__lord 29 • Pretty limited
  30. 30. @ottawa_js @joel__lord Wink demo 11/10/16 @joel__lord 30 • Pretty limited • Robots are the Wink equivalent to macros
  31. 31. Wink Robots MAKE IT SMARTER
  32. 32. @ottawa_js @joel__lord Wink demo 11/10/16 @joel__lord 32
  33. 33. @ottawa_js @joel__lord Wink demo 11/10/16 @joel__lord 33
  34. 34. @ottawa_js @joel__lord Wink demo 11/10/16 @joel__lord 34
  35. 35. @ottawa_js @joel__lord Wink demo 11/10/16 @joel__lord 35
  36. 36. @ottawa_js @joel__lord Wink demo 11/10/16 @joel__lord 36
  37. 37. @ottawa_js @joel__lord Wink demo 11/10/16 @joel__lord 37
  38. 38. @ottawa_js @joel__lord Wink demo 11/10/16 @joel__lord 38
  39. 39. IFTTT Integration MAKE IT SMARTER
  40. 40. @ottawa_js @joel__lord Let’s make it smarter 11/10/16 @joel__lord 40 • Integration with Amazon Echo • Integration with IFTTT – Either using the Maker Channel – Or using a third party
  41. 41. @ottawa_js @joel__lord Introducing IFTTT 11/10/16 @joel__lord 41 • IFTTT is a free web-based service that allows users to create chains of simple conditional statements, called "recipes", which are triggered based on changes to other web services such as Gmail, Facebook, Instagram, and Pinterest. IFTTT is an abbreviation of "If This Then That" • -Wikipedia
  42. 42. @ottawa_js @joel__lord IFTTT demo 11/10/16 @joel__lord 42 • http://cl.ly/300R1310191F
  43. 43. @ottawa_js @joel__lord And even more smart ! 11/10/16 @joel__lord 43 • Let’s make it even smarter • We need more control over our things
  44. 44. @ottawa_js @joel__lord And even more smart ! 11/10/16 @joel__lord 44 • We need : – Variables – Functions – More third party integrations
  45. 45. Introducing WinkJs MAKE IT SMARTER
  46. 46. @ottawa_js @joel__lord Introducing Winkjs 11/10/16 @joel__lord 46 • REST API • Uses OAUTH • More or less standard API objects
  47. 47. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 47 • Door Lock object { last_reading: { locked: true }, desired_state: { } }
  48. 48. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 48 • Thermostat object { last_reading: { temperature: "18.5", units: "C" }, desired_state: { } }
  49. 49. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 49 • Light Bulb object { last_reading: { brightness: 0.5, powered: true }, desired_state: { } }
  50. 50. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 50
  51. 51. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 51
  52. 52. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 52 • A simple Hello World var Wink = require("wink");
  53. 53. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 53 • A simple Hello World var apiCredentials = require("./credentials");
  54. 54. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 54 • A simple Hello World var wink = new Wink(apiCredentials);
  55. 55. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 55 • A simple Hello World wink.on("ready", function() { });
  56. 56. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 56 • A simple Hello World var light = wink.getDeviceByName("Light1");
  57. 57. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 57 • A simple Hello World light.on();
  58. 58. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 58 • A simple Hello World light.off();
  59. 59. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 59 • A simple Hello World light.toggle();
  60. 60. IT’S CODING TIME! LET’S GET SERIOUS
  61. 61. IT’S CODING TIME! LET’S GET SERIOUS
  62. 62. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 62 • Integrating with other objects var Wink = require("../lib");
  63. 63. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 63 • Integrating with other objects var apiCredentials = require("./credentials");
  64. 64. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 64 • Integrating with other objects var wink = new Wink(apiCredentials);
  65. 65. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 65 • Integrating with other objects wink.on("ready", function() { });
  66. 66. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 66 • Integrating with other objects var thermostat = wink.getDevicesByType(wink.deviceTypes.THERMOSTAT)[0];
  67. 67. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 67 • Integrating with other objects console.log("Temp: " + thermostat.getTemperature(thermostat.units.CELSIUS) + " °C"); console.log("Temp: " + thermostat.getTemperature(thermostat.units.FAHRENHEIT) + " F");
  68. 68. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 68 • Here comes Johnny !
  69. 69. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 69 • Integrating with Johnny-Five var five = require("johnny-five"); var board = new five.Board(); var button; board.on("ready", function() { button = new five.Button(2); button.on("down", function() { //Button was pressed, do something ! }); });
  70. 70. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 70 • Integrating with Johnny-Five var five = require("johnny-five");
  71. 71. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 71 • Integrating with Johnny-Five var board = new five.Board();
  72. 72. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 72 • Integrating with Johnny-Five var button;
  73. 73. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 73 • Integrating with Johnny-Five board.on("ready", function() { });
  74. 74. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 74 • Integrating with Johnny-Five button = new five.Button(2);
  75. 75. @ottawa_js @joel__lord Introducing winkjs 11/10/16 @joel__lord 75 • Integrating with Johnny-Five button.on("down", function() { //Button was pressed, do something ! });
  76. 76. @ottawa_js @joel__lord How about Security? 11/10/16 @joel__lord 76 • You have to be intentional
  77. 77. @ottawa_js @joel__lord How about Security? 11/10/16 @joel__lord 77 • You have to be intentional • Keep in mind that you are exposing your home lights to hackers
  78. 78. @ottawa_js @joel__lord How about Security? 11/10/16 @joel__lord 78 • You have to be intentional • Keep in mind that you are exposing your home lights to hackers • Or worse… your front door lock.
  79. 79. @ottawa_js @joel__lord How about Security? 11/10/16 @joel__lord 79 • Killing a Jeep on the highway: https://www.wired.com/2015/07/hackers-remotely-kill-jeep- highway/ • Hacking smart door bells: http://thehackernews.com/2016/01/doorbell-hacking-wifi- pasword.html
  80. 80. DOCUMENT CONFIDENTIEL, TOUT DROIT RÉSERVÉ PRESENTED BY The End ! Questions ? JOEL LORD November 2016 TWITTER: @JOEL__LORD GITHUB: JOELLORD

×