# Building a Reliable Home-Automation Hub

A home-automation hub should keep working when the internet does not. My current setup runs Home Assistant on a small fanless PC with an SSD, connected to Zigbee and Z-Wave USB coordinators through short extension cables. Local protocols handle lights, contact sensors, thermostats, and switches, while cloud integrations are limited to devices that have no practical local API. This architecture reduces latency and prevents a provider outage from disabling basic routines.

## Network and Device Design

The hub lives on a dedicated IoT VLAN with access rules that block unsolicited connections to trusted devices. Wi-Fi appliances can reach DNS, NTP, and specific vendor endpoints, but cannot initiate traffic toward laptops or storage servers. Zigbee routers—mostly powered plugs—are distributed throughout the house to create a stable mesh, and battery-powered sensors report through the nearest router rather than directly to the coordinator.

## Automation Structure

Automations are organized around intent instead of individual devices. For example, a “house is unoccupied” state can turn off lighting, reduce heating, and enable leak notifications without duplicating presence logic in every rule. Each important automation also has explicit conditions and a manual override, which makes behavior easier to predict when someone works late, hosts guests, or temporarily disables a sensor.

```yaml
automation:
  - alias: Turn off hallway lights when vacant
    trigger:
      - platform: state
        entity_id: binary_sensor.hallway_occupancy
        to: "off"
        for: "00:03:00"
    action:
      - service: light.turn_off
        target:
          entity_id: light.hallway
```

## Reliability and Maintenance

The system writes nightly encrypted backups to network storage, with a second copy synchronized off-site. Updates are installed monthly after reviewing release notes, and coordinator firmware is upgraded separately to avoid changing too many variables at once. A small UPS keeps the hub, router, and primary access point online during brief power failures; after longer outages, startup dependencies ensure networking and storage are available before automations resume.

## Lessons from Daily Use

The most useful automations are quiet and reversible. Motion-activated lighting, temperature setbacks, and water-leak alerts save effort without requiring residents to remember special commands. Dashboards and voice control remain convenient interfaces, but physical switches still work normally, ensuring the house remains understandable even when the hub is restarting or a guest has never seen the system before.