添加自适应自动风扇控制#29
Merged
massif-01 merged 2 commits intoMay 25, 2026
Merged
Conversation
Closed
PR 合并 LPMU 接入 API 后总端点数为 257,超过 256 上限导致 config.pack API 注册失败,进而 webui 服务无法启动。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
这个 PR 将现有风扇
AUTO模式接入自适应闭环控制,同时保持CURVE、手动模式和既有风扇 NVS 配置兼容。主要改动:
last_update_ms、age_ms、stale等新鲜度信息。temp.bind多变量加权:加权结果作为控制温度,绑定变量中的最高 fresh 温度作为保护温度。AUTO模式在没有可用 fresh 温度输入时立即进入 100% 安全满速。adaptive模式,不修改fan_nvs_config_t,不提升FAN_CONFIG_VERSION。fan.status增加自动控制遥测字段,并在 WebUI 中增加自动模式说明弹窗。背景和原因
旧的
AUTO路径在变量输入断流时存在把默认 25°C 当作有效温度的风险,这会让风扇在温度数据失效时错误降速。这个 PR 的核心修正是把变量新鲜度变成明确合同,并让AUTO在温度输入失效时优先保护设备。用户影响
用户仍然点击原来的“自动”按钮,不需要选择新模式。绑定多个温度变量后,系统会按权重计算控制温度,同时用绑定变量里的最高 fresh 温度做保护,避免热点温度被平均值稀释。
曲线模式保持原行为:它仍然按用户配置的温度曲线和迟滞运行。自动模式则以曲线为基线,再根据升温趋势、预测温度和散热响应动态加速或缓慢降速。
验证
本地已运行:
node --check components/ts_webui/web/js/app.jsnode --check components/ts_webui/web/js/lang/zh-CN.jsnode --check components/ts_webui/web/js/lang/en-US.jsgit diff --check本地未运行:
idf.py,需要在 ESP-IDF 5.5.2 环境中继续验证。