canbus: Discord alert when the water-heater DSI fault trips

New Pi package (repo copy canbus/ha/dsi_fault_alert.yaml): when the CAN
node's DSI-lockout binary sensor holds 'on' for 10s, fire the server-
alerts Discord webhook (@here, appropriately rude), with a cleared
message when it recovers. Webhook URL lives in the Pi's HA secrets.yaml
(!secret discord_server_alerts_webhook), not the repo.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wes
2026-06-12 15:49:47 -04:00
co-authored by Claude Fable 5
parent 9a5ee30db9
commit e179f1f1fd
2 changed files with 62 additions and 0 deletions
+4
View File
@@ -161,5 +161,9 @@ into the YAML as two `binary_sensor`s; nothing left to do here.
- **Water Heater DSI Fault** = node `95` page-3 `b0` bit5 (`0x20`). Healthy heater - **Water Heater DSI Fault** = node `95` page-3 `b0` bit5 (`0x20`). Healthy heater
= `0x80` off / `0x81` running; lockout = `0xA0`. = `0x80` off / `0x81` running; lockout = `0xA0`.
- **Discord alert wired (2026-06-12):** `canbus/ha/dsi_fault_alert.yaml` (on the
Pi as `packages/dsi_fault_alert.yaml`) pings the server-alerts channel via
webhook (`!secret discord_server_alerts_webhook`, same one Gatus uses) when
the fault latches for 10 s, plus a cleared message. Test-fired OK.
- **OneControl System Fault** = page-0 `b0` bit0 (`0x01`), a bus-wide - **OneControl System Fault** = page-0 `b0` bit0 (`0x01`), a bus-wide
"fault exists somewhere" flag (read from node `95`'s page 0 in the lambda). "fault exists somewhere" flag (read from node `95`'s page 0 in the lambda).
+58
View File
@@ -0,0 +1,58 @@
# Water-heater DSI fault → Discord ping in the server-alerts channel.
#
# The CAN node decodes the heater's DSI lockout (node 95 page-3 b0 bit5 —
# see canbus/README.md); when the burner fails to light (usually an empty
# propane tank) the module latches the fault and this fires the webhook.
#
# Deploy to Pi: /config/packages/dsi_fault_alert.yaml
# Repo copy: canbus/ha/dsi_fault_alert.yaml
# Secret: discord_server_alerts_webhook in the Pi's /config/secrets.yaml
# (same webhook Gatus uses for the alerts channel)
rest_command:
discord_server_alerts:
url: !secret discord_server_alerts_webhook
method: POST
content_type: "application/json; charset=utf-8"
payload: >-
{"username": "Camper OneControl",
"content": {{ message | tojson }},
"allowed_mentions": {"parse": ["everyone"]}}
automation:
- id: camper_dsi_fault_discord
alias: "Camper: DSI fault → Discord"
description: >-
10s 'for' debounces a single glitched broadcast frame; a real lockout
is latched by the module so it easily survives the wait.
triggers:
- trigger: state
entity_id: binary_sensor.onecontrol_can_water_heater_dsi_fault
to: "on"
for: "00:00:10"
actions:
- action: rest_command.discord_server_alerts
data:
message: >-
@here 🔥 **WATER HEATER DSI FAULT** — hey dumbass, you're out of
propane again. (Or the igniter finally died, but let's be honest,
it's the propane.) The heater is in lockout — swap the tank, then
cycle the heater off/on to relight.
mode: single
- id: camper_dsi_fault_cleared_discord
alias: "Camper: DSI fault cleared → Discord"
triggers:
- trigger: state
entity_id: binary_sensor.onecontrol_can_water_heater_dsi_fault
from: "on"
to: "off"
for: "00:00:10"
actions:
- action: rest_command.discord_server_alerts
data:
message: >-
✅ DSI fault cleared — the water heater is lighting again. Crisis
averted. Try to remember this feeling next time you eyeball the
tank gauge and say "eh, it's fine."
mode: single