$30 off During Our Annual Pro Sale. View Details »

Smarter Home Automation without the Cloud

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.

Aaron Parecki

November 07, 2019
Tweet

More Decks by Aaron Parecki

Other Decks in Technology

Transcript

  1. @aaronpk
    SMARTER HOME AUTOMATION

    WITHOUT THE CLOUD
    AARON PARECKI
    Øredev 2019
    @aaronpk • aaronpk.com

    View Slide

  2. @aaronpk
    NetAtmo SmartThings Nest
    Ring
    Insignia

    View Slide

  3. @aaronpk




    View Slide

  4. View Slide

  5. @aaronpk

    View Slide

  6. View Slide

  7. View Slide

  8. View Slide

  9. @aaronpk

    View Slide

  10. @aaronpk





    View Slide

  11. @aaronpk
    HOW DID WE GET HERE?

    View Slide

  12. @aaronpk
    USER EXPERIENCE

    View Slide

  13. @aaronpk
    USER EXPERIENCE

    OF SETUP

    View Slide

  14. @aaronpk
    MOBILE APPS



    View Slide

  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

    View Slide

  16. @aaronpk

    View Slide

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

    View Slide

  18. @aaronpk
    ADD CONTEXT

    View Slide

  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

    View Slide

  20. @aaronpk
    Turn the lights on when someone gets home
    only if nobody is in bed



    View Slide

  21. @aaronpk
    Open the shades at sunrise

    Wasteful when nobody is home

    View Slide

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


    View Slide

  23. @aaronpk
    Close the shades
    when the sun shines through the window


    (ranges from 1pm-4pm seasonally)

    View Slide

  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

    View Slide

  25. @aaronpk
    Turn on the A/C 

    when it will be over 22°C outside in an hour


    View Slide

  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

    View Slide

  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


    View Slide

  28. @aaronpk
    Turn the lights off when someone gets in bed


    Turns off the lights
    when someone else
    is still awake

    View Slide

  29. @aaronpk
    Turn the lights off when 

    everyone at home 

    gets into bed
    Turn the bedroom lights off 

    when someone gets into bed




    View Slide

  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

    View Slide

  31. @aaronpk
    Set the lights to "TV Mode" when TV is turned on

    only if someone is sitting on the couch

    View Slide

  32. @aaronpk
    Bring up the lights a little 

    when the TV is paused

    View Slide

  33. @aaronpk
    Bring up the lights a little 

    when someone gets off the couch 

    when the TV is on

    View Slide

  34. @aaronpk
    LET'S BUILD IT!

    View Slide

  35. @aaronpk
    homeassistant.io

    View Slide

  36. @aaronpk








    View Slide

  37. @aaronpk

    View Slide

  38. @aaronpk
    HOME ASSISTANT AUTOMATIONS

    View Slide

  39. @aaronpk
    NODE-RED AUTOMATIONS

    View Slide

  40. @aaronpk
    nodered.org

    View Slide

  41. @aaronpk
    Home Assistant
    DEVICE COMMUNICATION

    STATE MANAGEMENT
    VISUAL PROGRAMMING

    RULES ENGINE

    View Slide

  42. @aaronpk
    INPUTS / OUTPUTS

    View Slide

  43. @aaronpk
    Lights
    Philips Hue

    View Slide

  44. @aaronpk
    Zigbee to its
    own hub
    No internet
    required
    or Bluetooth
    only, no hub
    Philips Hue

    View Slide

  45. @aaronpk
    Temperature
    Zigbee/Z-wave devices (~$60)

    433mhz sensors (~$10)

    View Slide

  46. @aaronpk

    View Slide

  47. @aaronpk
    Home presence detection
    mobile phone apps

    home wifi

    bluetooth beacons

    View Slide

  48. @aaronpk

    MOBILE APP TRACKING
    OwnTracks
    GPSLogger

    View Slide

  49. @aaronpk

    WIFI TRACKING
    Wifi router pushes presence into Home Assistant

    View Slide

  50. @aaronpk

    BLUETOOTH DEVICES
    Home Assistant can watch for Bluetooth devices

    View Slide

  51. @aaronpk
    Sunrise/Sunset Times

    home location, math

    View Slide

  52. @aaronpk
    Sun Angle in Windows

    home location, window direction, math

    View Slide

  53. @aaronpk
    Weather Forecast

    hourly, daily

    weather api

    View Slide

  54. @aaronpk
    darksky.net

    View Slide

  55. @aaronpk
    Window Shades

    all-in-one motorized window shades
    retrofit options

    View Slide

  56. @aaronpk
    Soma 

    Smart Shades
    bluetooth

    View Slide

  57. @aaronpk

    View Slide

  58. @aaronpk

    View Slide

  59. @aaronpk
    Air Conditioner
    controlled via IR remote

    View Slide

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

    View Slide

  61. @aaronpk

    View Slide

  62. @aaronpk
    TV On/Off

    smart tv?
    commercial display

    View Slide

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

    View Slide

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

    View Slide

  65. @aaronpk

    View Slide

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

    View Slide

  67. @aaronpk

    View Slide

  68. @aaronpk

    View Slide

  69. @aaronpk

    View Slide

  70. @aaronpk

    View Slide

  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

    View Slide

  72. @aaronpk
    2 People at Home?
    1 person 

    gets in bed
    Bedroom 

    lights off
    2 people 

    get in bed
    All 

    lights off

    View Slide

  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

    View Slide

  74. @aaronpk

    View Slide

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

    View Slide

  76. @aaronpk

    View Slide

  77. @aaronpk

    View Slide

  78. @aaronpk

    View Slide

  79. @aaronpk
    Pressure sensor under couch
    Audio level sensor
    Local voice assistant (mycroft.ai)
    Cat presence detector?
    FUTURE EXPERIMENTS

    View Slide

  80. @aaronpk
    THANK YOU!
    @aaronpk
    aaronpk.com
    aaronpk.com/oredev19
    SLIDES

    View Slide