Build A Robust Smart Home System Without the Cloud

If you've been thinking about building a smart home system, you're facing two major paths:

  1. Purchase the ready-to-use systems like Google Home, Amazon Alexa, Apple HomePod, or Samsung Smart Hub etc.

  2. Build your own home automation system using open source system like Home Assistant or openHAB etc.

Starting a smart home system might seem as easy as getting the hardware and plugging the power and network cable, but making it robust and reliable requires strategy.

The most suitable smart home system for one's house makes it look easy because it is created with specific goals in mind, and those goals aligh with reliability, robustness, and resilience. I've created my own smart home system that works without the public cloud as well as off the power grid capability. Below is what I have recorded in the past to build my own smart home system, and the content might be constantly updated on the go.

Table of Contents

  1. Planning the smart home system
  2. Choosing the software
  3. Collecting the hardware
  4. Connecting all smart devices
  5. Making automation rules
  6. Proofing the system

Part 1: Planning the Smart Home System

Before diving into the work of building a smart home system (or home automation system), you'll need to do some planning, just like you would for any other projects. The key here is to make sure you have a clear vision of what your smart home system should accomplish, the right resources, and a well-defined approach.

Make Sure the Smart Home System Is the Right solution

A smart home system is an investment in time and resources, so you need to be clear why you're doing it and if it's the right solution for what you want to accomplish.

Let's review a list of three questions you should ask yourself before you embarks on any path:

1. Will Your Smart Home System Make Your life More Convenient and Easier?

Whether you are familiar or a beginner to smart home system, it's important to find out if a smart home system works efficiently and effectively for you.

To fine-tune your planning, consider the following questions to help you understand a robust smart home system, so you'll have the best chance of achieving your goals.

  • Can your system be controlled locally without the internet/cloud?
  • Can your system work off the grid or with a temporary power outage?
  • Can your system be activated by voice?
  • Is your system responsible for home security?
  • Is your system fault tolerant with hardware/software redundancy?

2. Will You Be Able to Maintain the Smart Home System?

Smart home system is coll and can be very effective, but a successful system is not always maintenance-free.

Ask yourself if you have the expertise to manage the overall system for long term. Make sure you have the knowledge to keep the system running trouble-free, as well as updated with new features and security patches.

3. Will Your Smart Home System Be Worth the Investment?

Look at what it will cost - in time, energy and resources - to create and maintain your smart home system and compare that to what you are trying to accomplish. Is the cost worth your best-case-scenario outcome? What results would make the smart home system a good use of your resources? Are there more cost-effective ways to achieve those same results?

It's easy to assume these questions are intended to sway you from building a smart home system. Just the opposite: It is designed to help you make the right choices. A poorly planned or low-quality system help very little your daily life but bearing a cost. However, if you're able to confidently answer "yes" to each of these questions, you're well on your way to an effective and robust smart home system.

Once you've cleared the first hurdle and know a smart home system is the right solution for what you're trying to accomplish, you can dive into the planning process, starting with a goal.

Create a Goal for Your Smart Home System

If you're not familiar with the idea of SMART goals, here's the gist: Your goals should be:

  • Specific
  • Measurable
  • Actionable
  • Realistic
  • Timely

Setting SMART goals for your smart home system not only lets you know when it has been accomplished, you'll also be able to create incremental checkpoints to measure progress and justify adjustments.

Identify What the Smart Home System Will Do

Long ago, before smart home system, there was smart appliance. With no WiFi, Zwave or Zigbee to communicate, smart appliances just work by themselves. For example, dawn/dusk timer switch turns on/off porch lights when sun rise/set; Rice cooker gets rice ready on a set time. Home security camera detects motions and records the video, and send your an email with the video clip attachment.

Thinking of the smart home system as a hub in charge of all smart devices in your house. It will connect every capable device and make them even more smarter using automation rules and other technologies like voice commands.

Find ways to think out-of-the-box with you smart home system's potentials. Home automation system can do even more than you could imagine. For example, you can set up a school pickup reminder based on the real-time traffic so you will never miss it. Smart home system can also act as your home security system or real-time power/natural gas meter.

Research Existing Smart Home Systems

There's no doubt that smart home system has been popular in modern homes as a convenient tool, and as a multi-purpose home appliance. You can learn a lot from other system's successes - and their mistakes.

Perform a competitive analysis of all other mainstream smart home systems that includes features, reviews, and tutorials. You will quickly learn why some system are widely popular and why some have limited market share.

Use Online Resources to Identify Your Needs

