Chapter 4

4 The Project

4.1 Overview 

Complex functionality in information technology can be explained best using an incremental approach, starting from simple “hello-world” type of functionality to sophisticated features in sequential steps, each of which can be tested and demonstrated individually. In software engineering terms, this approach is called a development sprint. Sprints are relatively small coding modules, which need to be designed in such a way, that they can be demonstrated independent of other development elements, once their implementation is finished. In engineering projects such sprint demonstrations are formal project milestones, which are conducted in front of the entire engineering team. The advantage of the sprint approach is the continuous validation of functionality. Problems are recognized early and remain manageable. The permanent monitoring of increasing functionality avoids surprises and keeps the fun factor high. In following this philosophy, most design phases of our project are independent from each other and work stand alone. However, some of the initial components build upon each other, so it does make sense to follow the sequence up to chapter 8.

In chapter five we start with installing and configuring the open source smart building and Internet of Things (IoT) platform OpenRemote. This will allow us to build a customized smartphone and tablet control app in less than one hour with no programming skills required. Later, the OpenRemote controller will also be used to run the automation rules, which we will build during the course of the project.

4.1 Project Phase 1

Figure 4.1 Chapter 5: Building a custom smartphone app with OpenRemote

In chapter six we configure our first sensor and connect it to the smart home application. Specifically, we will be polling weather condition and temperature for a specific location from the popular Weather Underground Internet service, displaying it with our smartphone app (Figure 4.2).

4.2 Project Phase 2

Figure 4.2 Chapter 6: Retrieving and displaying weather information (top of the screen)

In chapter seven we integrate multimedia control functionality to our smart home project. We will set up our OpenRemote smartphone app to function as a remote control for Apple’s multimedia suite iTunes (on both Macs and PCs) and Microsofts MediaPlayer under Windows 10 (Figure 4.3).

In chapter eight we introduce the rule based automation capabilities of OpenRemote. We will use the components, we have built so far, to put together the intelligent wake up scenario: “Wake me up early in case it rains or snows”. The idea is to start a morning wake up scenario 45 minutes earlier than normal in case of nightly rain or snowfall, to avoid the potential traffic jam. For that, we will use our Internet weather sensor to poll the weather conditions during the night, and, once a wake up condition is met, our scenario will start playing music. Another scenario will be “Welcome Home”, which uses the smartphone triggered presence detection to start playing the iTunes playlist of choice for the person returning home. We will even give our smart home a voice and have it read reminders and appointments for the day to us via its Hi-Fi stereo.

4.3 Project Phase 3

Figure 4.3 Chapters 7,8,10: Adding controls for iTunes and a Hi Fi stereo system

Up to this phase all you need for following and implementing the project is a Mac or PC, a Wi-Fi network and an Internet capable smartphone. From here on, you need the components of the technology you have chosen for your smart home, such as Z-Wave or KNX sensors and actuators.

In chapter nine, we add wireless light and power outlet control to our project, using the popular Z-Wave standard. In addition, we accomplish the integration of consumer electronics hardware using a Denon audio video receiver (AVR 3313), as an example (Figure 4.4).

4.4 Project Phase 4

Figure 4.4 Chapter 9: Controlling lights and power outlets

Chapter ten adds presence control. We will configure our WiFi home network to detect the registration of a particular smartphone, which we will use to trigger a welcome home scenario (Figure 4.3).

In chapters eleven and twelve we integrate KNX based infrastructure components for heating and lighting. In a step-by-step fashion, we explore how to download, install and configure ETS, the official KNX association control software. Then, we fully integrate the KNX controls with our OpenRemote project (Figure 4.5).

4.5 Project Phase 6

Figure 4.5 Chapters 11,12: Adding KNX control 

In the last part of the book we extend our project with functionality, which enables it to reliably function in a real environment and in daily operation. In chapter 13 we add the capabilities to access all control functions from remote via the Internet, in chapter 14 to automatically restore operation after a restart of the controller.

With that done, our smart home control system will be capable of:

  • smartphone / tablet based display of weather and temperature
  • smartphone / tablet based control of lights, heating, power-outlets, consumer electronics
  • smartphone / tablet based scenario control for scenarios such as Good Morning, Welcome, Good Night, Leaving Home
  • operation of an audio reminder system with text-to-voice conversion of calendar items
  • rule based scenario execution triggered by time, date, weather condition or temperature
  • WiFi network and smartphone based presence detection
  • Remote control via the Internet
  • Automated restoration of operation after power outages or planned downtime

Sensoring approaches such as presence detection based on smartphones or weather condition information retrieved from the Internet provide just a glimpse of what state of the art home automation based on open standards is capable of delivering. Using the functionality of our project as a start, a vast variety of variations and add-ons can easily be implemented.

4.2 Equipment and Prerequisites 

In general you will find that in order to implement smart home controls with functions beyond switching power outlets and lights, as we demonstrate it, you need relatively new equipment. This is true for your WLAN (Wi-Fi) router, for the appliances and consumer electronic devices you want to control as well for the mobile clients (smartphones and tablets) you plan to use. Fortunately, prices for all of the above have gone down over the past years. Thus, in many cases, you might rather want to upgrade the equipment you have to the latest generation than compromising and spending a lot of effort to integrate legacy equipment. Of course, there are always also good reasons not to upgrade. Everyone will have to make that decision on an individual base.

In order to be able to follow the project in this book, you will need the following, obviously depending on which functionality you plan to implement:

  • a home network with Internet access and a WiFi/DSL router
  • an iOS or Android powered smartphone or tablet
  • a Mac OS X or a Windows PC (While the functionality of the projects in this book can also be realized with older operating system variants, the step by step descriptions are based on OS X 10.11 (El Capitan) and Windows 7/8 and Windows 10.)
  • Z-Wave components (power-outlets, lighting, etc.) in case you plan to use the Z-Wave protocol
  • KNX components (power-outlets, lighting, etc.) in case you plan to use the KNX protocol
  • consumer electronic devices with LAN / WiFi capability built in

Alternative to Z-Wave or KNX, the usage of other building control standards for the projects described in the book is also possible, although not described in detail. The smart building and Internet of Things platform OpenRemote, which we use throughout this book, supports literally all major building control standards. (Table 4.1).

In addition to the above equipment, some familiarity with computer and network technology is recommended. You do not have to be able to actually write code. However, if you have never heard from IP, Telnet or HTTP, and if you have never edited a batch file (.bat) or a shell script (.sh), you will probably have to go through a steeper learning curve than others. On the other hand, with the thousands of good Internet tutorials just a mouse click away, there is nothing you cannot learn within a few hours.