Zero-UI
← Back to docs/Occupancy Plan – Zero-UI Home Automation (2025)

Occupancy Plan – Zero-UI Home Automation (2025)

Purpose

Room-local occupancy drives comfort while avoiding phone-only presence and noisy alerts. Fail safe to “do nothing” on uncertainty.

Desired Outcomes

  • Reliable room-level occupancy states for lighting and comfort
  • Conservative whole-home presence (never phone-only)
  • Silence by default; no motion/no-motion spam
  • Safe degradation when sensors are stale or services restart

Signals

  • Primary: hardwired motion, door contacts
  • Secondary (cautious): network/phone presence as hints only; never sole trigger
  • Derived: motion + door closed → occupied; long idle + door closed → likely vacant; door open → transition
  • Manual override: any switch/scene/dimmer change sets a cooldown where automations yield

Core Behaviors

  • Per-room state machine: occupied → recently_vacated → vacant with room-specific timers
  • Entry/motion → occupied immediately; door close + no motion for N minutes → recently_vacated → vacant
  • Night bias: longer idle before vacant; keep minimal pathways active if recent motion
  • Household presence: conservative aggregation of rooms + network hints; phone alone cannot set “away”

Lighting Interplay

  • Use occupancy to permit offs only with strong vacancy evidence (no motion + door closed + timer); otherwise assist-on only
  • Manual override respected; vacancy offs suppressed during override cooldowns

Comfort / Thermostat Guard

  • If outside temperature is ≤ 26°F and the current setpoint is below 69°F (non-sleep modes):
    • Require “occupancy met” (multiple motions/doors in short window or sustained motion) before acting
    • Raise heat setpoint to 69°F once per cold window; do not oscillate
    • Skip when sleeping mode is active
    • On sensor/API uncertainty, do nothing

Edge Cases / Fail-Safes

  • Sensor stale/offline → freeze state, avoid offs or comfort changes
  • HA/MQTT restart → default to occupied/recently_vacated until fresh motion arrives
  • Conflicting sensors (door open + no motion) → defer vacancy; prefer staying on/occupied

Special Rooms

  • High-dwell (living/kitchen): longer idle; offs require strong evidence
  • Transitional (hall/stairs): short occupied windows; quick decay to vacant; minimal downstream impact
  • Bathrooms/laundry: motion-only with longer idle; door-closed bias to stay occupied until clear idle

Notifications

  • Default: none
  • Optional operator-only: house empty but door left open (long window, rate-limited). No motion/no-motion alerts.

Rollout / Testing

  1. Observe: log occupancy transitions only
  2. Assist: occupancy gates ons; offs remain manual
  3. Full: allow conservative offs and comfort guard when evidence is strong
  4. Tune timers per room after observation data

Naming Examples (one job per automation)

  • occupancy.kitchen.state_machine
  • occupancy.hall.decay_to_vacant
  • occupancy.home.aggregate_presence
  • comfort.heating.cold_floor_guard