Home Automation Part III IV or V

Discussion in 'Technical Corner' started by denverpilot, Oct 25, 2019.

  1. denverpilot

    denverpilot Tied Down

    Joined:
    Nov 8, 2009
    Messages:
    50,525
    Location:
    Denver, CO
    Display Name:

    Display name:
    DenverPilot
    The forum has timed out and won’t allow posts to the old HA threads; so here’s a new one.

    What have people done with their houses so far?

    Recently I’ve gone Home Assistant crazy. Ha.

    Current status:

    - all public areas and two bedrooms and the office now have at least some controllable lighting. Some are WiFi bulbs, some are switches for lamps, and a few are color bulbs.

    - Home Assistant : Started off running it on a RaspberryPi to see how I liked it. Liked it immediately and moved it to an old desktop machine for more horsepower and to get the thing off of the flaky flash card as a file system. That’s stupid for a database. Corrupted multiple times on the Pi, but it just keeps event history. Anyway...

    The best part about HA, it will give you your best shot at fully local control if you buy things wisely. No cloud or internet needed for it all to work.

    I went with hass.io on the Pi for ease of initial setup and decided to stick with it running in Docker on a lightweight Lubuntu distro. Many ditch hass.io and run HomeAssistant directly in Docker or even a virtual Python environment. There’s a million ways to install it. Hass.io has the advantage of having a community “store” (it’s all free) of Pre-configured Docker containers for their slightly odd ball HassOS that are literally a mouse click to install.

    One of the best is a Google Drive backup system someone wrote. With that in place, the thing backs up a snapshot of the entire system to GD. That sold me. Way too easy.

    With the sysadmin chores including doing a full restore from backup to prove they work, done...

    Added:
    All the lights.

    A paid ($5 Mo) integration with Alexa and Google Assistant which also gives secure remote access without needing your own VPN and webhooks support for your own code running anywhere. The Alexa integration allows you to kill all of your skills for things HA can control locally and HA publishes them and their states to Alexa from its own skill instead so you’re moving all control local, but if internet is alive you can voice command everything. This also allows you to write complex automations and give them a name so Alexa can do them also. “Alexa do that thing that runs six different automations.” Done. The Google Assistant one does the same and works well but I don’t have Google devices, so I tested with the app on iOS. Works great. These integrations CAN be done manually but for $5 a month making keeping up with the API changes someone else’s problem? No brainer. Take my money. I’ll focus on my automations.

    An internet based (boo!) integration with our commercial home alarm. Full status and control.

    An integration with the Netgear Orbi that can track whether any device is online and also get all stats for bandwidth and such from it.

    The beta version of the iOS device tracker that sets up tracking via Apple servers and can do location, a ton of phone status including whether it’s on cellular or wifi, battery level, charging state, and a ton more. Even pulls the fitness data if you allow it. Geocodes location to an address and allows multiple locations with geofences so iPhones always wake up and report when they cross a boundary.

    Installed HAdashboard, an alternate dashboard engine for making dashboards for tablets. Idea is to hang them on the wall for local control and switches. Made a couple test boards. They work.

    Integration with Dark Sky weather API for so called “hyper local” weather. The amount of data it can provide to HA is overwhelming but awesome. Want the lights to come on if someone is home and the clouds roll in? Easy.

    Installed Node-Red. Life changing. LOL. It’s a visual code creator and integrated with HA you literally draw your automation flows with messages. HA natively does automations in YAML which I have experience with but it’s a pain. Like Python, super sensitive to spaces and code placement and lacking in syntactic sugar. Workable but Node-Red is awesome. I’ll probably build all of the major logic in it. And convert the few automations already done to it.

    Integration with Blink cameras. Blink kinda sucks but, nice side effect. Every camera has a temperature sensor. That’s reported to HA and is useful for other reasons. Blink throttles API commands so some of the stuff I was trying to do didn’t work. I need to write a little logic state machine tracker that keeps hammering on them until the state I want happens with a big delay between commands. I’ll probably go with something else later for cameras but they work for now. Everyone in HA forums hates Blink for good reason.

    Current automations:

    Tinkering with lighting during day and night and whether anyone is home. Phone trackers and wifi for presence. Weather injection for day night and lighting by cloud cover. Some folks buy Lux sensors.

    Arming Alexa Guard, and Blink if not on when everyone away. Flakiness in the iOS tracking has me holding off on arming the main alarm. Also need to check state on that since it needs internet and send push notifications to phones if it doesn’t arm. And also need to add turning off all lights.

    Playing with announcements of people arriving home or leaving via Alexa. Can also do this by geofence. “Nate left work.” Probably won’t keep but it’s good practice for coding these and fun for a while.

    To do: Guest mode. Disable automations that require tracking us.

    Garage door. Open when arriving, close when leaving. Notifications for didn’t close and also if left open for X time or after a certain time at night. Perhaps different by day of week. The method I’m looking at using would also give vehicle in garage or not presence.

    LED strip light control. Various toys coming from. China for ESP8266/NodeMCU development and such.

    Wall mounted tablets and/or LED indicators for various things. Example: Karen wants a light in the garage that tells whether the alarm system is armed or not. Easy peasy. NodeMCU or Weimos D1 board and LEDs.

    Oh yeah. Awesome integration with VSCode. The coders will appreciate that one. Ha. Love it. Literally runs inside a frame in the HA web interface. Fully integrated. Nice.

    Other stuff coming. Some cheap Wyze motion sensors and their hub on order and someone reverse engineered their protocol so $6 motion sensors that work and are fast. Will give ability to turn lights on at night by walking around.

    Making dumb appliances smart. Easy. Plug into a controllable outlet that’s supported that also has energy measurement. Ignore the switch. Just graph the energy use and you’ll know what mode the thing is in and what it’s doing. “Dryer is finished” “Washer is finished” announcements via Alexa. Wooot!

    Other stuff coming. Probably also find a less power hungry machine to put Docker on. This one was just laying around and is for prototyping all of this.

    Fun stuff! Look up Dr Zzzs on YouTube for a fun guy who has been tinkering with it for years. Anesthesiologist who makes stuff but isn’t technical at all. He just has fun with it. Live stream every Sunday when he isn’t working.

    Having a blast with it. Way better than the Samsung hub or any of the commercial stuff. Totally write whatever you want. Or draw it in Node-Red as a logic flowchart.
     
    mcdewey and PeterNSteinmetz like this.
  2. denverpilot

    denverpilot Tied Down

    Joined:
    Nov 8, 2009
    Messages:
    50,525
    Location:
    Denver, CO
    Display Name:

    Display name:
    DenverPilot
    LOL. Reading my thing. Push notification if alarm doesn’t arm. Yeah that won’t work. Needs internet too. Hmm. Need to noodle on that. Backup cellular internet for the home automation perhaps? A jet pack or little cellular router that stays at home? Hmm.

    Alarm itself has its own wireless connectivity and alerts through the commercial vendor if you leave without it armed anyway, so that part doesn’t HAVE to be in HA, it’s just nice to have it all in one place. If there’s some serial output on the alarm itself for states I may have to hack that and send it upstairs with a D1 or NodeMCU receiving the serial data and either crunching the serial itself into events for HA and then sending as MQTT messages, or sending it all to HA and writing an integration.
     
  3. 1RTK1

    1RTK1 Cleared for Takeoff

    Joined:
    Sep 10, 2014
    Messages:
    1,340
    Location:
    Central Left Coast
    Display Name:

    Display name:
    Ralph
    You are way ahead of me, I have nothing, zer0, nada, zip. I still need my exercise you know:)
     
    denverpilot likes this.
  4. Velocity173

    Velocity173 Touchdown! Greaser! PoA Supporter

    Joined:
    Jul 3, 2012
    Messages:
    11,161
    Display Name:

    Display name:
    Velocity173
    Yep nothing on my end either. I’m a hands on kinda guy. Not even big on auto pilots.
     
  5. DaleB

    DaleB En-Route

    Joined:
    Aug 24, 2011
    Messages:
    4,079
    Location:
    Omaha, NE
    Display Name:

    Display name:
    DaleB
    Huh. I haven’t been doing much. A couple of Wyze cams, Ring Pro doorbell, Wyze sensors on the garage doors and motion sensor in the basement. Ecobee thermostat (love that). A few smart LED bulbs and light switches, talking to a Smart Things hub. So, we can tell Alexa to turn lights on and off, show cams on the TV, that kind of stuff.

    I know I could be using IFTTT to do a bunch of stuff, but I’m not. I haven’t done much more simply because I hate this “cloud” crap that just means everything you set up is totally dependent on someone else’s system and your Internet connection. If I could set up local control, I’d be a lot more inclined to play with it. I’ve got several idle Pi’s, and a currently under-utilized Linux box that I’d love to see doing something more than just serving up email. It’s not even running Asterisk any more, since I switched to Ooma.

    So... thanks for that.
     
  6. RJM62

    RJM62 Touchdown! Greaser!

    Joined:
    Jun 15, 2007
    Messages:
    12,799
    Display Name:

    Display name:
    Geek On The Hill
    I have motion sensors on my outdoor security lights.

    That's all.

    Rich
     
    denverpilot likes this.
  7. Larry in TN

    Larry in TN Cleared for Takeoff

    Joined:
    Nov 16, 2013
    Messages:
    1,287
    Location:
    Nashville, TN
    Display Name:

    Display name:
    Larry in TN
    I have Lutron Caseta for lighting.

    I have Ecobee thermostats.

    I have a Rachio irrigation controller.

    I have Sonos audio (five zones) plus a few Amazon Echo devices to extend the voice control.
     
  8. EppyGA

    EppyGA Touchdown! Greaser!

    Joined:
    Jan 6, 2009
    Messages:
    10,638
    Location:
    Hoschton, GA
    Display Name:

    Display name:
    Let's Fly
    Samsung Smart Hub and a Harmony Hub alone with three LED Z-Wave bulbs and two Z-Wave switches, one for the bedroom ceiling fan and one for the ceiling fan light. Nest thermostat, an Echo and three Echo Dots. Plans are to add other switches, not in the budget currently.
     
    denverpilot likes this.
  9. Sinistar

    Sinistar Pattern Altitude

    Joined:
    Sep 9, 2016
    Messages:
    2,332
    Display Name:

    Display name:
    Brad
    Still using SmartThings garbage door sensors and several dimmers for the look like were home effect. 3 blinks at home. 2 blinks and a wifi remote switch with real time current and voltage readings at the hangar for video security and remote engine heat respectively. Not sure what's next. If we buy the hangar were looking at I'd like to do a bit more there for remote lighting and monitoring.

    Did not like Nest (returned) but would like a wifi theremostat.
     
  10. DaleB

    DaleB En-Route

    Joined:
    Aug 24, 2011
    Messages:
    4,079
    Location:
    Omaha, NE
    Display Name:

    Display name:
    DaleB
    Just curious, what’s the advantage of HA over OpenHab?
     
  11. FORANE

    FORANE Pattern Altitude

    Joined:
    Mar 7, 2013
    Messages:
    2,169
    Location:
    TN
    Display Name:

    Display name:
    FORANE
    The market needs a reliable hub.
    I installed a Samsung hub and linked it to a schlage door lock on the vacation cabin we're rebuilding.
    It worked for a day. Now it's offline and I am hundreds of miles away so I can't easily fix it.
     
    TCABM likes this.
  12. wayne

    wayne Cleared for Takeoff

    Joined:
    Mar 10, 2007
    Messages:
    1,307
    Location:
    Atlanta, GA
    Display Name:

    Display name:
    wayne
    Nothing in the new home. In the prior home all I had was switches with timers to turn the outside lights on/off.

    My wife got an Alexa. I told her I didn't like an open mic on the internet; our oldest daughter bought it for her. When it stopped working she blamed me. Really, I didn't do anything. Honest!

    If I could have a system wholly in the house that listened and then went over the internet, if needed, for what we want I'd be fine with that. If one is going to do a Google/Bing/Duck-DuckGo/whatever search, then I don't care if you do it via the keyboard or a mic. I'm not in favor of Google/Apple/Amazon/whomever having full access to my mics/cameras/thermostats either. No thank you.

    So, when one of us gets up it wakes the other up as well? o_O
     
  13. kayoh190

    kayoh190 En-Route PoA Supporter

    Joined:
    May 29, 2014
    Messages:
    2,913
    Display Name:

    Display name:
    Kayoh@190
    I have an Echo Dot that manages a few outlets that turn lights on/off that would otherwise be difficult via a standard light switch (Christmas lights, for example). It's also attached to a wall clock that visually shows time left on timers, etc. That's actually a pretty cool feature - it's visible from the kitchen so when cooking it's nice to see time left at a glance. We probably use voice activated timers when cooking more than any other feature. That and having her tell us the temperature outside before heading out.

    We have a Nest thermostat as well, although we typically don't use Alexa with it. It's there mostly to tell us if something happens to the heat or AC in our place, and can thus come up with a rescue plan for the dog. ;)

    When you only have 1000 square feet of living space, there's not a whole lot of need to automate stuff!
     
    denverpilot likes this.
  14. denverpilot

    denverpilot Tied Down

    Joined:
    Nov 8, 2009
    Messages:
    50,525
    Location:
    Denver, CO
    Display Name:

    Display name:
    DenverPilot
    Oh noooo. No motion sensors anywhere but “public” areas. Stairs, family room, living room.

    And so far they only turn a single bulb in those areas on at 20%.

    I may put a motion sensor in OUR master bath, but frankly the ones I got look too much like cameras! Tiny little cameras. Ha.

    This guy explains. Hijacking $6 Wyze sensors and their 900 MHz hub using HomeAssistant. No cloud connectivity.

    There are Echos all over but only one Skill is attached to her, the commercial thermostat that has no easy direct way to integrate it with HA. All other devices talk only to HA and then HA exposes only the devices I want exposed to the Echos via a paid HA Skill.

    Can keep even the individual deviceslike bulbs from “phoning home” and am switching to bulbs that can be flashed with Tasmota so they will be running my firmware instead of the manufacturer’s.

    Right now the Kasa bulbs are allowed to talk to their mothership but all control of them is done on the LAN and I’ll probably cut them off at the router soon. I don’t need the Kasa app for those for anything, just haven’t finished creating a pretty dashboard for controlling them on the HA app yet.

    For now the default dashboard is “usable” though. See below.

    Not far from blocking all of it from talking outside... local control is the only way to go for true automation. Nothing should require Internet whenever possible. Especially with how bad our internet can be. :)

    [​IMG]

    Heck I can even check both of our iPhone battery levels in the server. :)

    [​IMG]
     
  15. denverpilot

    denverpilot Tied Down

    Joined:
    Nov 8, 2009
    Messages:
    50,525
    Location:
    Denver, CO
    Display Name:

    Display name:
    DenverPilot
    [​IMG]

    Have more done. Waiting on LED strip from China for holiday lighting. The motion sensors rock.