Home > Articles > Hardware > Upgrading & Repairing

Home Automation Made Easy: Introduction to Control Protocols and Automation Process

This chapter explains why devices must talk to each other in home automation systems. It also covers how they communicate (the protocols) and what triggers events that lead to actions.
This chapter is from the book

The home automation process involves changing the existing state or condition of a device, an appliance, a system, or an electronic component from an internal or external stimulus or event, by a person taking an action, or as the result of the movement of time. To achieve that state change through automation, a control message must be sent to the device to be acted on. The condition or state changes can be a simple switching to an on-or-off status, or can be a more complex adjustment such as dimming to a preset level; and that device modification can be an incremental on or variable or both. The control messages are sent via any one of a number of defined home automation protocols.

Control Methods

From infancy we test various methods and learn ways to control others to meet our needs. Crying is typically the first, then sounds, and before long we are crawling and moving about and can begin to make things happen on our own. Over time our individual skill set builds and we can interact with all the things around us. The simplest control method is human intervention, flipping a switch to turn on a light, for example. You know which switch to use, what it controls, and which direction to turn the target device, in this case a light, on or off. The process or steps for turning a light on or off includes the following mental and physical steps: disturbed–decide–poise–act–receive feedback–adjust if needed–feedback–satisfied. The nonhuman intervention automation process mirrors the steps a person would take. The total home automation process is similar except that the system can do everything but decide what to do. The deciding is left to the human, who must set up parameters in advance for consistent automated operation.

One-off devices to perform some of many home automation steps or functions have been around for some time, but with limitations that are not present in a completely automated computer-controlled environment. This chapter gives a basic understanding of how a novice home automation hobbyist can leverage diverse protocols and choose from myriad available products and technologies to control all the automation functions on one central home automation platform.

Reasons for Using Automated Control

The need for home automation technology comes from wanting to make a change in the condition of something: turning on a light or lowering the thermostat, for example. This need for change arises from four basic categories: time, need, event, and communication. In many cases, your home automation platform can take these actions based on the same stimuli that would spur a human to action with little or no need for human interaction.

Time Based

Time-based actions include actions based on a set amount of time passing, such as turning off a bedroom television after an hour of use so that the viewers can nod off and not worry, or actions based on a set time of day, such as turning on the coffee maker at the same time each morning. Time-based controls can be employed on any recurring interval, whether hours, day, week, day of week, and so on.

Need Based

Need-based events are just that, events that have to happen simply because we want them to. When your home gets too cold, you raise the temperature on the thermostat; when it gets too dark, you turn on a light. Not all events can be scheduled, so your home automation platform has to be able to process need-based actions as well. Human participation in initiating the control action can be an easy mouse click or two away or can be done by voice command with the HAL platform.

Event Based

Event-based actions are triggered based on an event, either predetermined or accidental. For example, you might set your thermostat to turn on the heat when the temperature dips too low, or have a trigger on your air handler shut off power to the unit if water is detected in the water pan.

Communication Based

Threaded through all of these prior circumstances to one degree or another is the desire we all have to stay informed. Some conditions, events, and actions we want to know about as fast as possible. Other events we don’t need to know about but want handled as efficiently as possible and without our knowledge, In some circumstances we want to be able to find out later, by looking at a log entry, that the situation was handled. For example we might want to be notified by email to our smart phone if an aging parent called during our absence from the house.

The feedback loop is a very desirable and important feature of a modern home automation system for those of us who want or need to stay informed. Fortunately, unlike many products currently in use for home automation, the HAL platform has the capacity to keep us informed not only of those things happening in and about the home, but also of financial, weather, and communication information gathered from the Internet or localized weather equipment. We live in an age when the speed of access to information and communication is unparalleled, so leaving some of the recurring chores of keeping informed and in touch though leveraging some artificial intelligence in our home automation can increase our own communication productivity and at the same time free us to focus on other important matters.

