# Analytics snippet placeholder — HearthNodes (gatherer.top) # Paste the measurement snippet here (server.js inlines any content that contains # a markup tag into on every page). No GA4 property is assigned to this # site yet, so leave this file as comments only and the build emits no tracking # code.
HearthNodesgatherer.top 已发布 11/28 EN 中文

按 4 升流量阈值触发的进水总阀关闭

六个漏水检测点加一只全屋流量计:任意检测点触水,或在无用水设备运行时流量超过 4 L/min 持续 12 分钟,即关闭进水总阀。实测从触水到阀门关闭耗时 9 秒。

协议 · zwave 延迟 · 9000 ms 供电 · mains 发布 · 2026-08-30 3 devices
自动化 YAML water-leak-main-shutoff.yaml
# HearthNodes recipe 21 - leak shutoff
alias: "Water - leak or runaway flow closes the main"
id: hn_water_leak_main_shutoff
description: "Any puck wet, or 4 L/min idle flow for 12 minutes, closes the main"
mode: single
max_exceeded: silent

trigger:
  - platform: state
    entity_id:
      - binary_sensor.leak_puck_1
      - binary_sensor.leak_puck_2
      - binary_sensor.leak_puck_3
      - binary_sensor.leak_puck_4
      - binary_sensor.leak_puck_5
      - binary_sensor.leak_puck_6
    to: "on"
    id: puck_wet
  - platform: numeric_state
    entity_id: sensor.house_water_flow_lpm
    above: 4
    for: "00:12:00"
    id: runaway_flow

variables:
  fixtures_that_may_run:
    - binary_sensor.bath_tap_active
    - binary_sensor.shower_active
    - binary_sensor.garden_tap_active
    - binary_sensor.irrigation_running
    - binary_sensor.washing_machine_active
    - binary_sensor.dishwasher_active
  valve: valve.water_main

condition:
  - condition: state
    entity_id: "{{ valve }}"
    state: "open"
  - condition: template
    value_template: >-
      {{ is_state('person.primary','home') or is_state('person.partner','home')
         or is_state('input_boolean.away_flow_guard','on') }}
  - condition: template
    value_template: >-
      {{ trigger.id == 'puck_wet'
         or (trigger.id == 'runaway_flow'
             and fixtures_that_may_run | select('is_state','on') | list | count == 0) }}

action:
  - service: valve.close_valve
    target:
      entity_id: "{{ valve }}"
  - wait_template: "{{ is_state_attr(valve, 'current_position', 0) }}"
    timeout: "00:00:10"
    continue_on_timeout: true
  - service: siren.turn_on
    target:
      entity_id: siren.indoor
    data:
      tone: water
      duration_s: 90
  - service: notify.all_devices
    data:
      title: "Water shut off"
      message: >-
        {{ trigger.id }} on {{ trigger.entity_id }}.
        Flow {{ states('sensor.house_water_flow_lpm') }} L/min.
        Valve {{ states(valve) }}. Reset by hand at the valve.
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.water_lockout

# Puck buzzers are local hardware and still sound with the hub down. Valve fails
# to confirm closed in 10 s -> two retries, then a notification with instructions
# for the manual bypass. Monthly exercise cycle closes and reopens the ball valve
# at 04:00 on the first of the month so scale cannot seize it.
触发器 · state

binary_sensor.leak_puck_[1..6]

任一漏水检测点上报有水,或在所有用水设备均空闲时全屋流量计超过 4 L/min。

按 4 升流量阈值触发的进水总阀关闭 topology

分步说明

  1. valve.water_main驱动球阀电机关闭并核对位置反馈;在这套硬件上,从全开到全关耗时 7 秒。 close · confirm position within 10 s
  2. siren.indoor发出声响报警;无声关阀会让随后赶来的水暖工不明白水龙头为什么不出水。 on · pattern 'water' · 90 s
  3. notify.all_devices向所有成年家庭成员推送通知,说明具体是哪个检测点、当时的流量读数以及阀门状态,避免有人在不知情的情况下重新打开阀门。 send · which puck · flow rate · valve state
  4. input_boolean.water_lockout锁定状态必须由人在阀门本体上手动解除,使系统无法自动重新打开、把水放向已经爆裂的管道。 on · requires manual reset
分步说明
把检测点放在水真正积起来的地方

洗碗机下方、水槽下方的柜内、洗衣机旁、热水器旁、冰箱制冰机水管下方,以及浴室最低的角落。放在空旷地面的检测点是浪费;水会沿柜体底板流到后角积聚,而不是积在你一眼能看到的位置。

用你的真实基线整定流量阈值

观察流量计一周,记录无设备运行时的最高读数——马桶水箱缓慢漏水通常是 0.1–0.3 L/min。把阈值设在至少十倍于此,避免马桶慢漏每晚都把全屋水关掉,并把持续时间保持在 12 分钟。

让关阀有声响,让复位必须手动

阀门在凌晨 3 点无声关闭,意味着早上要在水暖工的猜测中开始。要响警报、通知所有人,并要求在阀门处物理复位。这一切的目的就是止水,而随手重新打开会让它前功尽弃。

硬件

型号协议连接在本链路中的作用
Z-Wave motorised ball valve (1") zwave 有线 带位置反馈的市电执行器;不带反馈的弹簧复位阀会让你无法确认它到底关没关。
Whole-house ultrasonic flow meter zwave 有线 外夹式非侵入传感器;提供 0.1 升分辨率的每分钟流量读数,正是 4 L/min 阈值所需要的精度。
Zigbee leak pucks with a local buzzer zigbee 无线 电池供电的检测点,布放在每台涉水电器下方;其本地蜂鸣器很重要,因为即使中枢宕机它也会响。

失效时怎么办

如果阀门 10 秒内未确认关闭,自动化重试两次,随后发送通知并指示手动关闭旁通阀。如果中枢宕机,各检测点的本地蜂鸣器仍会响。离家防护关闭时,基于流量的触发会被停用,因为花园水龙头连续放水 12 分钟完全可能超过 4 L/min。

同一触发源的配方

条款 仅供参考。这些配方会控制市电、水路与物理门禁。当地电气与给排水规范、熔断与隔离措施、以及每一处失效保护的实际测试,都需要你自己负责。本页内容不构成专业工程、法律或安全建议。