Scroll down for more guides

Part 1 · Understanding Home Automation 7 min read

The automation cycle: sensor, controller, action and feedback

From a Measurement to an Action – Step by Step

When a light switches on as you walk into a room, it can look almost like magic. In reality, a short chain of well-defined steps has taken place in a fraction of a second: something was detected, a message was sent, a rule was checked and a command was carried out.

Understanding this chain is the key to designing reliable automation. It helps you choose the right equipment, place it correctly and find the cause quickly when something does not behave as expected.

This guide follows the path of information through a home automation system, from the first measurement to the final action.

1. The Basic Cycle: Input, Processing and Output

Every automated system, from a simple thermostat to an industrial control system, follows the same basic cycle:

  1. Input – a sensor detects or measures something, or a person presses a button.
  2. Processing – a controller compares the information with its rules and decides what to do.
  3. Output – an actuator carries out the decision, for example by switching a relay or moving a motor.

In many systems a fourth step follows:

  1. Feedback – the device reports its new state back to the controller, so that the system knows the action was actually carried out.

A heating system is a good example of a complete cycle with feedback. The thermostat measures the room temperature, the controller compares it with the desired temperature, the heating is switched on, and the thermostat continues to measure until the room is warm enough.

2. Where Are the Decisions Made?

The "brain" of an automation system can be located in different places. Where the decisions are made has a large effect on speed, reliability and privacy.

LocationExampleAdvantagesPoints to Consider
In the device itselfA thermostat, or a motion-controlled outdoor lightVery fast and works without a networkCan only use its own information
In a local hub or gatewayA Zigbee gateway with built-in rulesFast, works without internet if the rules run locallyUsually limited to the manufacturer’s own devices
On a local serverA small computer running Home AssistantCombines many brands, runs inside the homeNeeds setting up and occasional maintenance
In the cloudA manufacturer’s app and online serviceEasy to start, accessible from anywhereDepends on the internet connection and the service provider

Many systems use a combination. A device may handle simple safety functions itself, while a local controller runs the everyday rules and a cloud service provides remote access and notifications.

3. Centralised and Distributed Systems

In a centralised system, one controller receives all the information and makes all the decisions. This makes the system easy to overview and to change, because all the rules are in one place. The disadvantage is that the controller becomes a single point of failure: if it stops, most of the automation stops with it.

In a distributed system, the intelligence is spread across several devices. Each device or group can work on its own and share information with the others. Wired building systems such as KNX work this way – switches and actuators communicate directly over the bus, so the installation does not depend on one central computer.

Home installations often end up in between: a central controller for coordination and convenience, with important functions able to work locally even if the central part is unavailable.

4. How the Parts Communicate

Sensors, controllers and actuators need a way to exchange messages. The most common methods in homes are:

  • Wi-Fi – devices connect directly to the home network.
  • Zigbee and Thread – low-power wireless mesh networks, where mains-powered devices can pass messages on for others.
  • Z-Wave – a low-power mesh network using lower radio frequencies than Wi-Fi.
  • Bluetooth – short-range communication, often with a phone or a nearby hub.
  • Wired buses and Ethernet – cables carry the messages, which is often the most reliable option.

On top of the radio or cable, devices need a common "language" – a protocol – to understand each other. Messaging systems such as MQTT are often used between controllers and software. Part 2 of these guides explains these technologies in detail.

5. Events, Status and Polling

Information can reach the controller in two different ways.

With events, the device reports by itself when something changes: "the door has opened" or "motion detected". This is fast and efficient, and it is how most modern devices work.

With polling, the controller asks the device at regular intervals: "what is your temperature now?". Polling is simple, but changes are only noticed at the next question, and frequent polling creates unnecessary traffic.

Battery-powered sensors are usually designed to sleep most of the time and to wake up only to report an event or a measurement. This saves power, but it also means that some sensors only report changes in temperature or humidity at intervals, not continuously.

The controller keeps track of the latest known state of every device – on or off, open or closed, the last temperature measured. Rules are evaluated using these states.

6. A Complete Example: The Bathroom Fan

Follow the information through a typical automation that controls a bathroom extractor fan:

  1. Someone takes a shower and the humidity in the bathroom rises.
  2. The humidity sensor measures 78% and sends the new value over Zigbee to the gateway.
  3. The gateway passes the value to the home automation controller.
  4. The controller checks its rule: if the humidity is above 70%, the fan should run.
  5. The controller sends the command "on" to the relay that powers the fan.
  6. The relay switches on and reports its new state: "on".
  7. The sensor continues to report as the humidity falls. When it drops below 60%, the controller switches the fan off again.

Notice that the fan switches on at 70% but off at 60%. This difference prevents the fan from switching on and off repeatedly when the humidity is close to a single limit. Guide 11 explains this and other techniques for reliable rules.

7. How Fast Is It?

Most local automation reacts within a fraction of a second. A motion sensor, a local controller and a light on the same network can feel almost instant.

Delays usually come from:

  • Sensors that report at intervals rather than immediately.
  • Rules that travel through a cloud service and back.
  • Weak wireless signals that require messages to be repeated.
  • Overloaded networks or controllers.
  • Deliberate delays in the rule itself, such as "wait two minutes".

For lighting, a noticeable delay quickly becomes irritating. For heating, a delay of a minute rarely matters. Consider how quickly each function really needs to react when you design it.

8. What Happens When Something Fails?

A system is only as reliable as the chain of parts it depends on. Typical weak points are:

  • Power – a power cut stops the controller, the router and mains-powered devices.
  • Network – if Wi-Fi or the wireless mesh is unavailable, messages do not arrive.
  • Internet – cloud-based rules and remote access stop working when the connection is down.
  • Batteries – a sensor with a flat battery simply stops reporting.
  • Software – an update or configuration error can change how rules behave.

Good design therefore asks two questions for every function: what should happen if the information stops arriving, and can people still operate the equipment by hand? Part 6 of these guides covers troubleshooting and recovery in detail.

Final Thoughts

A home automation system works by repeating a simple cycle: sensors provide information, a controller applies rules, actuators carry out the actions and the devices report back their new state.

Where the decisions are made – in the device, in a hub, on a local server or in the cloud – affects how fast, reliable and private the system is.

When you understand the path that information takes, it becomes much easier to design automation that works every day, and to find the weak link when it does not.

MISOLIMA® – Technology Made Practical.

Practical knowledge for understanding, designing and building home automation.