The true beauty of the core automation product line discussed in this book is that the HAL software “communicates commands and processes device feedback” in enough of the commonly popular home automation protocols that it is possible to automate nearly every electrical, mechanical, and electronic device in your home environment.

The next section introduces highlights of the four very popular home device control protocols and standards. As a hobbyist, you’ll find that it is important to know that there are differing protocols and that some are more suitable for certain tasks. By bringing diverse protocols into your home automation solution, you can have the best overall system with the lowest overall cost of implementation. Because the HAL software operates at the application layer in the control model, you are not locked into any particular protocol, brand of hardware products, or technology. It is truly a solution that allows combining best of the protocol breeds.

Protocols and Standards

When setting up processes to be completed with home automation technology, there are some relevant details to deal with for whatever protocol your control devices are using, but only during the initial setup or installation phase. After you have completed the device setups within the HAL software you will interact with HAL with language and words not protocols, but some readers will want to know about how those interactions take place. This section gives an idea of what is going on in the background to accomplish your control strategy.

Home automation standards are the set criteria for how home automation devices respond to a control signal and perform a function. There are many home automation standards, some of an open nature and others proprietary in nature.

Many consumers believe that implementing home automation is too expensive and available only to the very wealthy or technologically literate. Fortunately, the reality is that a complete home automation system is well within the reach of the ordinary home owner, provided that they have some spare time and a budget to build out a system. HAL software makes for a cohesive platform by integrating these various standards and protocols under one digital “roof.” Not only does it act as the protocol communicator, but it also translates the users’ needs into actions. After the devices and protocol interfaces are properly set up to work with HAL, the HAL software does the machine-level translating of the command to the physical. By using HAL software to control the various physical-layer communications, a home can have multiple types of devices installed and working together, even to the point of having a switch of one type activate a device of another, each using different control protocols.

The next few sections highlight some details of how the protocol adapters communicate with the devices.

Physical-Layer Communication

Because everything in home automation relies on electrical signals of one sort or another that carry a message to make the changes for us, we are limited somewhat by the physics or physical properties of electricity as discussed in Chapter 1, “Home Wiring and Electrical Fundamentals.” Electrical signals can be of an analog or a digital nature. By using electrical, radio waves, or infrared light signals as our avenue or method of communication along the home automation control pathways, we are limited only by the physical properties of those signals. With electric power we can channel it to do work. By manipulating the properties of electricity we have the ability to communicate information to our advantage. We can use this communication property not only to control electrical and electronic things but also mechanical things like doors, locks, vents, and valves. This is accomplished by using the electrical controls and solenoids as our assistants to do the work from simple but highly defined message packets to control that work.

To borrow a page from biology, the control communication (electrical or wireless) pathway has to either sense and react to stimulus with a response or initiate a communication that will elicit a response or an action from a controlled device. Therefore, at the control pathway level or sensory level at the most primitive layer, there are only a few things that can happen with an electrical current to initiate or convey messages:

  • It can be turned off or on. Example: Voltage/no voltage.
  • It can be off, variable in voltage and/or current or frequency, or full on to the maximum. Example: high/low voltage; high to low frequency.
  • It can be measured within a low or high range for voltage, current, or frequency to compare or match desired presets. Example: 95 VAC to 130 VAC: Normal household voltage.
  • The sensed changes can be associated with time or timing cues to identify message start or end points.

These changes in the physical state are detected at the physical level (hardware, media level) and are interpreted as coded messages high up the application stack. They are used within the devices to execute the state change defined in the message.

Imposing Messages on the Physical Media

At the most basic physical level of the electrical wires or a wireless communication path, the medium used can carry an imposed signal of either an analog or a digital nature. The communication can be a one-way street; that is, sent only and received, or it can be twoway, with returned or reverse-direction message packets sent over the transmission medium from controller to device and back from the device to the controller. When an analog mode is used to communicate, the signal can be made to vary in amplitude or frequency so the resultant signal changes can carry frames of data.

