Journal

How Home Assistant Saves Lives During Earthquakes: Real Automation in Action

Home Assistant ช่วยชีวิตได้จริงเมื่อแผ่นดินไหว: ระบบ Automation ที่บ้านตอบสนองอัตโนมัติ

May 16, 2026 · 1 min read
How Home Assistant Saves Lives During Earthquakes: Real Automation in Action

What Is Home Assistant and Why Does It Save Lives

Home Assistant (HA) is an open-source Smart Home platform that runs locally on a Raspberry Pi or mini PC inside your home. Because it does not depend on an external cloud, the system responds in milliseconds regardless of internet status. HA supports over 3,000 IoT device types including Zigbee, Z-Wave, MQTT, Wi-Fi, and ESPHome, making it the most powerful home control hub available today.

How Earthquake Sensors Work with HA

A vibration sensor such as the MPU6050 connects to an ESP32 via ESPHome and streams acceleration data to HA in real time through MQTT. When readings exceed a defined threshold, HA immediately triggers a chain of Automations without waiting for human input. Response time is typically 0.5 to 1 second, far faster than human perception and decision-making.

Recommended Automation Thresholds

HA allows you to configure layered response levels. HappySmart recommends the following approach:

At 2.5 Richter: HA sends LINE Notify or Telegram alerts to every phone in the household, including GPS location and current vibration readings.

At 3.5 Richter: HA commands the gas valve to close, activates emergency lighting in every room, sends SMS to family members, and begins recording all CCTV cameras.

No confirmation within 30 seconds: If no household member presses a safety acknowledgment, HA escalates to critical-level alerts sent to emergency contacts with the home GPS coordinates shared.

Case Study: Chiang Rai 4.2 Richter Earthquake 2024

A residence in Mueang Chiang Rai district installed HA with an MPU6050 and ESP32 sensor. When a 4.2 Richter earthquake struck, the system responded within 60 seconds: second 0 the sensor detected the P-wave, second 1 LINE alerts reached all phones, second 2 the gas valve closed, second 3 emergency lights activated, second 5 the front door unlocked. The residents evacuated safely before the S-wave arrived.

Hardware You Need

A basic system requires a Raspberry Pi 4 or mini PC running HA, a high-quality MPU6050 or MEMS sensor, an ESP32 or ESP8266 for MQTT data transmission, smart switches for the gas valve and emergency lights, a smart lock for automatic door release, and a UPS battery backup to keep the system running during power outages.

How HappySmart Helps

HappySmart supplies industrial-grade MEMS sensors with professional calibration, provides ready-made HA Automation templates tailored to your home layout, and offers after-sales support with OTA firmware updates. The entire service is delivered in Thai with a bilingual interface so every household member can understand and use the system confidently.

Questions & answers

Does Home Assistant require internet to function during an earthquake
Not for local control. HA operates entirely on your local network. LINE and Telegram notifications require internet, but gas valve shutoff and in-home device control work without internet as long as a UPS keeps power running.
What is the total cost of an HA plus earthquake sensor setup
A DIY setup costs approximately 3,000 to 8,000 THB including Raspberry Pi, ESP32, MPU6050, and smart switches. A full HappySmart professional installation ranges from 10,000 to 20,000 THB depending on device count and home size.
Can HA really unlock doors automatically during an earthquake
Yes, provided the home has a Smart Lock supporting Zigbee, Z-Wave, or Wi-Fi. HA can issue an unlock command via Automation the moment vibration exceeds the configured threshold.
What level of technical knowledge is needed to install HA independently
Basic computer literacy and comfort with YAML configuration files is sufficient. For those who prefer convenience and high reliability, HappySmart offers full installation with ongoing after-sales support.
Will the system work if power cuts out during the earthquake
Yes, if a UPS battery backup is installed. A minimum 650VA UPS providing at least 30 minutes of runtime is recommended, which is sufficient for evacuation and sending all critical alerts.

Related reading