Advertisement
Advertisement

More Related Content

Advertisement
Advertisement

Making Smart Homes Smarter With Javascript

  1. Smart Homes Made Smarter With JS Joel Lord Guidebook app: NEPHP2016
  2. www.spiria.com Smart Homes MadeSmarter With Javascript PresentedBy JOEL LORD North EastPHP 2016,Charlottetown,PE August 5th,2016
  3. #NEPHP @joel__lord JOEL LORD About me,eh? • Javascript Junkie • Tinkerer • Technology enthusiast
  4. #NEPHP @joel__lord
  5. #NEPHP @joel__lord JOEL LORD About me,eh? • Javascript Junkie • Tinkerer • Technology enthusiast
  6. #NEPHP @joel__lord AGENDA Wink Ecosystem Macros (or Robots) IFTTT Introducing WinkJS Demos Q&A
  7. #NEPHP @joel__lord I <3 GADGETS About me,eh?
  8. State of the Market HOME AUTOMATION
  9. #NEPHP @joel__lord TheHome automation market • There are many options out there ! @joel__lord
  10. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest @joel__lord
  11. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE @joel__lord
  12. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE • Philips @joel__lord
  13. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE • Philips • Insteon @joel__lord
  14. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings @joel__lord
  15. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo @joel__lord
  16. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot @joel__lord
  17. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot • Schlage @joel__lord
  18. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot • Schlage • Lutron @joel__lord
  19. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot • Schlage • Lutron • Zigbee @joel__lord
  20. #NEPHP @joel__lord TheHome automation market • There are many options out there ! • Nest • GE • Philips • Insteon • Samsung SmartThings • Belkin Wemo • iRobot • Schlage • Lutron • Zigbee • Z-wave @joel__lord
  21. #NEPHP @joel__lord TheHome 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
  22. #NEPHP @joel__lord TheHome 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
  23. #NEPHP @joel__lord Thehome automation market • Each device has it’s own app • Soon, your phone is a mess and you can’t control your devices @joel__lord
  24. #NEPHP @joel__lord Wink ecosystem • Connect various devices from various providers within a single application 8/4/2016 24 @joel__lord
  25. #NEPHP @joel__lord Wink ecosystem • Connect various devices from various providers within a single application • But even better… 8/4/2016 25 @joel__lord
  26. #NEPHP @joel__lord Wink ecosystem • Connect various devices from various providers within a single application • But even better… They have an API 8/4/2016 26 @joel__lord
  27. #NEPHP @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 8/4/2016 27 @joel__lord
  28. #NEPHP @joel__lord Wink ecosystem 8/4/2016 @joel__lord 28
  29. #NEPHP @joel__lord Wink ecosystem 8/4/2016 @joel__lord 29
  30. #NEPHP @joel__lord Wink ecosystem 8/4/2016 @joel__lord 30
  31. #NEPHP @joel__lord Wink demo 8/4/2016 31 @joel__lord
  32. #NEPHP @joel__lord Wink demo 8/4/2016 @joel__lord 32 • Pretty limited
  33. #NEPHP @joel__lord Wink demo 8/4/2016 @joel__lord 33 • Pretty limited • Robots are the Wink equivalent to macros
  34. Wink Robots MAKE IT SMARTER
  35. #NEPHP @joel__lord Wink demo 8/4/2016 @joel__lord 35
  36. #NEPHP @joel__lord Wink demo 8/4/2016 @joel__lord 36
  37. #NEPHP @joel__lord Wink demo 8/4/2016 @joel__lord 37
  38. #NEPHP @joel__lord Wink demo 8/4/2016 @joel__lord 38
  39. #NEPHP @joel__lord Wink demo 8/4/2016 @joel__lord 39
  40. #NEPHP @joel__lord Wink demo 8/4/2016 @joel__lord 40
  41. #NEPHP @joel__lord Wink demo 8/4/2016 @joel__lord 41
  42. IFTTT Integration MAKE IT SMARTER
  43. #NEPHP @joel__lord Let’s makeit smarter 8/4/2016 @joel__lord 43 • Integration with Amazon Echo • Integration with IFTTT – Either using the Maker Channel – Or using a third party
  44. #NEPHP @joel__lord Introducing IFTTT 8/4/2016 @joel__lord 44 • 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
  45. #NEPHP @joel__lord IFTTT demo 8/4/2016 @joel__lord 45 • http://cl.ly/300R1310191F
  46. #NEPHP @joel__lord And evenmore smart ! 8/4/2016 @joel__lord 46 • Let’s make it even smarter • We need more control over our things
  47. #NEPHP @joel__lord And evenmore smart ! 8/4/2016 @joel__lord 47 • We need : – Variables – Functions – More third party integrations
  48. Introducing WinkJs MAKE IT SMARTER
  49. #NEPHP @joel__lord Introducing Winkjs 8/4/2016 @joel__lord 49 • REST API • Uses OAUTH • More or less standard API objects
  50. #NEPHP @joel__lord Introducing winkjs 8/4/2016 @joel__lord 50 • Door Lock object { last_reading: { locked: true }, desired_state: { } }
  51. #NEPHP @joel__lord Introducing winkjs 8/4/2016 @joel__lord 51 • Thermostat object { last_reading: { temperature: "18.5", units: "C" }, desired_state: { } }
  52. #NEPHP @joel__lord Introducing winkjs 8/4/2016 @joel__lord 52 • Light Bulb object { last_reading: { brightness: 0.5, powered: true }, desired_state: { } }
  53. #NEPHP @joel__lord Introducing winkjs 8/4/2016 @joel__lord 53
  54. #NEPHP @joel__lord Introducing winkjs 8/4/2016 @joel__lord 54
  55. #NEPHP @joel__lord Introducing winkjs 8/4/2016 @joel__lord 55 • A simple Hello World var Wink = require("wink"); var apiCredentials = require("./credentials"); var wink = new Wink(apiCredentials); wink.on("ready", function() { var light = wink.getDeviceByName("Light1"); light.off(); });
  56. #NEPHP @joel__lord Introducing winkjs 8/4/2016 @joel__lord 56 • A Twitter integration //Web server var express = require("express"); var app = express(); var server = require("http").createServer(app); var twit = require("twit"); var keyword = "#devteach"; var Wink = require("../lib"); var apiCredentials = require("./credentials"); var twitterCredentials = require("./twitterCredentials"); var wink = new Wink(apiCredentials); //Web socket var port = 3333; //Start server server.listen(port, function () { console.log("Server started on port " + port); }); //Twitter Stream listener var t = new twit(twitterCredentials); var stream = t.stream("statuses/filter", {track: keyword}); var lights = []; var winkReady = false; wink.on("ready", function(devices) { console.log("ready"); winkReady = true;
  57. IT’S CODING TIME! LET’S GET SERIOUS
  58. IT’S CODING TIME! LET’S GET SERIOUS
  59. #NEPHP @joel__lord Howabout Security? 8/4/2016 @joel__lord 59 • You have to be intentional
  60. #NEPHP @joel__lord Howabout Security? 8/4/2016 @joel__lord 60 • You have to be intentional • Keep in mind that you are exposing your home lights to hackers
  61. #NEPHP @joel__lord Howabout Security? 8/4/2016 @joel__lord 61 • You have to be intentional • Keep in mind that you are exposing your home lights to hackers • Or worse… your front door lock.
  62. #NEPHP @joel__lord Howabout Security? 8/4/2016 @joel__lord 62 • 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
  63. DOCUMENT CONFIDENTIEL, TOUT DROIT RÉSERVÉ PRESENTED BY TheEnd ! Questions ? JOEL LORD August2016 TWITTER: @JOEL__LORD GITHUB: HTTP://GITHUB.COM/JOELLORD http://bit.ly/2au33dH