In digital communications mode the signal can be chopped into time slices in which the amplitude of the signal is measured and is considered on or off in that time frame based on its strength, or measured as high or low in a time frame. These on/off states or high/low states of the electrical current or radio signal in digital mode are sensed or sent as changes in voltage, current, or frequency. They are used to represent zeros and ones or other numbers and are used as binary values that translate into data or information or are used as timing pulses to separate and keep track of chunks of the message. These representations of zeros and ones (or numbers) can be used at the distant end to represent anything necessary to perform the desired actions or convey the sought-after information. Parts of the message packets identify the target devices or all the devices or a group of devices through the encoding scheme used in the protocol. Timing pulses are used to define the beginning and end of the object communication so the communication packets maintain whole message integrity or are resent in two-way systems until the whole data packet is acknowledged.

One-way protocols cannot guarantee whole message delivery. A feature called “checksum” can be implemented as a part of a protocol to test the message for completeness and integrity by running a math formula against the packet’s data bit and comparing that to the checksum value sent with the message packet. These fundamentals are implemented in various innovative ways, but at the most basic level the communication occurs because of these simple property state changes at the electrical signal level regardless of the physical media (wire, wireless, infrared, or fiber) used for the transmission of data. In the OSI seven-layer networking model this media layer is referred to as the physical layer. To do the home automation projects in this book, you do not have to delve too deeply into how networking and communications are accomplished or understand them fully. Awareness of some features of protocols covered in this rapid overview should be sufficient for trusting that unique control messages can be sent and received successfully to make the home automation device-level processes function to your benefit.

The four protocols of primary interest used in this book’s projects include X-10, UPB, INSTEON, and Z-Wave. There are other protocols as well and likely there might be innovators in the future that will create other useful ways to communicate from controller to device. Some people talk about the network of things, a concept in which everything in your personal universe is identified by a unique communication’s address, such as an IPV6 address, and everything is connected and reachable though that address. We are not quite there yet, even though many of the pieces are in place. We can, however, communicate right now to the components that matter most to us by using these protocols.

X-10

In X10 the data message frames are imposed on an AC current carrying wire at the point where the electrical power is dropping from 120 volts positive down to zero and before the second half of the sine wave that is moving in the opposite direction begins its half cycle.

The frequency of the transmission is 120KHz, and it occurs for only a very short span of time at a specific point in the 60-hertz current cycle, known as the zero crossing point.

There are 16 available House codes A though P, and 16 available Device codes 01 through 16, allowing for a maximum device count of 256 for X-10 devices.

There are seven change state commands to issue to one-way X-10 devices—on, off, dim, bright, all lights on, all lights off, and all units off—which are all sent via a 4-bit code.

There are seven additional command/info settings available to use in the devices and controllers capable of two-way X-10 communication: status on, status off, status request, pre-set dim, hail, hail acknowledge, and the extension code (or extension code itself).

The minimalist data messages sent as X10 communications are referred to as data frames and must include a start code signifying that an X10 command is about to be sent, a one-letter code signifying the “house” the command belongs to, and one function code. The binary for that could look like 1110 01001011 0001, carrying the information message start, house code letter K, and command “all lights on.” It is a simple but limited protocol but is credited with beginning a trend in home automation implementation that did not require rewiring or additional control wiring.

UPB

Universal Powerline Bus is considered much more reliable than X-10. UPB communication messages are sent at speeds of a range of 120 to 240 bits per second.

In 60-cycle AC circuits each half cycle takes 8 1/3 milliseconds to occur. The UPB pulses are spikes in voltage placed on the power line at a precise time in each half cycle, the timing of which conveys a value from 0 to 3. Two bits of data are contained in each half cycle, and the data bits from four half cycles are grouped together and carry 8 bits of digital data, a UPB byte.