Your research should include looking at different systems that will work with your goals. You can search the web to determine what the mainstream systems are. Remember, it's important to define the terms between Smart Systems vs. Smart Devices. A smart system is the overarching command center that controls your individual products -- think Alexa or Google Assistant. Essentially, a smart system is what you speak to when you want something to happen. A device, on the other hand, is an individual product that reports back to that system -- think, Amazon Echo or Philips Hue light bulbs.

In the market there are two major camps which both have their pros and cons. Proprietary systems like Samsung SmartThings Hub are commercial products focusing on ease of use, great technical support, and broad range of comparability. Whereas open source platforms offer more flexibility, varieties of integrations, and overall low cost.

  • Proprietary Systems
    • Google Assistant
    • Amazon Alexa
    • Wink Hub
    • Samsung SmartThings Hub
  • Open Source Platforms:
    • Home Assistant
    • openHAB

If you want a smart home system that just works - controlling light bulbs, smart locks, switches, or thermostats without hassles, especially without diving deep into technical details, commercial products like Samsung SmartThings Hub might be better fit since they provide friendly setup guide and good selections of supported devices.

On the other hand, proprietary systems are closed ecosystems which would hook you into their product lines either free or with a subscription for premium features. Open source platforms are more attractive for DIY users who prefer greater freedom and much better extensibility.

My goal is to build a robust smart home system for the following purposes:

  • Connect to existing home devices as many as possible from 30 years old Honeywell home security system to the latest zwave smart lock.
  • Does not require the internet or public cloud
  • Have both hardware and software fault tolerance which means
  • Self contained on power utilizing UPS or solar
  • Low budget

The next step is to create the structure for the smart home system.

Planning Your Smart Home System

I have gathered a list of all potential smart devices throughout the house which are:

  • Google Home mini
  • Schlage zwave lock
  • Tuya smart light bulbs
  • Tasmota flashed light bubls
  • Yeelight bulb
  • Google Nest thermostat
  • TP-Link Kasa Smart switch
  • Honeywell VISTA 20P Alarm System w/ wired and wireless sensors
  • Zwave door/window sensors
  • Dome Water leak sensors
  • Heiman Zwave smoke detector
  • NEO Zwave alarm siren
  • HomeSeer Zwave floodlight
  • Reolink wireless security camera

In order for a smart home system to work without the cloud, the smart hub must be able to be accessed without the internet, i.e. controlled locally within the home network. This means most of the proprietary systems are out of luck.

Most consumer smart home systems do not provide out-of-the-box fault tolerance capability. The easiest way is to double the smart hub with one primary and one secondary. This of course would double the budget too. For open source platform option, it's feasible by installing the software onto different hardware which could be existing ones to save money.

If you're using smart home system as a home security system or integrating with existing independent home security system, a self contained structure might be beneficial when power outage occurs. Usually traditional home security like Honeywell already takes it into factors by using a backup 12V battery. We could also follow the same concept with a backup UPS to provide power to all essential devices including the hardware running the software, router etc. You can also go steps further by using solar panel and charging battery so it's completed off the grid.

Part 2: Choosing the Software

Now you have a blueprint plan on the table, it's time to draft what software to run. As we already excluded the proprietary systems like Google Amazon Samsung, we need to pick one from the open source platforms. I have picked Home Assistant since I have been familiar with it for many years but you are definitely free to opt in with other choices like openHAB which is also great.

Home Assistant is so versatile that it can run on so many hardware from Raspberry Pi to standard PC. Depending on how you want to run Home Assistant, the process varies. Different installation methods lead to different features. Below is a brief summary outlining the comparison. Home Assistant Installation Methods

Personally I've tried out running Home Assistant on the following hardware:

  • Synology NAS ds216j
  • Macbook 2005
  • Raspberry Pi 3B
  • Intel NUC i5

My final architecture is to run home assistant docker container on the Intel NUC with many other auxiliary containers along such as:

  • Zwavejs2mqtt for zwave device management
  • Mosquitto for message broker
  • Tasmoadmin for tasmota-powered device management
  • Adguardhome for home DNS server
  • Traefik for reverse proxy

The database home assistant connecting to is hosted on the Synology NAS ds216j for redundancy for performance as I do not want to rely on the NUS's SSD or any other error-prone storage media. Optionally home assistant container can also be installed to multiple docker swarm nodes for resilience. (My previous post explains why docker swarm is better for smart home systems.)

Part 3: Collecting the Hardware

Core core hardware of the smart home system (HUB)

  • Intel NUC i5 running the primary home assistant node
  • Raspberry Pi 3B running the secondary home assistant node
  • Synology NAS ds216j running the MySQL database for home assistant

