Controlling Smart Home Devices

A smart home device can be considered to be made up of three major Components.

  • Connectivity
  • Control Protocol
  • Control App and API





Connectivity

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.

Control Protocol

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.

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.

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 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:

Smart-thermostat

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.

Pros

Easy to setup and no need for a third party Dashboard or controller.

Cons

  • 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:Controll-devices-alexa

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:

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:

Pros

  • Works without the Internet
  • Can easily accommodate devices from different manufacturers in a single Interface.

Cons

  • 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.

Related Tutorials:

Please Let me Know if you found it Useful
[Total: 2 Average: 1]

Leave a Reply

Your email address will not be published. Required fields are marked *