Home automation field notes All concepts

sensors

Measure the thing that actually matters

Relative humidity, real power and a single voltage reading all mislead, each in its own charming way. The useful numbers are the ones you have to compute yourself.

A lot of useful information is one small derivation away from sensors you already own. Three examples where the obvious reading is actively misleading.

Sensors report what they can measure, which is rarely what you want to know. Relative humidity tells you about the air's opinion of the temperature. Real power tells you about the electricity company's opinion of the motor. The number you actually need usually has to be computed, quietly, from two things that were each lying in a different direction.

1. Ventilation: relative humidity cannot answer the question

You want to know whether opening a window will make the room better or worse. The obvious comparison is indoor RH against outdoor RH. It is wrong, because relative humidity is relative to temperature. Air at 24 °C and 60% RH holds more water than air at 28 °C and 55% RH, even though the second number looks higher.

The quantity that does not lie is dew point, which is an absolute measure of moisture. If outdoor dew point is below indoor dew point, ventilating dries the place, whatever the RH readings suggest.

a = 17.62 ; b = 243.12
γ  = a·T/(b+T) + ln(RH/100)
Td = b·γ/(a−γ)
Measured on an ordinary summer evening: outdoor RH looked comfortably lower than indoor. Dew points said the opposite, outdoor was almost a degree wetter. Opening up would have added moisture while appearing to remove it. (A thin margin, near the sensors' combined noise; the point is the sign flip, not the decimals.)

Go one step further: project the result

Dew point tells you the direction. What you actually care about is the outcome: if I open up, where does indoor humidity end up? That is the outdoor dew point evaluated at indoor temperature, one more line, and now the rule can be expressed the way a person thinks: "opening is fine as long as we stay under 60%."

RH_after = 100 · exp( a·Td_out/(b+Td_out) − a·T_in/(b+T_in) )

One guard before wiring it up: when the room is colder than the outdoor dew point, the formula projects past 100 %, which is no longer humidity, it is condensation on your walls. Clamp the sensor at 100 (the deployed one is) and treat that condition as its own veto.

That also unlocks the inverse case: if the room is already too damp and the projection is lower than the current value, ventilating is now a positive recommendation rather than merely permitted.

Build the verdict from several vetoes (particulates, moisture, temperature) with one override. Stale air beats a little humidity, so a high CO₂ reading should outrank the others. And take CO₂ from whichever room is worst, not from whichever room you happened to put the sensor in.

2. Appliance wear: real power hides it, the ratio sometimes shows it

The textbook case: a drying-out run capacitor on a plain induction motor pulls more reactive power for the same real work, so the power factor sags months before anything sounds wrong. Two honest footnotes before you build it. A worn bearing points the other way, friction is real work, so it nudges real power and the power factor up, and belongs in the energy-per-cycle trend instead.

And a modern inverter-driven machine shows the wall its rectifier, not its motor, which demotes the textbook story to an open question and the measurement to what it really is: an electrical fingerprint per programme, tracked for drift. Drift still means something changed; it declines to say what.

If your energy-monitoring plugs expose apparent power alongside real power, you get this for free: PF = W / VA. Track it per appliance, compare like with like across cycles, and treat a persistent multi-week drift as a reason to look, cheap meters resolve a point or two of power factor at best, so anything shorter is noise. And make it unavailable at idle, see fail-visible sensors.

3. Wiring faults: the loaded outlet is the wrong place to measure

Here is the most surprising one. Several smart plugs scattered around a home each measure mains voltage. Individually that is a curiosity. Together it is a diagnostic instrument.

When a large load switches on, voltage drops by the resistance of the circuit feeding it. A healthy run loses a couple of volts. A loose terminal, a tired socket or an undersized conductor loses much more, and that resistance is what gets hot. This is the failure mode behind domestic electrical fires, and nothing else in a smart home looks for it.

Two corrections make it actually work

Self-calibrate. These meters disagree with each other by several volts with nothing plugged in. That is tolerance, not wiring. Learn each plug's idle offset against the house median continuously, and measure sag against the plug's own baseline. Without this, roughly half your alarms are meter error.

Do not trust the loaded plug's own reading. This was measured, not assumed: with a 2 kW heater running, the plug powering it reported the same voltage as at idle across every sample, the meters are coarse and filtered. The drop showed up clearly on a different plug on the same circuit.

So decompose the measurement instead. Every plug's drop from its own baseline, then:

common_drop = median of all drops        → the supply. Normal.
excess_i    = drop_i − common_drop       → that branch. The signal.

Common-mode is the incoming supply sagging under load, which is expected. Differential is one circuit behaving worse than its neighbours, which is not. This is robust to which meter happens to be slow.

It is a little like asking three people the time and getting the correct answer only by noticing which of them is wearing a watch.

An unexpected bonus: the pattern of which plugs move tells you which outlets share a circuit. Switch on a big load, watch what sags, and you have mapped your consumer unit without opening it. In one test exactly one other outlet moved, that pair is on the same branch; everything else was elsewhere.

Two duties before anyone copies this. The method is a heuristic for finding circuits that deserve a professional's eyes, not a substitute for RCDs, arc-fault protection or an electrician; a persistent differential sag on one circuit means stop using that circuit and call one, not "watch the trend". And check the plug's rated current before any big-load test, the units here are rated well above the nine amps the heater draws; not every plug is. The load itself is ordinary, kettles do this to your wiring daily, unobserved.

One detail that suggests the measurement is a real load and not noise: the drop decreases over the first minutes, as the thermostat starts cycling and the average current falls. (An earlier version credited the element's resistance rising with temperature; a reviewer ran the numbers and the coefficient is a hundred times too small for the change observed. The lesson about physics agreeing with your sensor survives, provided you check whose physics it is.)

The pattern

In all three cases the raw reading sat there for years, dutifully logged, informing nobody. What changed was asking which quantity actually answers the question, and then being willing to look up a formula, which is apparently the difficult part.