๐Ÿšจ ORef Alerts - OpenClaw Native

March 2, 2026 ยท View on GitHub

Real-time Israeli Home Front Command (ืคื™ืงื•ื“ ื”ืขื•ืจืฃ) alert system. No Home Assistant dependency. No extra WhatsApp binary. OpenClaw handles everything.


Architecture

Pikud Ha-Oref API
       โ†“
Docker: dmatik/oref-alerts (port 49000)   โ† HTTP proxy for oref API
       โ†“
oref_native.py โ€” systemd service (polls every 5s)
       โ†“
๐Ÿ“ฑ openclaw message  โ†’ WhatsApp group
๐Ÿ”Š SSH โ†’ HA API     โ†’ TTS speaker  (via Tailscale tunnel)

Quick Install

git clone https://github.com/shaike1/openclaw-skill-red-alert
cd openclaw-skill-red-alert
bash install.sh

The installer will:

  • Pull and start the dmatik/oref-alerts Docker proxy
  • Install Python dependencies (requests)
  • Install the systemd service (oref-native.service)
  • Enable it to start on boot

Systemd Service

The monitor runs as a persistent systemd service:

# Status
systemctl status oref-native

# Logs
journalctl -u oref-native -f
tail -f /var/log/oref_native.log

# Restart
systemctl restart oref-native

Service file: /etc/systemd/system/oref-native.service


Configuration

All config is passed via systemd Environment= directives in the service file. Edit /etc/systemd/system/oref-native.service, then systemctl daemon-reload && systemctl restart oref-native.

VariableDefaultDescription
OREF_API_URLhttp://localhost:49000/currentoref-alerts Docker proxy URL
OREF_POLL_INTERVAL5Polling interval in seconds
OREF_COOLDOWN60Min seconds between duplicate alerts
MONITORED_AREASื”ืจืฆืœื™ื”,ื”ืจืฆืœื™ื” - ื’ืœื™ืœ ื™ื ื•ืžืจื›ื–Comma-separated Hebrew area names
WHATSAPP_GROUP_JIDโ€”WhatsApp group JID (e.g. ...@g.us)
WHATSAPP_OWNERโ€”Your phone in E.164 (e.g. +972...)
OPENCLAW_BIN/usr/bin/openclawPath to openclaw binary
HASS_TOKENโ€”Home Assistant long-lived access token
HA_SSH_HOST100.64.0.15HA host Tailscale IP for SSH tunnel
HA_SSH_USERrootSSH user on HA host
HA_SSH_PASSโ€”SSH password for HA host
HA_LOCAL_URLhttp://172.30.32.1:8443HA internal URL (reachable from HA host)
HA_TTS_SPEAKERmedia_player.home_assistant_voice_...HA media player entity ID
CX3_ENABLEDfalseEnable 3CX outbound calls

Alert Routing

TypeWhatsApp๐Ÿ”Š Speaker
๐Ÿš€ Rockets (cat=1)โœ…โœ…
โœˆ๏ธ Aircraft (cat=2)โœ…โœ…
๐Ÿ”ด Infiltration (cat=10)โœ…โœ…
โœ… All clear (cat=13)โœ…โœ…
โš ๏ธ Pre-alert (cat=14)โŒโœ…

Home Assistant TTS โ€” SSH Tunnel

The VPS cannot reach HA directly over the internet. TTS is triggered by SSHing into the HA host (via Tailscale) and calling the HA local API from there:

VPS โ†’ SSH โ†’ HA host (100.64.0.15)
                  โ†“
         curl โ†’ http://172.30.32.1:8443/api/services/tts/speak

Uses the tts/speak service with tts.google_translate_iw_com engine (required for HA 2025+).


OpenClaw Bot Integration

The skill registers with OpenClaw and allows the WhatsApp bot to check alert status on demand.

When a user asks "ื‘ื“ื•ืง ื”ืชืจืขื•ืช" or "ืกื˜ื˜ื•ืก", the bot:

  1. Runs grep on /var/log/oref_native.log via the exec tool
  2. Returns a formatted Hebrew summary of recent alerts

Requirements for bot exec

OpenClaw gateway must have exec enabled:

// /root/.openclaw/openclaw.json  โ†’  tools section
{
  "tools": {
    "exec": {
      "host": "gateway",
      "security": "allowlist",
      "ask": "off"
    }
  }
}

Allowlisted binaries in /root/.openclaw/exec-approvals.json: /usr/bin/curl, /usr/bin/systemctl, /usr/bin/grep, /usr/bin/tail, /usr/bin/python3, /usr/bin/sshpass, /usr/bin/docker

Model requirement

The default agent model must support tool use. Use either:

  • copilot-proxy/claude-sonnet-4-5 โ€” requires the tool-use patch
  • zai/glm-4.7 โ€” works out of the box via OpenAI function calling

Docker (oref-alerts proxy)

# Check status
docker ps | grep oref
docker logs oref-alerts --tail 20

# Restart
docker restart oref-alerts

# Full redeploy
docker stop oref-alerts && docker rm oref-alerts
docker run -d -p 49000:9001 --name oref-alerts --restart unless-stopped \
  -e TZ="Asia/Jerusalem" dmatik/oref-alerts:latest

Requirements

  • OpenClaw gateway running
  • Docker (for dmatik/oref-alerts proxy)
  • Python 3.8+
  • sshpass (for HA TTS via SSH)
  • Home Assistant with Google Translate TTS (optional, for speaker)