These bytes are combined into UPB communications packets sized between 7 and 25 bytes for interpretation and use by the device. Each message packet contains a preamble, a packet header, the data message, and a checksum byte followed by an acknowledgment frame. The header packets contain the information about network ID, device ID, source ID, and a packet control word. The data messages also contain the instructions for the device to perform.

One interesting element and what makes UPB different is that the information about the device ID, network ID, and so forth is stored in nonvolatile memory registers within the device.

INSTEON

INSTEON products operate by two communications over the media: over the home’s wiring system and over a preset radio frequency. The devices forward the INSTEON protocol signals, extending the network range for up to three hops; the signal originally sent is hop count zero (0). The three-hop limit prevents endless looping of the command signals.

If the original signal is 0, then the first rebroadcast is hop 1; if the next device adds hop count 2, and the next device hop count 3, there are no more hop counts. So the original signal sent from the first device can travel though three layers of devices to the fourth device layer out in the distant network.

The RF signals are sent at frequencies of 915MHz in the U.S. The power-line protocol is transmitted at 131.65KHz over the wire.

INSTEON plays well with X10 devices although their protocols are different.

INSTEON is a dual-band communications protocol, meaning that its digital signals can travel over the home’s wiring system and over radio frequencies.

There are about 200 available products that speak and understand INSTEON communications. Not that anyone would ever use that many but the core protocol can support more than 16 million devices per network.

The standard and smallest INSTEON message is composed of the following: from address (3 bytes), to address (3 bytes), flag (1 byte), command (2 bytes), and redundancy check (1 byte).

Z-Wave

Z-Wave is a wireless protocol and is very much a networking protocol supporting quality two-way communication, much like the Wi-Fi that supports your computers’ connections to wireless networks. It operates at frequencies below 1GHz so it is mostly free from interference from the higher frequency Wi-Fi networks. A level of encryption of the data is supported to keep the communication between the devices secure and intact. Because it is at its core a networking protocol, it can support a version of IPV6 device addressing. It is a proprietary protocol but is supported by nearly 160 manufacturers making Z-Wave-compatible devices worldwide. There are nearly 700 available devices that speak and/or understand Z-Wave wireless messages.

A home Z-Wave network can support 232 devices, and more than one network can be bridged together at a higher layer to support more than 232 devices. This is rarely done in automated homes for two reasons. First, controlled device counts above 100 are rare, and second, other technologies can be used and might offer advantages in specific applications. When using HAL software as the hub command center, you are not limited to a specific technology as your home automation solution.

The Network ID (or Home ID) uses 4 bytes (32 bits) of the control message.

The Node ID uses 1 byte (8 bits) of the control message.

A single Network or Home ID can contain a total of only 232 nodes because some of what would be node IDs are co-opted for messages or performing exceptional functions. One has to accept that node IDs are identified from 000001 to 11101000 in binary or 0x1 to 0xe8 in hexadecimal.

Z-Wave’s approved radio frequency operating range for the U.S. and Canada is set to 908.4MHz.

The devices emit low-power radio waves and the maximum transmit/receive ranges are considered to be 90 feet in buildings to 300 feet outdoors in the clear. Z-Wave presents a good option for controlling something located in outbuildings supplied or powered by a different electrical service because of the potential to send signals via radio wave to 300 feet.

Each Z-Wave network begins with at least one primary controller and a controlled node. New devices are brought into the network by a process called inclusion (or taken out by exclusions). After the network is set up, secondary controllers can join and can be brought into the network.

Two types of device nodes can take on one or more of three characteristics:

  • Controllers—Control other Z-Wave devices.
  • Slaves—Are controlled by other Z-Wave devices.
  • Routing Slaves—Pass messages to nearby neighbors, thereby extending the range of control of the entire network but adding modest time delays for the routing table lookups and retransmissions to each next available neighbor in turn.

Z-Wave presents two clear advantages because it is wireless. The first advantage is that you can control devices that are on nearby alternative wiring systems. The second is that you can use a handheld remote to control Z-Wave devices, again thanks to its wireless communication media.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020