How to Build a Smart Home from Scratch – The Basics


If you are looking at building your own smart home and feel overwhelmed with the options out there, you are in the right place. In this blog post series I’ll explain all the aspects of home automation and how to build one from the ground up.

 

You have been looking at all of these YouTube videos called “Smart home tour” and “Ultimate Smart Home” but no one takes the time to explain what components and consideration you need to think of when you are building your own smart home.

 

Smart Home are homes that are controlled by smartphones and voice assistants and triggered by events and sensors. To build a smart home you need a basic internet connection and good WiFI coverage in your home. Different vendors are available on the market from custom built applications to mass market products such as Google home, Amazon Alexa, Samsung Smarthings and Apple Home Kit. 

 

What you will need to make it:

 

Just starting out

I started out myself with the two easiest things to control your lights and your heating / cooling:

 

Lights: Philips Hue start kit with three bulbs a dimmer switch and a bridge Amazon US or Amazon UK

 

Smart Heating: the Nest thermostat was my first smart gadget price at Amazon US or Amazon UK

 

Hubs

  • Smart Things: great for just starting out check the price at Amazon US or Amazon UK
  • Home Assistant: Raspberry PI 4 is a great piece of kit to install home assistant Amazon US or Amazon UK

home assistant

Home Networking

A home network is used to connect all of your devices within your home to the Internet with a single broadband connection.

To connect your laptop to the Internet you can connect over WiFI (without a cable) or with an Ethernet Cable connected into your router. This allows data to flow through your laptop to the Router and then to the wider Internet.

The smart gadgets that you are looking into buying will either connect to your WiFi network or they will connect to a Hub (in the next section I’ll talk more about hubs).

You might of heard to the term IoT (Internet of Things) this relates to the ability of devices to talk to each other and send over messages, for example my motion sensor can send a message to my light bulb that it senses motion and signals the bulb to turn on.

 

Some IoT devices will need to talk to the “cloud” this refers to the fact that it needs to talk to a server (computer) that sits outside your home network and in the Internet. This can open up a vulnerability in your setup and home automation pros are trying to keep everything local.

An example I can give you is IP cameras:

Nest cameras are quite popular and they stream data over the internet, the footage gets stored in the cloud on a Google Server (Google owns Nest). The alternative is to use IP camera such as the UniFi Video product line which record within the home network and don’t allow connections from outside unless you explicitly set it up in that way.

This avoids the worry of some hacker in China looking at your Kids sleeping.

 

How to Interact with a Smart Home ?

If you think of how you interact with your “dumb” devices you would have some sort of button to press and switch to flick.

Smart gadgets simulate a press action with software, they have a similar logic they use 0s to indicate OFF and 1s to indicate ON, but how do we interact with them ?

 

Phone

Nearly all smart home devices require you to download an app on your smartphone and create an account with them. If you are like me, you will collect a lot of devices and unfortunately have a lot apps and passwords to remember.

Once opened the app you can control your smart device and change settings. Some devices you will be able to control even outside of your home on the other side of the world! This might seem cool but it could be just easier to turn on the light from the wall right ?

hue

Voice Assistant

You can use a voice assistant with your voice normally you need to use a trigger word like “Alexa” or “Ehi Google” this will ensure that the next thing you say it will be picked up by the smart device.

Example:

Alexa, turn on the living room !

 

Voice assistants can also act a Hub (see below) famous names are Amazon Echo, Google Home and Apple’s Siri.

 

Automation

If setup correctly this can improve your life significantly, an automation is a series of actions that are triggered by an event:

 

  • Turn on the porch lights when I get home.
  • Send me a notification when the machine machine has finished
  • Turn on the TV and close my blinds in the evening.

homekit automation

Different platforms implement automation differently with the most powerful I’ve found being home assistant.

 

How Does a Smart Home Work – Hubs ?

 

smartthings

A hub acts as the brain of your smart home setup it links all of the products that you use together and manages the communication with the outside world. Hubs use different types of technology (protocols) to ensure that all devices communicate among themselves.

Products like Amazon Echo can act as a hub, other options like Samsung Smarthings have a lot more customisations in terms of automations and triggers.

Apple’s version is called home kit, each Mac and IOS device now come with a Home app. You can connect devices to your home app using the home kit functionality.  You need an Ipad or Apple TV to act as the hub.

 

Another famous hub is Philips Hue which controls your lights in your home. The starter kit ships with the Hue Bridge which you will need in order to operate the light bulbs.

 

Home Assistant

HA or home assistant is an open source software that can be installed on multiple hardware like a Raspberry Pi and it gives you full control on your devices and integration and automation possibilities are endless.

