Skip to content

Releases: YLifeOnlyOnce/dsh-smarthome

v1.2.0 — Web UI 家庭仪表盘

Choose a tag to compare

@YLifeOnlyOnce YLifeOnlyOnce released this 14 Aug 10:07

🏠 Web UI 家庭仪表盘(v1.2.0)

调用 ha_dashboard,全屋状态直接渲染成对话里的精美仪表盘卡片:

dashboard

  • 按域分组的设备网格:灯光 💡 / 开关 🔌 / 传感器 🌡️💧⚡ / 空调 ❄️ / 影音 📺,状态彩色圆点(开=绿、关=灰、数值=蓝)
  • 场景 chips:电影模式 / 晚安模式 / 离家模式
  • 最近变化:实时 state_changed 事件流
  • 浏览器端:官方 __ModuleLoader__ 闭包工厂打包,dsh.client manifest 声明,装上即用
  • 零自定义事件:快照随 tool/resultpresentationMeta 持久化——已知事件类型、回放安全,卸载插件也不会污染会话日志

本版其他

  • ha_dashboard 工具(第 10 个工具)
  • 32/32 测试(新增浏览器节点装配单元测试 + 真实 agent-loop 端到端——用真实持久化事件驱动浏览器节点装配)
  • npm dsh-smarthome@1.2.0(latest)

安装 / 升级

dsh plugin --profile web add dsh-smarthome

v1.0.0 — dsh-smarthome 正式版

Choose a tag to compare

@YLifeOnlyOnce YLifeOnlyOnce released this 14 Aug 09:33

🎉 dsh-smarthome v1.0.0 — Home Assistant × DeepSeek Harness(npm 已发布 ✅)

把 Home Assistant 交给 DeepSeek Harness agent:读取状态、查询历史、按实体/区域/设备控制,所有写操作都经过人工审批闸门。零运行时依赖,WebSocket 实时状态。

✨ 效果预览

① 提问 ② 审批闸门 ③ 完成——状态真的变了
start approval final

📦 安装(npm 已发布)

dsh plugin --profile web add dsh-smarthome

或从 GitHub:dsh plugin --profile web add github:YLifeOnlyOnce/dsh-smarthome

🛠 功能

  • 8 个 ha_* 工具ha_health / ha_list_entities / ha_list_areas / ha_get_state / ha_history / ha_events / ha_call_service / ha_render_template
  • 三种定位方式:按实体(entity)、按区域(area,整间房一次控制)、按设备(device)
  • WebSocket 实时状态state_changed 事件缓冲(ha_events)、区域注册表、断线重连
  • 安全默认:服务调用走 harness 审批接缝;allowedDomains 域白名单二次保险
  • 凭证接缝tokenEnv 经官方 ctx.credentials 解析,每次请求重新解析,轮换即生效
  • 零运行时依赖:REST + Node 内置 WebSocket(Node ≥ 22)

🧪 没有 Home Assistant?

自带演示模拟器(REST + WebSocket):pnpm demo:ha + docs/demo.html 交互演示页,无需真实设备即可完整体验。

✅ 验证

24/24 测试(客户端 + 真实 ToolRuntime 集成 + 真实 agent-loop 端到端)· 严格 TypeScript · CI

配置见 README