MIT Early warnings → Home Assistant

Earthquake warnings, straight into your smart home.

One Python file that follows official early warnings, a worldwide quake feed and your own seismometer, then tells Home Assistant how hard it will shake at your place and how many seconds you have. No pip install, about 30 MB of RAM.

Run the bridge

Runs from a temp folder. This page finds it on 127.0.0.1:8990 by itself.

Dependencies
0
Memory
~30 MB
CPU idle
~0%
Python
3.8+
Seismograph · bridge traffic Simulated
CH1P-wave
CH2S-wave
Amplitude0.00
Last packet—
Every heartbeat and feed event the bridge hears moves the needle (a visualization, not seismic data). 0 events

01 / Live bridge

Everything the bridge hears, in plain sight.

Without a bridge running, this page plays simulated traffic so you can poke around. Start the command above and it switches to your bridge's real traffic within a couple of seconds.

Packet console
source: simulated0 lines
Telemetry 127.0.0.1:8990
Bridge
MCS latency
--ms
heartbeat round-trip
Heartbeats
0
0 data messages
Feeds live
0/4
EEW · EMSC · Shake · MCS
Drill controls
Simulated here. With a bridge linked, Ping and Drill go through it — Drill also fires your webhook.
Coverage Base Station · 0.0000, 0.0000

Stays in your browser. It only fills in the command above, rounded to about a kilometre.

Home Assistant YAML snippets

Let the bridge push to a webhook the moment an alert lands, or read it as a REST sensor.

POST/api/webhook/quake_alert_local
# automations.yaml  ·  run the bridge with --webhook-url
- alias: "Earthquake early alert"
  triggers:
    - trigger: webhook
      webhook_id: "quake_alert_local"
      local_only: true
  actions:
    - action: notify.notify
      data:
        title: "Shaking in {{ trigger.json.s_wave_eta_s | int }} s"
        message: "Drop, cover, and hold on."

02 / How it works

Push, not polling.

Most smart-home quake integrations ask a public API for news every 30 to 60 seconds. With seismic waves, that's often the whole warning window. This one keeps sockets open to the networks that issue warnings and gets told.

Polling an APIevery 30 s
+22 s
Push feedsocket stays open
on push
0 s30 s60 s

Illustration with one quake at 8 s. A poller only finds out on its next request; a push lands as soon as the network publishes it. For scale: P-waves travel at roughly 6 km/s, the damaging S-waves at about 3.5 km/s. The gap between them is the whole warning window.

Try it

What would you feel?

The same model the bridge runs for every quake. Move the sliders.

VI
Estimated intensity at home
strong
level: alert · "Take Action"
Strong shaking (S) arrives
17 s
Warning from an EEW feed
12 s
Warning from your own sensor
7 s

Median estimate, Allen, Wald & Worden (2012); local soil can shift it about ±1 level. EEW assumes the warning is issued 5 s after origin.

01

Someone feels it first

A national seismic network issues an early warning, a global centre publishes a report, or the sensor in your own house sees the P-wave.

EEW · EMSC · Raspberry Shake · MCS
02

The bridge does the math

Distance to your station, expected intensity there (Allen et al., 2012) and a countdown to the S-wave. Duplicates across feeds collapse into one story.

MMI estimate · S-wave ETA · dedupe
03

Your house reacts

"Shaking in 12 seconds." Flash the lights, sound a siren, shut a valve, open the garage: your automations decide what to do with the seconds.

webhook · REST :8990 · HMAC-SHA256

Sources

Multilayer feeds, one policy.

Each feed is honest about what it can do. The bridge notifies once per quake and only again if it gets worse.

live

Official EEW (Wolfx)

JMA and CENC early warnings relayed by Wolfx, revised as the quake grows.

Speed
seconds
Where
Japan, mainland China
live

EMSC reports

Every new or revised quake worldwide over a public WebSocket, CC BY 4.0.

Speed
~6–8 min
Where
Worldwide
live

USGS & SGC feeds

USGS worldwide and Colombia's SGC catalogue, polled with HTTP 304 caching so an idle feed costs almost nothing.

Speed
minutes
Where
Worldwide · Colombia
ready

Your own sensor

A Raspberry Shake streams over UDP; an STA/LTA trigger catches the P-wave on site. Tested with synthetic signals.

Speed
seconds
Where
Anywhere
trial

Android sentinel

Optional: a real or containerized Android forwards Google's alert to the bridge. Tried in Oct 2026: no real alert captured; paused.

Speed
seconds
Where
Where Google alerts
live

Google MCS socket

Direct Google AEAS push client with S2 Level 8 cell subscriptions (Field 29). A 22-node fleet listens to 88 cells; so far it has received Google crisis alerts (hurricanes, floods), which are logged but never treated as earthquakes. No live earthquake captured yet.

Speed
seconds
Where
Worldwide (AEAS cells)

03 / Where it stands

Honest status: early warnings where they exist.

Official early warnings reach the bridge in seconds where agencies publish them (Japan, mainland China). A Raspberry Shake gives you on-site P-wave triggers anywhere. EMSC, USGS and SGC report every quake minutes later. Google's Android Earthquake Alerts are monitored via direct MCS socket with S2 Level 8 cell subscriptions (Field 29) and a 22-node fleet; its first catch was Google crisis alerts (hurricanes, US flood warnings), which share the channel and are filtered out of the earthquake path. Intensities follow Allen, Wald & Worden (2012).

  • Official EEW feed (JMA, CENC)live
  • EMSC, USGS and SGC feedslive
  • Intensity + S-wave countdown53 tests passing
  • Raspberry Shake triggersynthetic signals
  • Android sentinel (Redroid)no real alert yet
  • Google MCS socket (Field 29)live listening (22 nodes)
Copied