Doorbell Views

I finally bought a doorbell camera when I saw some specials last week. I went with the combination Ring Video Doorbell Pro and Ring Chime Pro, which came with a free 3rd generation Alexa Echo Dot. The Chime is great for the basement, where I can’t always hear the doorbell, especially if I’m using a loud tool. My 2nd generation Alexa Echo Dot moved to the basement as well since I spend so much time in the workshop.

Home Automation Part 2: Software

Part 1 covered the devices I’m using for home automation. It’s been over a year and there have been some changes. I added a Leviton switch and got rid of the Wink hub.

This post will be about the software that brings things together, making it easy for me to manage and allows the devices to “talk” to each other. Maybe it’s a good thing it’s taken me almost a year to write this part 2 because there have been some dramatic improvements to how everything runs. I was using homebridge for a period of time, but found I never really used HomeKit/Siri. Home Assistant has been updating a new HomeKit component, so I’ll have to give it a try.

I’ve talked about Home Assistant in a lot of posts; it’s the software running on the Raspberry Pi 3 Model B to handle everything. It’s very powerful software and has been a lot of fun for me to configure everything. Being on a Linux box and having to configure everything through YAML files makes it a tough entry for the average homeowner though. It’s improved a lot in the year I’ve been using it with better documentation and some UI configuration tools, so it’ll be interesting to watch for the next 12 months.

Being Open Source was a big draw of HA for me. Open Sourcecraft has a good article about the creator. The project operates on an aggressive schedule you don’t see much; every 2 weeks a new version oh Home Assistant is released. These aren’t small updates either. Each update fixes a ton of bugs and adds support for new devices.

I did install HA using Hass.io, which simplifies the process and makes it easy to do upgrades and install add-ons. Here are the add-ons I’m using.

ha-hassio-add-ons.png

In addition to running Home Assistant, I wrote a couple of small services I run on Pis. The first is the temperature sensor/monitor I use in my garage. I’ve improved it a lot in the last year. The second service is home-assistant-pi, which reports a bunch of data about each Raspberry Pi on my network back to Home Assistant, which you’ll see in the screenshot below.

The beauty of Home Assistant is you can set everything up the way you want. Your limitation is your imagination and your comfort level with configuration files and code. I took a bunch of screenshots of my setup.

ha-day-home.png
The main screen, with a daytime theme active.
ha-night-home
The same screen, but at night.
ha-night-temps
All of the weather and indoor climate data.
ha-night-pis
Status of my Raspberry Pis.
ha-night-rooms
Groupings by room.
ha-night-multimedia
Sort of a multimedia group, showing my TVs and cameras.
ha-night-sensors
A catchall sensor screen with less frequently used info.
img_0757
The iOS app gives access to everything and works the same way.

I keep all of my configuration (except the secrets file) in a GitHub repo in case I mess something up. I’ve learned a lot by looking at other examples, so my repo is public as well. Maybe my config will help out someone else. The repo is home-assistant-config. If you have any questions about anything you see in this post or in my configuration, let me know.

In the final post of this series, I’ll explain the cool part of this whole thing, the actual automations. I need to go through my ideas list and implement all of them though.

From Rest API to MQTT

After the recent changes to my home network and Home Assistant server, I noticed the logs in Pi-Hole were being dominated by the domain I use for dynamic DNS on the box. Roughly 15,000 DNS requests a day out of 30,000 on my entire network. Really skews the ad blocking stats.

Why so many DNS requests? Because home-assistant-pi and home-assistant-temperature-monitor were both using the Home Assistant REST API to fetch data. That’s 15k requests/day with only two of my seven other Raspberry Pis turned on, so it would get worse when I put some of the other Pis into “production” around the house. The temperature project only runs on one box, but the first project in installed on every Pi.

I briefly tried to switch those two projects over to using the local IP address of the server and continue to use the REST API, but with SSL enabled it was complicated. MQTT was already running on the server and those projects publish updates to Home Assistant over MQTT, so it was an easy decision to use it for subscribing as well.

While I was at it, I took the opportunity to simplify a lot of the code and have the devices update more frequently. So far it seems to have solved a couple of lingering stability or connection issues I was having with home-assistant-pi. All of the code changes are available in the respective GitHub repos linked earlier.

