Home automation field notes All concepts

climate

Closing the loop on a one-way remote

An infrared air conditioner cannot answer. A tilt sensor on its louver can. The cheapest possible acknowledgement from a device that has never given one.

The air conditioner is controlled over infrared, which is a one-way street: the system knows what it sent, never what happened. For a long time the state of the unit lived in a single flag, "assumed on", set when we sent power and cleared when we sent power again. The expensive lesson of that design was that the power command is a toggle, so a wrong assumption does not mean "nothing happens"; it means the unit switches on in an empty room and runs until somebody comes home.

The air conditioner is controlled by infrared, which is a way of shouting into a room and assuming you were heard. For a long time the house assumed. This page is about the day it stopped assuming and stuck a sensor on the one part of the machine that moves.

Diagram: Home Assistant sends one-way infrared to the air
conditioner; the louver moves mechanically; a Zigbee tilt sensor on the louver reports its
angle back on every movement, closing the loop
The remote talks, the louver answers. A tilt sensor on the moving part is the cheapest possible acknowledgement from a device that has none.

A sensor on the moving part

The unit has one part that visibly changes when it runs: the louver. A small Zigbee tilt sensor stuck to it reports its angle whenever it moves, and after a day of watching we had the envelope: about +36 degrees when closed, anything below +20 once the louver is lowered or swinging, and −79 at the lower stop.

Two properties of the sensor shape everything built on it. It reports only on movement, to save its battery, so its value is "the last known position", never "the current one"; and closing always produces a report, because a louver cannot close without moving.

One angle is ambiguous. A louver lifted flat against the housing while cooling reads the same +36 as a closed one. That ambiguity is real and we did not paper over it: in that one case the old assumption flag still decides, and the sensor is the judge everywhere else. The judge is a binary sensor with an attribute that says which of the two it is, measured or assumed, so every consumer can decide how much to trust it.

Verified shutdown

Leaving the house used to send the power toggle if the flag said "on" and the temperature did not contradict it. Now it sends the toggle if the louver says the unit is running, and then waits. Closing always reports, so within ninety seconds the sensor must show the louver shut.

If it does not, the toggle was lost somewhere between the emitter and the unit, which happens, so the automation sends it once more and waits again. If the louver is still down after that, the automation notifies a human and, crucially, sets the flag back to "on": a system that has just failed to switch something off must not record that it succeeded.

The same measurement guards the other direction. Pre-cooling on the way home used to start the unit if the flag said "off"; it now refuses if the louver says otherwise, because on a toggle-coded remote "start" sent to a running unit is "stop". The power-on sequence itself skips the toggle when the louver reports running and only re-sends the mode frame, which is harmless.

The assumption that corrects itself

The flag has not been removed. It is the fallback when the sensor is silent, and it is still what other automations read; it just cannot drift any more. Two level-triggered rules watch the pair: a louver open for two minutes while the flag says "off" flips the flag to "on", and a louver closed for three minutes while the flag says "on" flips it to "off" (only when the lift-to-housing feature is disabled, because of the ambiguity above).

Both send a short message saying what they corrected, because a self-correcting system that corrects silently is a system nobody can debug. The most common trigger for the first rule is the oldest problem of all: someone used the original remote, which the system never sees.

What the loop made possible

With a trustworthy "running" signal, two small things became safe. The fan runs high while nobody is home, to push cold air down the corridor into the far rooms, and drops to low on the first sign of arrival, the front door, motion, or presence; the "nobody is home" side is deliberately strict (the presence estimate, no motion, and not asleep) because "no motion" alone at 3 a.m. describes a sleeping household, not an empty one.

And the louver, it turned out, does something on its own that no automation ever asked for: six seconds after power-on it homes to the lower stop and lifts to a nearly horizontal position by itself. We only know that because the sensor told us.

The louver, it turned out, had been trying to tell us things for months. Nobody had thought to ask.

If a device cannot answer, put a sensor on the part that moves. Not on the power line (a standby draw looks like running), not on the room temperature (slow, and lied to by open windows), but on the mechanism itself. Then treat the old assumption as what it always was: a guess, useful as a fallback, dangerous as a source of truth.