It focuses on privacy and security for the end user. HA is an advanced option but I will be adding step by step guides in the future.

 

Protocols

A protocol is a set of rules and languages that devices use to communicate with each other. Like with human languages in order for us to understand what the other person is talking about we need to talk in the same language.

 

The Internet is filled with protocols but in this article we will talk about the protocols that are interconnected with home automation.

 

The overall best practices would be to pick one or a few and stick to it.

All smart home products use radio frequency which are a type of electromagnetic radiation which sits on the lower side of the electromagnetic spectrum they are two different attributes wavelength and frequency:

Wavelength x Frequency gives you the Speed.

Frequencies are measured in hertz Hz (cycle per second), a Ghz (gigahertz equals 1,000,000,000 Hz).

When you read the term radiation that might seem scary but most of the radiation from smart home devices are harmless with a frequency of 2.45 Ghz for WiFi, Zigbee and Bluetooth. Just as a reference Ionizing (which is harmful for use) sits at a frequency of 2.4 million GHz.

 

Higher frequency means the ability to have higher bandwidth which means the ability to transfer more data in a short amount of time. An example of this is 5.8 GHz WiFi.

Lower frequencies have low attenuation which means that they can pass through solid objects such as walls much easier compared to higher frequency bands. Low frequency bands are around .433 Ghz.

 

Z-Wave

Z-Wave has the lowest frequency compared to the other protocols at around 0.9 Ghz this gives it its greatest line of sight between devices however to accomplish this it has to sacrifice speed.

Z-Wave is licensed by Sigma and adopts script rules for interoperability and compatibility. It uses a mesh networking technology which enables devices to talk to each other through other devices.

 

Zigbee

Zigbee is an open communication standard that operates wirelessly it makes uses of a higher frequency than Z-Wave at around 2.45 Ghz, same as Bluetooth.

It also creates a mesh network like Z-Wave, bear in mind that this would be a different mesh network, you can have more than one.

 

Zigbee can support up to 65,000 nodes within a single network with a range of 30 to 65 feet.

Many popular devices use the Zigbee protocol such as:

  • Amazon Echo Plus
  • Samsung SmartThings
  • Hive Heating
  • Philips Hue
  • Yale smart locks
  • Ikea Tradfri

 

 

WiFi

This is the most common type of technology that most of us already have in our home. When normally have a router that come with our ISP and generally it asks as an access point.

Each device that uses the WiFi network such as your smartphone or smart tv will connect back to your access point. Depending on the type of access point and the number of devices you can really have a good WiFi experience or a poor one.

 

I personally use UniFI products with different access points scattered around the house to get good coverage. Generally if you can plug something in the the ethernet cable then you should.

In terms of smart devices you have your IP cameras like the Ring doorbell or Nest Hello and some smart thermostats like the Nest Thermostat that connect directly to your Wifi generally using the lower frequency band of 2.4 Ghz.

 

In general WiFi is much more capable than the other protocols but needs to be done correctly. Main advantage is the ability to have smart devices connected without the extra cost of a hub.

Wifi has different standards and bandwidth levels, the table below comes from Wikipedia:

GenerationBandwidth AdoptedFrequency
Wi-FI 1 (802.11b)1 to 10 Mbit/s19992.4 Ghz
Wi-Fi 2 (802.11a)1.5 to 54 Mbit19995 Ghz
Wi-Fi 3 (802.11g)3 to 54 Mbit/s20032.4Ghz
Wi-Fi 4 (802.11n)72-600 Mbit/s20092.4/5 Ghz
Wi-Fi 5 (802.11ac)433-6933 Mbit/s20145 Ghz
Wi-Fi 6 (802.11ax)600-9608 Mbit/s20192.4/5Ghz

 

MQTT

MQTT stands for MQ Telemetry Transport it is a machine to machine connectivity protocol. It is very lightweight in terms of data transfers.

For MQTT to work you would need Clients and Brokers, this is a very powerful setup that you need to know about when setting up Home assistant.

 

Products

To give you an idea of the main product / categories within home automation are:

  • Heating / Cooling
  • Lighting
  • Home Security
  • Gas & Water Leaks
  • Vacuum Robots
  • Smart Appliances
  • CCTV & IP cameras
  • Door Locks
  • Smart Blinds

home kit

Feel free to check out my other blog posts and subscribe to the blog for future posts.

Disclaimer:

This posts contains affiliate links to Amazon UK and Amazon US, I’ll get a small commission for each sell, but it will not cost you anything. This allows to keep this blog sustainable.

 

Stay safe and keep it digital!

giordano

Gio

Gio loves rabbits, smart home tech, WWII, travelling to Thailand & my favourite pizza is margherita with parma ham!

Recent Posts