Update: I forgot I had home-assistant-pi connecting to google.com in to help with determining the local IP address in Python. Another update to clear that up will eliminate over five thousand DNS requests per day.

3-Way Smart Wi-Fi Switch

Last year I installed a bunch of Lutron Caséta switches and remotes with dimming functionality. At the time I forgot to test the ceiling fan in my bedroom. So when I went to use it this summer, I got this nice surprise (turn up the sound)…

Ceiling fans don’t like dimmer switches. I’d done a little searching here and there for a smart 3-way switch alternative, but hadn’t been able to find anything. Then one day while walking through Home Depot I noticed some Leviton Decora Smart switches. I did some research when I got home and ordered a DW15S-1BZ and a DD0SR-DLZ. No dimmers on these. Installation was easy and I can use the ceiling fan again. Check out the difference.

I will mention a few negatives with this Leviton switches. The “remote” is wired in, unlike the Caséta remote which can be placed anywhere. It costs a bit more as well. The last thing probably won’t be a big deal for anyone, but it seems like the system is using a relay because I can hear it click back and forth from across the room when I trigger the switch. The clicking may not be the best for a baby’s room.

Other than those things, the Leviton switches work well so far. Check them out if you’re looking for a 3-way switch.

Home Network Updates

My router had been flaking out, so I picked up a Eero with 1 beacon. Setup was smooth and painless. I decided to use a new Wi-Fi network name, which was not one of my best ideas; reconfiguring about 30 devices was a pain in the ass!hass-io-install

While I was working on my network I took the opportunity to do a fresh install of everything on the Raspberry Pi server running Home Assistant and Pi-Hole. Instead of installing Raspbian and all of the software myself,  I took advantage of Hass.io, which is a preconfigured image and works well. When I first started using Home Assistant, the project was pretty immature so I didn’t use it.

Installing Pi-Hole as a Hass.io add-on is slick. Due to issues with my old router I’d been living without ad blocking for a few weeks and it was horrible. It’s hard going back to a web littered with ads when you’ve been living without them.

Figured I might as well keep going, so I also made a bunch of improvements to the Raspberry Pi Temperature Monitor I use in my garage. Seems to run much more stable, which may also have something to do with the fresh Home Assistant install. Changed a few things with home-assistant-pi as well.

Another big change I made to the server is connecting it to my network via ethernet instead of WiFi. It’s wired in through an AirPort Time Capsule, which is connected to the Eero via a really long cable running through the basement. I bet this has done more than anything to improve the stability and consistency of my system. A bonus of this connection change is the Speedtest reporting inside HA is much more accurate.

Now I need to make time to get more automating done in Home Assistant and publish part 2 and 3 of my home automation series. It’s coming up on a year since part 1, so long overdue.

Home Automation Part 1: Devices

Since I keep putting off a big home automation post due to not having much actual automation done, I’m going to split things up into a series of 3 posts. It’ll make for shorter posts and hopefully motivate me to get my automations done. This first post will share all of the equipment I have around my house, part 2 will be about the software, and part 3 will be about the actual automating.

myq-alertsMyQ Garage Door Opener

Don’t buy one of these. The online service the device communicates with is always having problems. I have mine configured to send me an alert whenever the door is open for at least 30 minutes. Over a 2 day period, all 4 of these notifications shown in the screenshot were incorrect! Happens at least once a month.

I want to see if I can reverse engineer the sensor attached to the door and make my own opener using a microcontroller and a spare remote I have.

Nest Thermostats

My house has a boiler with baseboard heat and 4 heating zones. I have one of these in each location. They work great.

Nest Protects

Alarms for detecting smoke and carbon monoxide. They “talk” to the thermostats as well. I have 3, but hope I never need to find out how well they work.

Nest Cam and the previous Dropcam

One is sitting on an end table pointed at my front door and one is mounted in my garage (mostly so I can check on the garage door if needed).

August Smark Lock with Connect

The lock on my front door. Runs through 4 AA batteries faster than I’d expect, but works great.

Harmony Hub with Ultimate One

I’ve used Harmony remotes for years. Love ’em!

Caséta Wireless

I have 8 switches and 5 remotes (there are a lot of 3-way switches in my house). These were simple to install. Having dimming capabilities is a nice feature.

Belkin Wemo

