Skip to content

v1.0.0 — dsh-smarthome 正式版

Choose a tag to compare

@YLifeOnlyOnce YLifeOnlyOnce released this 14 Aug 09:33
· 19 commits to main since this release

🎉 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