From a9c6f697a40c84ea1d409a309941f7029947cd6e Mon Sep 17 00:00:00 2001 From: alvis Date: Mon, 23 Feb 2026 10:07:14 +0000 Subject: [PATCH] Add water leak sensor alerting docs to HA and Zabbix pages --- Home-Assistant.md | 20 ++++++++++++++++++++ Zabbix.md | 10 ++++++++++ 2 files changed, 30 insertions(+) diff --git a/Home-Assistant.md b/Home-Assistant.md index 99533d1..63282ff 100644 --- a/Home-Assistant.md +++ b/Home-Assistant.md @@ -41,3 +41,23 @@ virt-install \ - If boot fails, disable Secure Boot in UEFI firmware settings ([reference](https://www.reddit.com/r/homeassistant/comments/198yg1a/trying_to_install_ha_as_a_virtual_machine_in/)) - Find assigned IP at router admin panel + +## Zabbix Alerting + +HA pushes alerts to Zabbix via `rest_command` → Zabbix `history.push` API (trapper items). + +### Water Leak Sensors + +3x HOBEIAN ZG-222Z Zigbee moisture sensors: + +| Entity | Room | +|--------|------| +| `binary_sensor.hobeian_zg_222z` | Kitchen | +| `binary_sensor.hobeian_zg_222z_2` | Bathroom | +| `binary_sensor.hobeian_zg_222z_3` | Laundry | + +- Sensor ON → automation sends room name to Zabbix trapper item `water.leak` on host "HA Agap" +- Zabbix trigger fires Disaster alert: "Water leak detected in {room}" +- All sensors OFF → automation sends "ok" to clear + +Config: `rest_command` entries in `configuration.yaml`, automations `water_leak_alert` and `water_leak_clear`. diff --git a/Zabbix.md b/Zabbix.md index da9130b..f283630 100644 --- a/Zabbix.md +++ b/Zabbix.md @@ -51,6 +51,16 @@ cd agap_git/zabbix docker compose up -d ``` +## HA Trapper Items + +Host "HA Agap" receives alerts from Home Assistant via `history.push` API. + +| Item Key | Type | Trigger | Severity | +|----------|------|---------|----------| +| `water.leak` | Text trapper | `last() <> "ok"` → "Water leak detected in {room}" | Disaster | + +To add a new HA alert: create a trapper item + trigger on "HA Agap", add `rest_command` in HA `configuration.yaml`, create HA automation to call it. + ## Notes - Zabbix server port 10051 is exposed on the host for the host agent