This constructs the hub of the smart home system. Once the hub is setup and running, it's time to install all the smart devices to their locations by areas

Z-Wave network

  • Aeon Labs Aeotec Z-Wave Gen5 USB stck plugged into the NUC (controller)
  • HomeSeer Floodlight sensor (node 3)
  • HomeSeer Floodlight sensor (node 4)
  • Dome leak sensor (node 5)
  • Schlage zwave lock (node 6)
  • Zooz motion and vibration sensor in garage (node 8)
  • NEO zwave siren alarm (node 9)
  • Heiman smoke detector in living room (node 10)
  • NEO door/window sensor (node 11)

Zwave network graph generated by zwavejs2mqtt

Local network

  • Tasmota powered smart plugs & bulbs
    • Gosund WP3 plug
    • WAGA CHCZ02MB energy monitor plug
    • TGWF115PRM energy monitor plug
    • GlobeRGBWW (costco) color bulb
    • Nexete KS-602f 3-way switch
  • TP-Link Kasa HS200 switch
  • Yeelight mono light bulb
  • Tuya bulbs & plugs controlled by LocalTyua

Google devices

  • SONY android TV
  • Google Chromecast
  • Google Home mini speaker
  • 4 Nest thermostats

Part 4: Connecting All Smart Devices

You've got a list of software and hardware required to run the entire smart home system. Congratulations! Now it's time to connect the hardware and configure the software, then start using your smart home system towards your goal - making your life easier!

Depending on how you run home assistant, the z-wave network component could be either an add-on or a separate integration e.g. Z-Wave JS. Once every zwave device in included, they will automatically show up in the zwavejs integration section and ready to be configured.

For all other smart devices connected through local network (wifi or wired), it is as simple as plug in power & network cable and configure them via home assistant configuration file or GUI. I have many tasmota-flashed devices to ditch the internet/public cloud so that I could always control devices locally without internet access. TasmoAdmin is a great utility to manage all tasmota devices in one place.

Last but not least, the home security alarm system. I have an existing Honeywell VISTA 20P security system well before building the smart home system. The Honeywell VISTA 20P is a solid panel which equips with a Honeywell 6160RF keypad. It also has a built-in wireless transceiver, which will let you use wireless Honeywell 5800 Series Sensors with the system. In order not to waste my existing investment on the security alarm, I decided to integrate it with the smart home system using the Envislink Integration. This gives me remote control of the alarm panel as well as some advanced features via the automation rules like time-based arm/disarm etc. However any new security door/window sensor, siren, smoke detectors are not tied to the Honeywell system but go with the smart home system using Z-wave technology, which is much cheaper and future-proof. In a sense, my home security alarm is a hybrid system consisting of traditional Honeywell system and Z-wave security devices.

Part 5: Making Automation Rules

If you smart home system is based on an open source platform like Home Assistant, there isn't really any golden rules how you system should work. There are tons of free templates and automation rules that you can get reference to. This is the beauty of open source platform comparing to those proprietary systems which either not supporting or requiring a premium for subscription.

Some highlights of my smart home system are:

  • Porch lights turn on/off on dusk/dawn
  • Driveway lights turn on when motion detected by the reolink security camera
  • Automatically arm/disarm the home security alarm based on time
  • Trigger Honeywell Alarm or Z-wave siren when any security sensor is breached while house is armed
  • Allocate different lock PINs to household members so home assistant knows who operates the lock
  • Sound the siren when smoke or water leak detected
  • Flash all lights in the house when security alarm is triggered
  • school pickup reminder based on the real-time traffic
  • ...

The list just goes on and on...

Part 6: Proofing the System

Now let's proof the smart home system by visiting the questions earlier in Part 1: Planning the smart home system.

Can your system be controlled locally without the internet/cloud?

Yes. Since most smart devices work without the cloud, like Tasmota, LocalTuya, the system still functions well when internet outage occurs. It can be accessed by the local IP address, or in the future by a 4G mobile backup connection.

Can your system work off the grid or with a temporary power outage?

Yes. Thanks to the attached UPS unit and solar panel. The smart home system draw little power (a NUC and raspberry).

Can your system be activated by voice?

Yes. Either by google assistant or Home Assistant built-in Speech to Text

Is your system responsible for home security?

Yes. As mentioned above, it's hybrid system consisting of both Honeywell and Z-wave.

Is your system fault tolerant with hardware/software redundancy?

Yes. By using docker swarm, the smart home system can tolerate system failure caused by hardware or software. Refer to my previous post explaining why docker swarm is better for smart home systems.

comments powered by Disqus

Translations: