Journal

Earthquake Detection System with Mobile Alerts for Immediate Safety When Tremors Occur

ระบบตรวจจับแผ่นดินไหวพร้อมแจ้งเตือนมือถือ ปลอดภัยทันทีเมื่อเกิดแรงสั่น

May 16, 2026 · 2 min read
Earthquake Detection System with Mobile Alerts for Immediate Safety When Tremors Occur

Why You Need a Mobile Earthquake Alert System

Thailand experiences an average of over 250 earthquakes per year, with at least 5 exceeding 4.0 on the Richter scale. At this intensity, objects can fall, ceilings can crack, and gas systems may be damaged without anyone noticing. High-risk provinces include Kanchanaburi, Tak, Chiang Mai, Chiang Rai, and Mae Hong Son.

The problem is that when an earthquake strikes, you may be away from home, or asleep upstairs and unable to hear other warning signals. A mobile alert system is the most critical safety tool for families living in at-risk areas.

How the HappySmart System Works

The system consists of an MPU6050 sensor connected to an ESP32 running ESPHome firmware. When the sensor detects vibration exceeding a preset threshold, the signal is immediately transmitted via MQTT to Home Assistant.

Home Assistant then performs two actions simultaneously: sending a Push Notification to the Home Assistant Companion app on every household mobile device, and triggering automatic device control based on preset automations, such as shutting the gas valve, activating emergency lighting, and unlocking exit doors.

Real-Time Alerts on iOS and Android

The Home Assistant Companion app supports both iOS and Android with no additional subscription fees. Notifications are delivered within 1 to 3 seconds of the sensor detecting vibration, including the timestamp and estimated intensity level.

You can also configure alerts for family members at different locations, such as sending LINE Notify or Telegram Bot messages simultaneously with the in-app push notifications, all triggered by a single automation rule.

Adjustable Sensitivity for Your Environment

A common problem with DIY systems is false alarms triggered by heavy trucks or nearby construction. HappySmart addresses this by configuring Low-Pass Filters and separate thresholds for the X, Y, and Z axes of the sensor.

For a typical urban home, recommended starting values are 0.3g for initial alerts and 0.6g for automated device commands. However, these can be fine-tuned based on the actual environment of each installation.

Case Study: 4.5 Magnitude Earthquake in Tak Province

During a 4.5 magnitude earthquake in Tak Province, a HappySmart customer's system detected the tremors and sent alerts to all four family members within 2 seconds, including one working in Bangkok. Exit doors unlocked automatically and emergency lights activated, allowing an elderly grandmother who was home alone to evacuate the building safely.

Installation Steps

The HappySmart EWS installs in five main steps: wire the MPU6050 to the ESP32 according to the wiring diagram, install ESPHome firmware via web browser without writing any code, connect to Home Assistant through Auto-Discovery, configure automations for alerts and device control, and test the system by gently shaking the sensor. HappySmart offers a full installation service for those who prefer professional setup, with warranty and after-sales support included.

Questions & answers

How quickly does the earthquake alert system send notifications to my phone?
The HappySmart system delivers alerts within 1-3 seconds of the sensor detecting vibration, supporting both iOS and Android through the Home Assistant Companion app.
Will the system trigger false alarms from trucks or construction?
The system uses Low-Pass Filters and separate X, Y, Z axis thresholds to distinguish earthquake vibrations from everyday noise, significantly reducing false alarms.
What home devices can the system control when an earthquake is detected?
The system can control a wide range of devices including gas valve shutoff, emergency lights, door locks, and messaging services like LINE Notify or Telegram.
Can family members at different locations receive alerts?
Yes, notifications can be configured to reach all family members simultaneously regardless of their location.
Can I install the system myself or do I need a technician?
Both options are available. Those with technical knowledge can install in 5 steps, or choose HappySmart's full installation service with warranty and ongoing support.

Related reading