Saturday, September 24, 2016

Home Automation

We’ve been living at our place now for about 5 years. In all this time, we’ve never had to worry about home security. Not that we live in a totally remote suburb area with no crime. It is just that we’ve never felt we needed it. Until the end of August. One night, I was sitting in the upstairs bedroom reading, when around 1am, there was a knock on the door. It was weird to hear a knocking, because we usually know when our friends are coming. I got up and then I heard a doorbell. Li asked what was it as she’s a light sleeper and generally know when I get up. I told her that I heard something. Of course, she gets up right away and followed me to the top of the stairs.

We heard more knocking and tried to look outside through our door’s peephole, but it was too dark. Couldn’t tell if there was someone there or if they were trying to hide from being seen. We have a large window that looks out to the porch with thick blinds behind it. We didn’t dare try to peek through that as people from the outside could see movement. So we ultimately called 911. They said they would send a patrol car over. Later we would find out that they didn’t think we were in any danger, but we certainly thought so. It would be a good 4 hours after we called that they would come by. Fortunately, nothing did happen and we suspect that it was probably some drunk guy either forgetting where home was or had the wrong directions from someone. In either case, we were not in any real danger, just a scary experience especially condering that we have two young kids and two elders in the house.

This incident certainly brings heightened awareness to our security. We know that we cannot rely on the police as they come when they can. If they have more urgent matters, then we’re going to be lower on the priority list. That’s reality in many places and with more people in the area, the more likely there will be higher priority items.

So we started looking into home security. I really liked some of the services offered by vendors. But ultimately, decided to look into home automation products. Our requirements are pretty simple:

  • Cloud based storage, preferably free
  • Easy to use and manage
  • Easy to setup
  • Easy to take apart
  • Provide full compatibility with as many devices as possible

We first looked at Apple HomeKit as we have a lot of Apple tech around the house. We purchased the August Lock Bluetooth Edition, but one thing that always bothered me for a “smart” lock is that I have to be within Bluetooth range for the app to work. In order to get longer range, I have to buy another device? And it doesn’t work with HomeKit. I also purchased two iDevice switches. These worked okay for a couple of weeks, but then it was always a hit and miss with Siri. Even the native app seems to lose the devices. Then I tried Insteon, which claims to have the most number of compatible devices. It may be true, but it didn’t play well with any of the other home stuff I got, including my MyQ Chamberlain garage door opener. Although it did work with my Hue lights.

After some more research, I discovered IFTTT. If you don’t know what it is, go there now. It’s one of the most amazing Internet of Things site ever. There are so many recipes for automating things. This became one of the requirements for me buying any new gear. If it doesn’t work with IFTTT, then I’m not that interested.

Ultimately, I found SmartThings. I was hesitant about getting SmartThings because it was made by Samsung who wasn’t exactly on great terms with Apple. There are lots of things to like as there’s great support for a wide variety of devices, IFTTT, and their forums for both consumer and developer alike. The main disadvantage is that it didn’t work with any of my existing products. I finally decided to make the switch.

I got the SmartThings hub along with Go Control Premium Z-Wave Home Security Suite. I got the SkyBell HD Silver WiFi Video Doorbell. And I also wanted two of the NetGear Arlo. I chose the doorbell and Arlo because they have free cloud-based storage for the video. You can pay for more storage, but for what I need, it is more than enough. I don’t need to see what happened to my house more than a week ago.

Installation of everything was pretty simple. A couple of firmware updates and basically, like Apple stuff, it just worked. It also found my WeMo switch that I had lying around from long time ago. The Hue lights worked. Installation of the phone application was smooth too and it is the gem of the whole thing. The phone app makes it easy to start the process of finding devices and organizing them. You can create automated routines similar to IFTTT, but with an added advantage of multiple conditions such as “when there is motion on any motion sensor and it is nighttime, then sound the alarm.” You wouldn’t want to set off the alarm if there’s motion around the house during the day.

Like most modern services, the phone app is really just a pretty wrapper around a web service. The web service allows you to log into your account from anywhere and you can see the state of your devices along with performing actions on them. For example, you can turn on and off a light from anywhere. One really neat bonus feature is that you can customize each device with a handler. The handler exposes additional features of that device. For example, while a Hue light is a light, it is a bit more than a light because you can also change its color. Only after you tell SmartThings that your Hue lights is a Hue lights, you can change its color. You can also create custom routines in Groovy to better automate your home. For example, you can create a routine that says, if the garage door has been opened for more than 5 minutes, close it.

After seeing all of this working so smoothly, it sort of becomes addicting to add devices for more automation. For example, I removed our August Lock as it was essentially useless and replaced it with two Schlage Connect™ Touchscreen Deadbolt with alarm with Camelot Trim. As Li wanted to have the porch light on during the night, I got a white Hue bulb. Since we have two garage doors with two different garage door openers, with MyQ it is able to only open one of them. So I got a z-wave GoControl garage door opener.

With all devices, we now get notifications whenever a door/window opens and close. I’ve also set it up to get notifications whenever the locks lock and unlock and I can see who did it. Same for the garage doors. At night, the porch light along with a Hue strip turn on and they turn off at 7am. If there’s motion at night when we’re sleeping, videos are captured and the alaram sounds. If the batteries run low on any of those devices, I get notified. When there’s motion outside our door, we get notified and video is captured. When we go to sleep, all the locks are locked and the lights get turned off.

All in all, I am very happy with the set up. I wish I had done it sooner.

Friday, July 8, 2016

Another Summer Another Consolidation

