# 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 已发布 12/28 EN 中文

日光采集调光:电灯跟着窗外来光走

朝南办公室的顶灯随日照增强而自动调低,把工作面维持在恒定 500 lx。晴天实测:相比固定 100 % 的基线,照明能耗下降 41 %。

协议 · matter 延迟 · 8000 ms 供电 · mains 发布 · 2026-09-23 3 devices
自动化 YAML light-daylight-harvest-dimming.yaml
# HearthNodes recipe 07 - daylight harvesting
alias: "Light - daylight harvesting on the work plane"
id: hn_light_daylight_harvest
description: "Hold 500 lx on the work plane, clamp the ceiling circuit to 12-100 percent"
mode: single
max_exceeded: silent

trigger:
  - platform: numeric_state
    entity_id: sensor.office_workplane_lux
    below: "{{ state_attr('sensor.office_workplane_lux','last_setpoint') | float(500) - 60 }}"
  - platform: numeric_state
    entity_id: sensor.office_workplane_lux
    above: "{{ state_attr('sensor.office_workplane_lux','last_setpoint') | float(500) + 60 }}"

variables:
  target_lx: 500
  daylight_share: >-
    {{ (states('sensor.office_daylight_only_lux') | float(0) / target_lx * 100) | round(0) }}
  harvested_pct: >-
    {{ [[(100 - daylight_share | float(0)) | round(0), 12] | max, 100] | min }}

condition:
  - condition: state
    entity_id: binary_sensor.office_occupied
    state: "on"
  - condition: state
    entity_id: input_boolean.harvest_hold
    state: "off"
  - condition: template
    value_template: >-
      {{ (now() - states.sensor.office_workplane_lux.last_updated).total_seconds() < 600 }}

action:
  - service: light.turn_on
    target:
      entity_id: light.office_ceiling
    data:
      brightness_pct: "{{ harvested_pct }}"
      transition: 8
  - service: input_number.set_value
    target:
      entity_id: input_number.ceiling_last_level
    data:
      value: "{{ harvested_pct }}"

# Photosensor failure -> fixed 70 percent plus a maintenance flag. Daylight is
# never inferred from a weather API. Manual dimmer presses always suspend the
# loop for 15 minutes through input_boolean.harvest_hold.
触发器 · numeric_state

sensor.office_workplane_lux

工作面照度相对当前调光档位对应的照度值变化超过 60 lx。

日光采集调光:电灯跟着窗外来光走 topology

分步说明

  1. light.office_ceiling把顶灯设为计算出的档位,限制在 12 %–100 % 之间,使用 8 秒过渡,让人看不出台阶感。 turn_on · brightness_pct {{ harvested }} · transition 8s
  2. sensor.office_lighting_power每 5 分钟记录该回路的平均功率,以便与基线周做诚实的节能量报告。 log · 5min mean
  3. input_boolean.harvest_hold任何人碰过物理调光旋钮后,暂停日光采集 15 分钟。 on for 15 min after any manual dimmer press
分步说明
用真实照度计标定顶棚传感器

调试时把经过校准的照度计放在工作面,调节顶棚传感器的增益,直到两者读数相差不超过 10 %。要在两种日照水平下各做一次——一次阴天、一次晴天——因为传感器的余弦响应在低角度下会失真,且误差不是线性的。

下限设在 12 % 而不是零

调到零会脱离无频闪区间,并且恢复时的跳变很明显。12 % 还能让驱动保持在工作温度、高于最小导通角。如果房间确实不需要电光,就显式关闭回路,而不是把它调到零。

先完整测量一周基线

开启功率记录,让回路以固定 100 % 运行一个工作周,然后才启用日光采集。没有这个基线,你报出的任何节能量都只是估算,而估算会被所有读到它的人打折。

硬件

型号协议连接在本链路中的作用
DALI or 0-10 V dimmable driver with a Matter bridge matter 有线 这里必须用有线控制:廉价驱动在 12 % 的 Zigbee 调光下容易闪烁,无法稳定维持在低档位。
Ceiling-mounted closed-loop photosensor (0-10 V) matter 有线 读取工作面上「日光 + 电光」的合成照度,这正是闭环需要保持恒定的量。
Desk-level lux reference (Zigbee, for calibration only) zigbee 无线 调试时用于把顶棚传感器的读数与真实工作面测量值对齐。

失效时怎么办

如果光电传感器失效,回路回退到固定 70 % 并抛出维护标记;系统绝不从天气 API 去猜日照,因为猜错会让人在黑暗里工作。物理调光旋钮始终优先,并始终暂停闭环。

同一触发源的配方

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