Chapter 1

1 Read Me

This book explains state of the art smart home, building automation and Internet of Things technologies and demonstrates step by step how to apply them to real world projects. The toolset covered consists of tablets, smartphones, sensor equipped devices, the Internet and the latest wireline and wireless building automation standards.

1.1 Who is this Book for?

You will be introduced to technology basics, planning and design principles, security and privacy considerations as well as implementation details and testing philosophies. Expecting no specific know-how upfront, the book is suited for both – the professional consultant as well as the technology loving hobbyist.

After explaining the big picture and the key concepts of state of the art home and building automation, the book will walk you through the implementation of a concrete building automation and control project in a step-by-step manner. At the end of each project phase you should have a real, working solution on your desk, which can be further customized and expanded as desired. No programming skills are required as prerequisite. Scripts are explained line by line, configuration settings step by step. Of course, if you have never written a short automation script or configured a DSL router, at some point your learning curve will be steeper than that of others. However, everything you learn will be based on open standard technologies, which you will be able to utilize in any other IT related project.

Technologies and platforms which are used in the project are:

  • Wi-Fi / WLAN
  • Telnet, HTTP, TCP/IP
  • Z-Wave, a smart home communication standard
  • ZigBee, a smart home communication standard
  • KNX, a smart home communication standard
  • Drools, an open source object oriented rule engine
  • OpenRemote, an open source Internet of Things software platform
  • IFTTT (IF This Than That), a cloud based Internet of Things control service
  • Google Sheets, a cloud based spreadsheet service, part of Googles G Suite
  • Google Apps Script, a scripting environment based on JavaScript for G Suite products
  • macOS / Linux / Windows 10 / Java

Parts of the project integrate consumer electronics devices, such as audio equipment from Denon and Marantz. However, project and instructions are designed, so that that they can easily be adapted to other manufacturers. Be aware, however, that equipment, which is more than a few years old, probably will lack the required interfaces for smart home integration at the level which is being covered in this book, such as built in WLAN, Bluetooth, web server components, or “Wake-on-LAN” functionality.

While not part of the concrete project described in the second part, the book also covers popular smart home solutions such as Apple’s HomeKit, Google’s NEST, Google Home, Samsung’s SmartThings or Amazon’s Echo. While they are not in the centre of the book, their integration with the described solution is discussed and explained. The technologies, design and planning approaches, test philosophies and security considerations discussed do apply to any smart home and building automation solution.

1.2 What You Will NOT Find 

This book is not a cookbook for simple plug and play type home automation solutions, which various vendors are offering based on closed and proprietary solutions with limited functionality. It looks at the much broader market of smart homes, building automation and IoT and does a much deeper dive into the technology basics, than the average smart home customer typically is interested in. Plug and play type solutions and how to integrate them with professional level building automation are covered however, but it is the smaller part of a much broader and deeper discussion of the topic.

1.3 What You WILL Find

The objective of this book is to explain and demonstrate how to build a comprehensive smart home and building automation solution, which is capable of integrating devices and platforms from different vendors, connecting them through meaningful and useful rules. The outcome is a professional level, real world smart home solution, which improves quality of life while saving energy. For the implementation of the sample project in this book I have selected a combination of a local home controller and a cloud based solution. The local home computer component is based on the open source platform OpenRemote, the cloud component on cloud services from Google and IFTTT. In combination they deliver a solution providing interoperability with most devices and platforms on the market, while allowing for full customization to needs of residential as well as commercial users.

1.4 Safety First!

For the proposed project security and availability aspects are discussed in detail and according recommendations are being made. We will take a closer look at what is behind the frequent headline news about smart home door locks being hacked, or smart home cloud accounts being compromised. And we will explain measures against it. In the sample project described, safety and security plays a key role as well. All step by step instructions take this into account and are designed accordingly. In addition fundamental technology design and operations principles for a secure and high availability building control infrastructure are being discussed, providing value beyond the project covered in this book.

1.5 Take no Risks

A last word of caution before we get started. Be careful when following the step-by-step instructions. Almost no two PC systems, consumer electronic devices, or other electronic gear are alike. Even when they appear to be, they actually might differ in hardware due to different production runs, in firmware, in software or in configuration. If something goes wrong, you might need to reinstall the operating system on your PC and you could lose all your data. So set up a dedicated user for testing or experimentation or even better use a spare computer system, unless you are absolutely sure what you are doing. I cannot take any liability for any undesired outcome of the given instructions.

1.6 Formatting Rules 

For better readability, the following formatting rules are used throughout the book:

  • Monospace
    Computer output, code, commands, user input
  • LARGE CAPS
    Communication Protocols (DHCP, IP, KNX, etc.)
  • Italic – medium blue­­
    sequence of GUI commands separated by­­­ en dash (–)
  • Medium blue underlined
    Web addresses (URLs)

For the projects in this book I have created the user account smarthome under macOS and Windows 10. The prompts in terminal window screenshots as well as in terminal print-outs read accordingly.