It’s been a very busy few months. The main change is the arrival of our second boy William. Work was very busy as we migrated from a physical data center to a virtual one. And at home, I migrated from running 3 servers to 1 giant one. Okay, one giant one plus a NAS. Main reason is the energy cost. Running extra servers for VMs that are sporadically used just isn’t worth it. I might at some point move them to the cloud entirely and let someone else pay for the electricity costs. I’m constantly bouncing back and forth between running the services myself and putting them into the cloud. I guess I prefer my privacy with my own hardware. That’s one of the big reasons why I went with a Synology NAS. I really like the redundancy and I’m using a cloud backup service to go with it.

One thing I noticed about moving all those VMs into one server is that all those VMs still depend on disk IO. And I can see that my VM which has lots of cpu power is constantly showing that there’s a lot of load because it is waiting for my RAID disks. So I bought a 1TB EVO SSD for my VMs. Now, there’s NO iowait! Whoo hoo, I don’t have to worry about how many VMs I run anymore on my 6-core server.

Saturday, April 23, 2016

Migration to Mac

Over the years as my work has been more and more involved with "Software as a Service”. This really only means that my work is hidden behind servers and available on the web. There’s no software to install on your computer. Instead, you have to access the website/service from your computer to ours. And typically, the computers we use are Linux based for the main reason of them being easily remotely managed and availability. We need our computers to be usable 24 hours a day every day. They can’t take a day off.

When I first started using computers, it was during the time of the IBM XT and compatibles era. But that was still more expensive that my family could afford. Instead, I learned on TRS-80s. Then after I was able to save enough, I bought a clone. And that brought on endless peripherals and upgrades in the pursuit of building the next dream computer. I have always been in the PC camp and even worked on compilers for DOS and Windows. Back in those days, Apple computers model II and early Macintoshes were considered “educational” and not very friendly to low-level work.

Times changed. When I started at PIX in 2010, they gave me a Macbook Pro. Was my first and I had to get used to working with it. Migrating to OS X from Windows wasn’t too hard. One thing that I really liked was how much easier it was to develop for Linux from a Mac. Even though Windows has traditionally been more open, the platform itself became very closed. The tools were very Windows centric. It was cumbersome to take scripts / programs written in Windows and easily take them to a Linux box and have it work the first time. I was trying to do this even though I had a Mac, because I also still had my Windows laptop. Eventually I embraced the Linux/unix way and moved my every day tools over to Mac. Sure, I still have a Windows server and Windows desktop, but these days, everything else is Apple based.

The ecosystem is what I like most. I really appreciate how easy it was to share pictures and videos with my mom and my parent-in-laws. We got them iPhones and it has helped make things easier for them too. My mom uses her iPhone to help her learn English. Even at home, the pictures we take on our phones show up on our iPads and TV.

I still have my work Macbook Pro. But this weekend, I finally got to buying a Macbook Pro for myself. And I’m using it to write this entry. The one from work has gotten older and it is starting to feel that way. Yes, my work will get me a new computer, but I also want a Macbook Pro for myself. So my migration is complete. I don’t see myself buying another Windows box again. The only things I have working on Windows these days are games. Otherwise, everything else has moved to either Linux or Macs. I generally find tools that are multi-platform perform better and work more comfortably for me.

Sunday, March 27, 2016

Synology DS1515+

Recently, we got a Synology DS1515+. For those that don’t know, this is a network-attached storage device (NAS). There are lots of competing products with all sorts of options for number of disks it can hold, what type of RAID it supports, how many network ports, etc. Ultimately, this is really just a computer with specialized software to hold the disks and to present the disks in a lot of different formats and interfaces. If you wanted, you can use an old computer and run something like FreeNAS on it to make it do something very similar. Like most things, you can either build everything yourself with all the customizations you want. Or you can also just buy something like this DS1515+ and get things going in a short amount of time. The choice is yours.

As I grow older, with more responsibilities, and a larger family, I find myself with less and less time to tinker with things. I just want things to work. For that reason, I chose the Synology. It is absolutely amazing how much of my life is digitized. I also want more of my life digitized. There’s too much paper already. It’s getting close to tax season and all I see around me is paper. I don’t mind it when Richard draws on the papers and gives us another absolutely amazing expression. But when it is just forms and boilerplate templates, it drives me crazy.

So I’m at least trying to do my part by putting everything into Synology. I’ve setup Crashplan to back up the stuff and it looks like it will take around 31 days to back up 2TB. I wish I had my work’s ISP where we have 1Gbps bandwidth. I’ll see what will happen first, will Crashplan finish backing up my stuff or will my son be born?

Thursday, January 7, 2016

Winding Down 2015

Hard to believe that another year has gone by. A lot of good things have happened. Much to be thankful for:

  • Richard going to school and liking it!
  • Li’s pregnant.
  • Richard went to China, learned more Mandarin and missing China. He comes back saying, “我不喜欢美国” (I don’t like America).
  • Celebrated 5 years of marriage.
  • Li’s parents turned 71 years old. Grandma turned 96. Mom turned 76.
  • Li’s nephew came to America.
  • Went to Lake Tahoe, China, Las Vegas, Disneyland.
  • Richard got to go on a real train in Felton, CA.
  • Richard went to Las Vegas, stayed at the Bellagio and loved the watershow. He now always talks about wanting to see watershows. He can rattle off the times of when the watershow starts.
  • Automating our home. Apple-izing our lifestyle (Apple TV, Mac mini, HomeKit, Watch). LTE 4G on all our devices.
  • Added a new server, running Ubuntu.
  • Read a few books.
  • Watched a few movies and TV shows via Plex.