# Building a Reliable Home-Automation Hub

A home-automation hub should keep working when the internet does not. My setup runs Home Assistant on a fanless mini PC with a Zigbee coordinator attached over USB. Lights, motion sensors, and smart plugs communicate locally, while the hub exposes a single dashboard and automation engine. This avoids the latency and service outages common with cloud-only devices.

## Network and Device Design

The hub has a reserved IP address and sits on a dedicated IoT VLAN. Devices can reach the hub and local DNS, but they cannot initiate connections to laptops or storage servers. Wi-Fi products are useful for high-bandwidth devices such as cameras, while Zigbee is a better fit for battery-powered sensors because it uses less energy and forms a mesh through mains-powered routers.

## A Practical Automation

Automations are most reliable when triggers and conditions are explicit. The following Home Assistant configuration turns on a hallway light after motion is detected, but only when the sun is below the horizon:

```yaml
automation:
  - alias: Hallway motion light
    triggers:
      - trigger: state
        entity_id: binary_sensor.hallway_motion
        to: "on"
    conditions:
      - condition: sun
        after: sunset
        before: sunrise
    actions:
      - action: light.turn_on
        target:
          entity_id: light.hallway
```

## Reliability and Maintenance

I keep critical automations local and treat vendor integrations as optional enhancements. The hub is connected to a small UPS, configuration changes are stored in Git, and encrypted backups are copied to another machine each night. After adding or upgrading an integration, I test recovery by restarting the hub and confirming that devices return to their expected states.

## Lessons from Daily Use

The best home automation is predictable rather than clever. Physical switches still work, notifications are limited to actionable events, and every important automation has a manual fallback. With those constraints, the hub behaves less like an experimental gadget and more like dependable household infrastructure.