Smarter Home Automation without the Cloud

11954e59b49809173d48133ec4047fce?s=47 Aaron Parecki
November 07, 2019

Smarter Home Automation without the Cloud

Video: https://vimeo.com/371873292

Most off-the shelf home automation systems rely on cloud services, and are limited to simple rules like "turn on this light when there is motion". It's extremely limiting, and usually results in failures in more complicated settings like when multiple people live at a house, or if you don't have a regular 9-5 schedule. These cloud-enabled devices also fail when your internet connection is down.

In this talk we'll look at how to set up a home automation system that runs entirely locally, and takes into account additional context-aware inputs so that you don't accidentally turn on the lights in the middle of the night.

11954e59b49809173d48133ec4047fce?s=128

Aaron Parecki

November 07, 2019
Tweet

Transcript

  1. @aaronpk SMARTER HOME AUTOMATION
 WITHOUT THE CLOUD AARON PARECKI Øredev

    2019 @aaronpk • aaronpk.com
  2. @aaronpk NetAtmo SmartThings Nest Ring Insignia

  3. @aaronpk ☁

  4. None
  5. @aaronpk

  6. None
  7. None
  8. None
  9. @aaronpk

  10. @aaronpk ☁ ⚙

  11. @aaronpk HOW DID WE GET HERE?

  12. @aaronpk USER EXPERIENCE

  13. @aaronpk USER EXPERIENCE
 OF SETUP

  14. @aaronpk MOBILE APPS ☁

  15. @aaronpk "It's amazing how much you miss a simple old

    light switch when you have to pull out your phone, fumble through a poorly designed app, and then wait half a second for the light to turn on." - Adam Clark Estes, Gizmodo https://gizmodo.com/why-is-my-smart-home-so-fucking-dumb-1684949715
  16. @aaronpk

  17. @aaronpk SHOULD HELP YOU, HOME AUTOMATION NOT GET IN THE

    WAY
  18. @aaronpk ADD CONTEXT

  19. @aaronpk Turn the lights on when someone gets home You

    get home after other 
 people are already asleep,
 waking them up with the lights Phone wifi reconnects / GPS glitches and it thinks you got home at 4am and turns on all the lights
  20. @aaronpk Turn the lights on when someone gets home only

    if nobody is in bed
  21. @aaronpk Open the shades at sunrise Wasteful when nobody is

    home
  22. @aaronpk Open the shades at sunrise only if someone is

    at home
  23. @aaronpk Close the shades when the sun shines through the

    window ☀ (ranges from 1pm-4pm seasonally)
  24. @aaronpk Turn on the A/C when it's over 22°C inside

    ❄ Takes longer to cool down
 once it's already warm inside
  25. @aaronpk Turn on the A/C 
 when it will be

    over 22°C outside in an hour ❄ ☀
  26. @aaronpk Turn the lights on when someone gets out of

    bed Wakes up the other person too early Too bright when you get up at 4am
  27. @aaronpk Turn the lights on when 
 everyone at home

    
 gets out of bed Turn the lights on dim 
 when someone gets up 
 and it's still dark outside
  28. @aaronpk Turn the lights off when someone gets in bed

    Turns off the lights when someone else is still awake
  29. @aaronpk Turn the lights off when 
 everyone at home

    
 gets into bed Turn the bedroom lights off 
 when someone gets into bed
  30. @aaronpk Set the lights to "TV Mode" when TV is

    turned on Too dark to watch TV while cooking dinner Too dark if you pause
 to get up to get a drink
  31. @aaronpk Set the lights to "TV Mode" when TV is

    turned on only if someone is sitting on the couch
  32. @aaronpk Bring up the lights a little 
 when the

    TV is paused ⏸
  33. @aaronpk Bring up the lights a little 
 when someone

    gets off the couch 
 when the TV is on ⏸
  34. @aaronpk LET'S BUILD IT!

  35. @aaronpk homeassistant.io

  36. @aaronpk ☀ ❄

  37. @aaronpk

  38. @aaronpk HOME ASSISTANT AUTOMATIONS

  39. @aaronpk NODE-RED AUTOMATIONS

  40. @aaronpk nodered.org

  41. @aaronpk Home Assistant DEVICE COMMUNICATION
 STATE MANAGEMENT VISUAL PROGRAMMING
 RULES

    ENGINE
  42. @aaronpk INPUTS / OUTPUTS

  43. @aaronpk Lights Philips Hue

  44. @aaronpk Zigbee to its own hub No internet required or

    Bluetooth only, no hub Philips Hue
  45. @aaronpk Temperature Zigbee/Z-wave devices (~$60)
 433mhz sensors (~$10)

  46. @aaronpk

  47. @aaronpk Home presence detection mobile phone apps
 home wifi
 bluetooth

    beacons
  48. @aaronpk MOBILE APP TRACKING OwnTracks GPSLogger

  49. @aaronpk WIFI TRACKING Wifi router pushes presence into Home Assistant

  50. @aaronpk BLUETOOTH DEVICES Home Assistant can watch for Bluetooth devices

  51. @aaronpk Sunrise/Sunset Times ☀ home location, math

  52. @aaronpk Sun Angle in Windows ☀ home location, window direction,

    math
  53. @aaronpk Weather Forecast ☀ hourly, daily
 weather api

  54. @aaronpk darksky.net

  55. @aaronpk Window Shades all-in-one motorized window shades retrofit options

  56. @aaronpk Soma 
 Smart Shades bluetooth

  57. @aaronpk

  58. @aaronpk

  59. @aaronpk Air Conditioner controlled via IR remote ❄

  60. @aaronpk Broadlink RM Mini 3 (block its internet access!) WiFi

    to Infrared bridge
  61. @aaronpk

  62. @aaronpk TV On/Off smart tv? commercial display

  63. @aaronpk https://github.com/grantemsley/viewsonictvrs232 USB to RS232

  64. @aaronpk Bed presence detection flex sensor under mattress slats

  65. @aaronpk

  66. @aaronpk esphome.io DIY SENSORS NO CODING!

  67. @aaronpk

  68. @aaronpk

  69. @aaronpk

  70. @aaronpk

  71. @aaronpk 1 Person at Home? 1 person 
 gets in

    bed Lights off 1 person gets
 out of bed Lights on Lights dim red dark 
 outside? no yes
  72. @aaronpk 2 People at Home? 1 person 
 gets in

    bed Bedroom 
 lights off 2 people 
 get in bed All 
 lights off
  73. @aaronpk 2 People at Home? 2 people 
 get out

    of bed All 
 lights on 1 person 
 gets out of bed Lights on
 dim red
  74. @aaronpk

  75. @aaronpk Automatic Cat Feeder kitchen scale, cereal dispenser, motor, distance

    sensor, esp32, MQTT
  76. @aaronpk

  77. @aaronpk

  78. @aaronpk

  79. @aaronpk Pressure sensor under couch Audio level sensor Local voice

    assistant (mycroft.ai) Cat presence detector? FUTURE EXPERIMENTS
  80. @aaronpk THANK YOU! @aaronpk aaronpk.com aaronpk.com/oredev19 SLIDES