# 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 small fanless mini PC with an SSD, connected to the network over Ethernet. Zigbee devices communicate through a USB coordinator on a short extension cable, which reduces interference from the computer’s USB 3 ports.

## Architecture

The hub handles automations locally, while separate integrations connect Wi-Fi devices, energy meters, and the household MQTT broker. Devices publish state changes to MQTT, and Home Assistant converts those events into actions. This event-driven design reacts faster and generates less network traffic than polling every sensor on a schedule.

```yaml
automation:
  - alias: Hallway lights after sunset
    trigger:
      - platform: state
        entity_id: binary_sensor.hallway_motion
        to: "on"
    condition:
      - condition: sun
        after: sunset
    action:
      - service: light.turn_on
        target:
          entity_id: light.hallway
```

## Reliability and Security

Every critical automation has a local fallback. Wall switches still control their lights directly, radiator valves retain safe schedules, and leak sensors sound their own alarms even if the hub is offline. The hub, router, and Zigbee coordinator are powered through a small UPS, which provides enough runtime for short outages and allows a clean shutdown during longer ones.

IoT devices live on a dedicated VLAN with no direct access to laptops or storage servers. Firewall rules permit only DNS, time synchronization, MQTT, and explicitly required cloud endpoints. Remote access goes through a VPN instead of exposing the dashboard to the public internet.

## Maintenance

Nightly backups are encrypted and copied to another machine, with a monthly restore test to confirm they are usable. Updates are installed in stages: first the operating system, then the automation platform, and finally device firmware. This cautious routine is less exciting than adding new sensors, but it is what makes the hub feel like dependable household infrastructure rather than a permanent experiment.