Never Miss a Failed Automation Again: Dead-Man Switch Monitoring in Home Assistant

Never Miss a Failed Automation Again: Dead-Man Switch Monitoring in Home Assistant

Even the slickest Home Assistant setup has invisible moving parts. A light that fails to turn on is obvious, but a missed irrigation cycle—or a long “good-night” routine that silently dies halfway—can stay hidden for days. I finally got tired of discovering these ghosts long after the fact, so I built a simple “dead-man switch” that pings me whenever a scheduled automation doesn’t reach its finish line. Here’s how I do it.

Why the Built-In Tools Weren’t Enough

Yes, Home Assistant has continue_on_error for scripts and automations—but it only rarely skips errors, it doesn’t alert you, and it can’t detect an automation that never finished. For mission-critical jobs (irrigation, daily bedtime scenes, safety checks) I needed positive confirmation that the automation finished.

The Dead-Man Switch Concept

A monitoring service waits for a “ping” within a time window you define. If no ping arrives, the service notifies you. I tested two great options:

  • Uptime Kuma – free, open-source; install as a Home Assistant add-on.
  • Healthchecks.io – hosted, free tier; zero installation.

Both give you a unique URL. Hitting that URL signals, “All good!”—skip a ping and you’ll get an alert (email, Telegram, WhatsApp, Pushover, you name it).

Step 1: Create the Check

In Uptime Kuma or Healthchecks.io:

  1. Create a new “Heartbeat” (Kuma) or “Cron” (Healthchecks) check.
  2. Set the schedule—e.g., “must receive a ping every 24 h, grace time 30 min.”
  3. Copy the generated URL (something like https://hc-ping.com/abcdef12-3456-…).
  4. Choose your notification channel (email is always simplest and a good place to start).

Step 2: Add a rest_command

On Home Assistant, open configuration.yaml and drop in:

rest_command:
  validate_irrigation_automation:
    url: "https://hc-ping.com/abcdef12-3456-7890-abcdef123456"

Reload YAML (or restart HA) so the new service appears.

Step 3: Call It at the End of Your Automation

Here’s the tail of my irrigation automation:

- alias: "Irrigation – Front Lawn"
  trigger:
    - platform: time
      at: "06:00:00"
  sequence:
    - service: switch.turn_on
      target:
        entity_id: switch.front_lawn_valve
    - delay: "00:15:00"
    - service: switch.turn_off
      target:
        entity_id: switch.front_lawn_valve
    # ✅ Ping dead-man switch
    - service: rest_command.validate_irrigation_automation
  mode: single

If the sequence aborts anywhere above, the REST command never fires. When the monitoring window closes without a ping, Kuma/Healthchecks shouts at me.

Pro Tips

  • Tighten the grace period – A 5-minute grace is plenty for most home jobs; it keeps false positives low but still catches failures before you notice manually.
  • Version control – Store your check URLs in secrets.yaml so you can publish configs safely.
  • Group notifications – Have Kuma/Healthchecks hit a Home Assistant webhook to funnel alerts right back into HA’s notification system.

Wrapping Up

Since adding these dead-man switches, I’ve caught flaky devices and broken integrations the same day they happened—no more guessing whether the garden was watered while I was on vacation. It’s a five-minute setup that pays for itself the first time something silently fails.


Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply