Docs › Home Assistant automations with RunVouch
Home Assistant automations with RunVouch
An automation with a time trigger that runs a shell_command or a conversation agent keeps working until an update breaks the integration or the automation is left disabled. The logbook records it; nobody reads the logbook.
How it runs on Home Assistant automations
A rest_command at the start and end of the automation, or wrap the shell command with rv run if the script runs on the same host.
Store the key
Put the key in secrets.yaml and reference it with !secret runvouch_key.
Report the run (two HTTP calls)
# configuration.yaml
rest_command:
runvouch_start:
url: https://api.runvouch.com/v1/runs/start
method: POST
headers: {X-API-Key: !secret runvouch_key, content-type: application/json}
payload: '{"agent":"nightly-backup","source":"home-assistant"}'
runvouch_end:
url: https://api.runvouch.com/v1/runs/end
method: POST
headers: {X-API-Key: !secret runvouch_key, content-type: application/json}
payload: '{"run_id":"{{ run_id }}","status":"ok","evidence":{"backup": true}}'
# automation: call runvouch_start, store response_variable, do the work, call runvouch_end with run_idThe start call returns run_id; the end call takes status (ok or fail), optional cost and tokens, and evidence as a JSON object of booleans. Full reference on the API page.
Register the cadence and caps
rv agent nightly-report --cadence 24h --grace 30m --max-runtime 1h --evidence --cap-run-cost 2
Register the agent once, from anywhere with the key. Cadence is what turns a schedule that stopped into an alert; --evidence makes a run without evidence a failure; the caps pause the agent when it overspends.
What goes silent on Home Assistant automations
- Disabled automations and broken integrations after a core update do not notify; MISSED does.
- A shell command that exits non-zero is a warning in the log, not an alert.
What RunVouch detects
| Alert | What it means here |
|---|---|
| MISSED | cadence plus grace passed and no run started |
| FAILED | non-zero exit or a reported failure, with the stderr excerpt |
| NO_EVIDENCE | the run said ok but the file, URL or assertion you required is missing |
| STALLED | a run started and never ended within max runtime |
| RETRY_STORM | the same tool called with identical input many times in one run |
| BUDGET_RUN / BUDGET_DAY | cost cap crossed; the agent is paused until you resume it |
| DRIFT | duration or output size far off its 7-run baseline |
Need a key? Get a free key · Stuck? contact