A smart home device can be considered to be made up of three major Components.
- Control Protocol
- Control App and API
This is almost always wireless and there are a number of wireless technologies in common use. They are
- Wi-Fi – Currently available on almost all home networks.
- Zwave- See Zwave basics
- Zigbee -See Understanding Zigbee
- Thread- (Google devices)
- BLE (Bluetooth Low Energy)
Regardless of the wireless technology being used by the device to qualify as a smart device it should be controllable over the Internet.
In order to do this it needs to either support the IP protocol of use some form of hub/gateway. See Home networking basics.
Smart Devices are normally controlled using either the HTPP protocol or the MQTT protocol.
HTTP is the protocol used on the web for reading web pages, and because of its availability it has been used in almost all existing smart devices. See Controlling smart home devices using HTTP
However it wasn’t designed for this, and is fast being replaced by MQTT which is a light weight messaging protocol, ideally suited for this application. See MQTT in smart Homes.
Many devices can be controlled using both protocols.
Control App and API
Smart home devices can be controlled :
- Locally using an interface built into the device
- Using an App on a phone or tablet
- Using a web browser on a computer or phone/tablet
- All or a mixture.
For example I have a Salus IT500 smart thermostat which I can control locally on the thermostat, using an App on my phone, and on my computer using a web browser.
All smart home devices are controlled using an API (see Smart Home APIs).
These APIs provide a series of commands and responses.
Many devices have private APIs which means that they can only be controlled using the manufactures App/software, whereas others have open APIs which means that you can use third party Apps to control the device.
Manufacturer Provided App and Website
Almost all smart home devices are controllable using a mobile phone App provided by the device manufacturer.
This usually involves the App, and the device connecting to a website on the Internet which lets you setup and control the device. This is shown in the schematic below:
The usual initial configuration is something like this:
- Install device and switch on the device connects to the Internet and the manufacturers website.
- Use an App on a phone, or a web browser and create a user account on the manufacturers website
- Use an App on a phone, or a web browser and login to the manufacturers website and register the device.
- The device is now controllable.
Easy to setup and no need for a third party Dashboard or controller.
- Usually requires an Internet to work. That is, no Internet then no control.
- If you are using other devices from other manufactures then you will also need separate Apps.
Controlling Using Alexa, Google Home etc
Many devices now advertise that they will work with Alexa etc.
The way this works is the Alexa skill running on the Amazon server sends the commands to the cloud server of the device manufacturer and functions just like a normal control APP. This is shown in the diagram below:
Software called a skill (Alexa) is usually provided by the device manufacturer, and that way they don’t need to publish their control API.
Local Control Using a Home Automation Hub
My preferred method is to control devices locally without requiring an Internet connection.
There are numerous home automation hubs available for doing this and they can be divided into:
- Hardware and software systems e.g. Samsung Smarthings- Home page
- Software only systems -Homeassistant –Home Page OPenHabb –Home Page
You can also build your own using node-red. The choice depends really on.
- What devices you have or intend to have
- Your Technical ability
The advantages and disadvantages of the local control are:
- Works without the Internet
- Can easily accommodate devices from different manufacturers in a single Interface.
- Not all devices will work with third party systems as the APIs are private.
- You need more knowledge and expertise to do this
- You need to install and maintain hardware and software.
There are several different ways of controlling smart devices the most common being a phone App provided by the device manufacturer.
When purchasing devices from different manufacturers you need to be aware that they will usually use different Apps.
Home automation hubs both hardware and software are used to provide a single control panel for devices regardless of the manufacturer and control protocol.
- Understanding Smart Home APIs
- control Sonoff using Node-red
- How Smart Home Thermostats work
- Smart Home Lighting and Switches