Editor's Notes

  1. Thank you to NEPHP for giving me my first talking opp a few years ago (Daycamp 4 Dev plug)
  2. Javascript but used to do PHP I plug things to Arduinos and Pis I love technology and new gadgets I work for Spiria
  3. They have a PokeStop
  4. If you want to connect, Twitter
  5. What I want you to learn from this. I feel that we are not quite there yet. I want to inspire you to start playing with smart home stuff Our responsibility as tech people As we start adding scripts and shit, manufacturers will join in
  6. I love gadgets About a year ago, bought a new house Wanted to connect things
  7. But where do you get started
  8. Many options
  9. Too many apps Hard to play with it Faster to use the light switch (girlfriend example)
  10. Disclosure: I don’t work for them or anything but it’s a nice platform
  11. Here’s how Nest thermostat works
  12. When you add in Wink to SEND data to the thermostatn
  13. And receiving thte data back
  14. Open IPEVO
  15. As you can see, very limited to my interactions with the app Not smart Technology is useful when you don’t see it Garage lights example
  16. This is where macros come in handy
  17. Create a new one
  18. Give it a lable
  19. Add a condition (when I leave this location)
  20. Add an action
  21. Turn off lights
  22. Tada ! Be careful, when you leave if there are people in the house
  23. Just a side note Back to IFTTT Show of hands for IFTTT
  24. Quick demo
  25. Ok, so that works but slow (polling 10-15 mintes)
  26. As programmers, we want to integrate with other stuff Patio door example
  27. Node wrapper around the API
  28. Here is where it fits in
  29. Integration with IFTTT, Twitter or Pi and Arduino
Advertisement