Journal

Complete Smart Home Safety Net: Layered Automation for Uninterrupted Protection

บ้านอัจฉริยะครบวงจร: ระบบ Safety Net หลายชั้นเพื่อความปลอดภัยที่ไม่มีสะดุด

May 13, 2026 · 2 min read
Complete Smart Home Safety Net: Layered Automation for Uninterrupted Protection

Why Safety Net Matters More Than Features

Most smart homes are designed for convenience, but true safety demands more. A resilient system must operate through three critical failure modes: power outage, internet loss, and sudden emergencies.

The core design principle is Defense in Depth — every layer must operate independently without relying on any other layer.

Layer 1: UPS Backup for Critical Systems

Devices that must always be on UPS:

  • Home Assistant Server (Raspberry Pi / NUC): 650VA UPS (~800-1,200 THB) provides 2-4 hours of runtime
  • Router + Modem: power loss shouldn’t kill emergency notifications
  • Security Panel + Cameras: continuous recording during incidents
  • Zigbee/Z-Wave Coordinator: Hub continues managing local devices even without cloud

Configure NUT (Network UPS Tools) so HA monitors battery level and automates: when battery drops to 20%, shut non-essential devices, save state, and execute graceful shutdown.

Layer 2: Cellular Failover When Fiber Drops

Use a 4G/5G backup router (e.g. GL.iNet Mudi or TP-Link M7350) as WAN2 with automatic failover:

  • Ping-based Detection: test 8.8.8.8 every 10 seconds; after 3 consecutive failures, auto-switch WAN
  • Cost: AIS/DTAC prepaid data SIM 99-199 THB/month for emergency-only usage
  • Home Assistant still sends LINE notifications and accepts commands over cellular

Layer 3: Local Automation — No Cloud Dependency

Key rule: all safety-related automations must run locally in HA, never routed through cloud services.

Automations that must be local:

  • Smoke/CO Detection → Alarm + LINE Notify: Zigbee sensor triggers directly to HA
  • Gas Sensor → Close Smart Valve: Tuya Zigbee Gas Valve supports 1/2’’ to 1’’ pipe
  • Water Leak → Close Main Valve: Aqara Water Sensor + Motorized Ball Valve
  • Door/Window + Late Night → Alarm Mode: pure local automation, no internet needed

Layer 4: Fail-Safe Hardware Override

All digital systems can fail, so manual overrides are mandatory:

  • Hardwired Emergency Stop buttons in bathroom and kitchen
  • Manual Gas Shutoff clearly visible and accessible without power
  • Breakglass Box for backup keys and PIN codes
  • Laminated Emergency Sheet on refrigerator: emergency contacts, manual override steps

Layer 5: Monthly System Testing

An untested safety net is a broken safety net. Set monthly Calendar reminders to test:

  1. Unplug fiber — verify cellular failover activates
  2. Pull UPS power — verify server stays up
  3. Press Test button on every smoke detector
  4. Drip 2-3 drops on water leak sensor — verify valve closes
  5. Test gas sensor with lighter gas at distance (do not ignite)

Investment Summary: One-Time Cost, Lifetime Protection

Full safety net budget: approximately 8,000-15,000 THB:

  • 650VA UPS: 1,200 THB
  • 4G Backup Router: 2,500 THB
  • Smart Gas Valve: 1,800 THB
  • Motorized Water Valve: 1,500 THB
  • Water Leak Sensors x3: 1,800 THB
  • Smoke/CO Detectors x3: 3,000 THB

Compared to the value of your home, possessions, and life — this is the highest-ROI investment in any smart home.

Questions & answers

Does the smart home still work during a power outage?
Yes, if you connect a UPS to the Home Assistant server, router, and Zigbee coordinator. Local devices continue operating for 2-4 hours without mains power.
Can I install a smart gas valve myself?
A licensed plumber or gas technician should handle the physical installation for safety. The Zigbee/HA integration (via Tuya Integration or Zigbee2MQTT) can be done yourself afterward.
Does cellular backup need a separate SIM card?
Yes, use a dedicated prepaid data SIM (AIS/DTAC 99-199 THB/month) so it is always active and ready without affecting your main data quota.
How often should I test the safety systems?
Monthly testing is recommended, especially UPS failover, cellular failover, and every sensor. Systems that are never tested tend to fail when a real emergency occurs.

Related reading