Homeassistant N8n Agent技能使用说明

subsun 4周前 (03-30) openclaw小龙虾 64 0

Home‑Assistant – n8n 代理技能

此技能将 OpenClaw 与您的 n8n 实例连接,用于 Home Assistant 自动化。

工作原理

使用 curl 触发 n8n 工作流,处理所有与物联网相关的事务。所有请求都应采用如下格式的 POST 请求:curl -X POSThttp://localhost:5678/webhook/05f3f217-08b9-42de-a84a-e13f135bde73-H "Content-Type: application/json" -d '{"chatInput": "用户的问题/请求", "requestType": "确定的请求类型", "sessionId":"openclaw"}'

Homeassistant N8n Agent

步骤

确定用户提示的性质。

  1. 询问的是关于当前设备状态或多个状态吗?如果是,requestTypestate
  2. 询问是否要求更改物联网设备状态?如果是,requestTypeaction
  3. 询问的是关于过去的物联网数据吗?如果是,requestType历史
  4. 询问是关于日历或日程信息吗? 如果是,requestTypecalendar

快速参考

操作

curl -X POST http://localhost:5678/webhook/05f3f217-08b9-42de-a84a-e13f135bde73 -H "Content-Type: application/json" -d '{"chatInput": "turn off the office light", "requestType": "action", "sessionId":"openclaw"}'

curl -X POST http://localhost:5678/webhook/05f3f217-08b9-42de-a84a-e13f135bde73 -H "Content-Type: application/json" -d '{"chatInput": "change the downstairs thermostat to 72", "requestType": "action", "sessionId":"openclaw"}'

历史

curl -X POST http://localhost:5678/webhook/05f3f217-08b9-42de-a84a-e13f135bde73 -H "Content-Type: application/json" -d '{"chatInput": "when was the front door last opened?", "requestType": "historical", "sessionId":"openclaw"}'

状态

curl -X POST http://localhost:5678/webhook/05f3f217-08b9-42de-a84a-e13f135bde73 -H "Content-Type: application/json" -d '{"chatInput": "is the air conditioner running?", "requestType": "state, "sessionId":"openclaw"}'

日历

curl -X POST http://localhost:5678/webhook/05f3f217-08b9-42de-a84a-e13f135bde73 -H "Content-Type: application/json" -d '{"chatInput": "when is my next meeting?", "requestType": "calendar, "sessionId":"openclaw"}'

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏

相关推荐

网友评论

  • (*)

最新评论

用户管理

您好,欢迎到访网站!
    用户注册

上网淘巴领天猫淘宝优惠券,一年省好几千。

广告  ×

您是本站第820033名访客 今日有0篇新文章/评论