Red Alert Monitoring Stack

Self-hosted microservices stack for monitoring Israel's Homefront Command alerts with real-time maps, push notifications, AI situation reports, and smart home automation.

Pikud HaOref Docker Compose MQTT + Snapcast MCP Server Home Assistant Compatible

Quick Start

# Clone and configure
git clone https://github.com/danielrosehill/Red-Alert-Monitoring-Stack-Public.git
cd Red-Alert-Monitoring-Stack-Public
cp .env.example .env
# Edit .env with your values (ALERT_AREA, MQTT_BROKER, API keys, etc.)

# Launch the stack
docker compose up -d

# Or with bundled MQTT broker:
docker compose -f docker-compose.with-broker.yml up -d

# Or for Home Assistant users (no actuator):
docker compose -f docker-compose.ha.yml up -d

Requirement: The Oref Alert Proxy must run from an Israeli IP address (geo-restricted API).

Claude Code Users

This repo includes slash commands for guided setup. Run /setup in Claude Code for a step-by-step walkthrough that configures MQTT, lights, Snapcast, and Cloudflare Tunnel.

Components

Oref Alert Proxy :8764

Polls Pikud HaOref every 3 seconds. Single source of truth for the entire stack. Dumb relay — passes raw alert data with no interpretation.

Geodash Dashboard :8083

Real-time multi-map dashboard with 1,450 polygon overlays, InfluxDB time-series storage, historical playback, and TV-optimized view.

Pushover Notifier

Push notifications when alert count crosses thresholds (50, 100, 200, 500, 1000 simultaneous areas).

Telegram Bot

On-demand intelligence bot. /sitrep generates AI situation reports using dual-model synthesis via OpenRouter.

Actuator

Physical alert outputs: TTS voice announcements via Snapcast whole-house audio, and smart light color control via MQTT. Fully customizable.

RSS Cache :8785

Polls news feeds on a schedule, serves cached articles. Used by Geodash and available for AI sitreps.

MCP Server :8786

Streamable HTTP MCP server exposing alert tools for AI agents (Claude Code, Claude Desktop, etc.).

Management UI :8888

Stack health dashboard showing status of all services with auto-refresh every 30 seconds.

Docker Compose Variants

docker-compose.yml

Use when you have an existing Mosquitto MQTT broker on your network. Set MQTT_BROKER in .env to your broker's IP.

docker compose up -d

docker-compose.with-broker.yml

Self-contained deployment with a bundled Mosquitto broker. Set MQTT_BROKER=mosquitto in .env.

docker compose -f docker-compose.with-broker.yml up -d

docker-compose.ha.yml

For Home Assistant users. Removes the actuator service — HA handles smart light and TTS automations directly by polling the proxy at http://<stack-ip>:8764/api/alerts.

docker compose -f docker-compose.ha.yml up -d

Customization

Docker Compose Override (Recommended)

The recommended way to customize the stack without modifying tracked files:

cp docker-compose.override.example.yml docker-compose.override.yml
# Edit docker-compose.override.yml with your customizations
docker compose up -d  # automatically merges override

Use overrides for: adding services (Cloudflare Tunnel, Grafana), overriding env vars, pinning image versions, setting resource limits, or adding volumes. The override file is gitignored so your changes survive git pull.

Actuator Customization

The actuator source is included at actuator/ — edit actuator.py directly to change:

Environment Variables

VariableRequiredDescription
ALERT_AREAYesYour area in Hebrew (e.g., ירושלים - דרום). Passed to all services.
MQTT_BROKERYesBroker IP or mosquitto for bundled
PUSHOVER_API_TOKENFor pushPushover application token
PUSHOVER_USER_KEYFor pushPushover user key
TELEGRAM_BOT_TOKENFor botBot token from @BotFather
OPENROUTER_API_KEYNoFor AI situation reports in Telegram
MQTT_LIGHT_TOPICSNoComma-separated MQTT topics for lights
SNAPCAST_FIFONoPath to Snapcast FIFO pipe (default: /tmp/snapfifo)
TTS_ENABLEDNoEnable/disable TTS (default: true)
OPENAI_API_KEYNoFor one-time TTS audio generation

Alert Flow

Nationwide Attack (150+ areas)

Pikud HaOref API │ polled every 3s ▼ Oref Alert Proxy (:8764) │ ├─▶ Geodash → 150 polygons turn red, stored in InfluxDB ├─▶ Pushover → "150 areas under active alert" → phone ├─▶ Actuator → Lights red + "Nationwide alert..." on Snapcast ├─▶ Telegram Bot → Awaits /sitrep → AI briefing └─▶ Management UI → All services green (or flags failures)

Direct Threat (your area)

Your area matches ALERT_AREA │ ├─▶ Actuator → Lights RED + "Seek shelter immediately" ├─▶ Geodash → Your area flashing red with siren audio │ │ ... when all-clear arrives ... │ ├─▶ Actuator → Lights GREEN + "All clear" → OFF after 2 min └─▶ Geodash → Area returns to normal

MCP Server (AI Agents)

The stack includes an MCP server for AI agent integration:

# Claude Code
claude mcp add --transport http red-alert http://localhost:8786/mcp

# Claude Desktop — add to claude_desktop_config.json:
{
  "mcpServers": {
    "red-alert": {
      "url": "http://localhost:8786/mcp"
    }
  }
}
ToolDescription
get_current_alertsAll currently active alerts nationwide
get_area_alertsAlerts within a radius of a lat/lon point
get_alert_historyRecent alert history including resolved
get_newsCached news articles from RSS feeds
get_sample_payloadsStored sample alert payloads for dev
get_proxy_statusHealth check of the Oref Alert Proxy

Remote Access

We recommend Cloudflare Tunnel for secure remote access to the stack. It provides HTTPS, authentication, and DDoS protection without opening router ports — and the free tier covers personal use.

Suggested subdomain pattern:

SubdomainService
redalert.yourdomain.comManagement UI (:8888)
redalertdash.yourdomain.comGeodash Dashboard (:8083)
redalertmcp.yourdomain.comMCP Server (:8786)

Claude Code users: run /setup-tunnel for a guided Cloudflare Tunnel setup.