I have 2 Insight Smart Plugs, 2 Light Switches, and 1 Switch. The thing I like most about the Belkin devices is you don’t need a hub or anything else to control them. Very plug-n-play. I’m not sold on having plugs though. I’m using them for some lamps, but you have to remember not to turn the lamp off with the actual lamp switch otherwise your smart plug is useless.

Garage Temperature Sensor/Monitor

Built this device myself using a Raspberry Pi Zero v1.2 and some other electronics parts.

Wink Hub 2

Allows me to access devices from my control system.

Alexa Echo Dot

Maybe my favorite device. I use it every day to control the lights in the main areas of my house.

Automatic Pro

The location and status of my car feeds into my system so I can automate other things.

iPhone – Siri

I don’t use this much anymore with the Echo. Still comes in handy for quickly controlling something though. Will also use the iPhone location for automations of home/away status.

None of the stuff is cheap. We’re still in the early stages of home automation. Watch out in the next couple of years.

Some things I plan to add are:

  • A moisture sensor near my sump pump so I can be alerted right away if something goes wrong. Maybe some sensors in bathrooms as well.
  • This summer I plan to replace a couple of old in-wall AC units. One no longer works and the other is mostly broken. I’ll be buying units I can automate and control.

If you have questions about anything here, let me know.

Garage Monitor Updates

I made some updates to the Garage Temperature Sensor & Monitor. I didn’t like how the desired temperature was set via the app’s configuration file, so I moved it to a slider control in Home Assistant and updated the LCD to always show the value. Only being able to enable/disable monitoring via the device’s button also wasn’t great. I converted the binary sensor I was using to flag monitor mode in HA to a switch control and moved the actual monitoring logic from the Python app to HA automation. Everyhing is updated on GitHub.

updated-garage-monitor-ha.png
Info and controls in Home Assistant
img_8761
Custom temperature and humidity monitor

A New Hobby

My recent Raspberry Pi project combined with more and more interest in home automation led me down a road I didn’t expect. I find some of the home automation products out there limiting. What if I could mess around and build some of my own devices?

I’ve been thinking about putting some type of temperature sensor in the garage for a while. I heat the garage up in the winter for workouts quite often and never know when it’s warm enough. I’d found my first project! I’d need another Raspberry Pi and at least a temperature sensor. I didn’t really know much about extending the functionality of a Pi, other than I’d need to do some soldering and learn a more about electronics, circuits, etc. Enter AdaFruit. It’s a very cool company with an awesome store and a ton of resources to learn.

Adafruit was founded in 2005 by MIT hacker & engineer, Limor “Ladyada” Fried. Her goal was to create the best place online for learning electronics and making the best designed products for makers of all ages and skill levels. Adafruit has grown to over 50+ employees in the heart of NYC with a 50,000+ sq ft. factory. Adafruit has expanded offerings to include tools, equipment and electronics that Limor personally selects, tests and approves before going in to the Adafruit store.

I saw Ladyada’s Electronics Toolkit in their store, which looked like a great way to get started. My favorite item is the “solder sucker” even though I may never use it. Such a cool name.

ladyadas-electronics-toolkit

Then I came across AdaBox.

AdaBox is a quarterly subscription service from Adafruit, centered around products from the Adafruit ecosystem. Each AdaBox will contain a curated set of Adafruit products that will help you get started with do-it-yourself electronics.

Introducing AdaBox!

The second box is shipping out to subscribers soon, but I was too late to jump on board. Lucky for me, they had some AdaBox001 – Welcome to the Feather Ecosystem still in stock, so I ordered one.

adabox-1-contents

It has a wide variety of components. Should help so that I don’t start randomly buying items. I’m hoping to get in on the third subscription, which opens up on the 19th and I will pick up AdaBox002 when it’s available in the store.

Once everything arrived, I started playing around on my kitchen table. I quickly realized it wasn’t the ideal place. I needed a workstation. When I get into something new, I tend to go all-in, which I believe helps me stick with it. So I set a plan to put a second desk in my office and bought more stuff:

I’m excited and really happy with how everything came together.

electronics-workstation.jpg

I found these organizers for about $4 each at Walmart. They work really well for storing all of the tiny pieces.

organizers.jpg

I haven’t built anything yet, but I’m learning a lot and enjoying the process. My list of project ideas is growing and will keep me busy for as long as I want. As a bonus, I now have a standing desk in my office where I can get actual work-work done when I need a break from sitting.