Homeassistant N8n Agent技能使用说明
2026-03-30
新闻来源:网淘吧
围观:25
电脑广告
手机广告
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"}'

步骤
确定用户提示的性质。
- 询问的是关于当前设备状态或多个状态吗?如果是,
requestType是state - 询问是否要求更改物联网设备状态?如果是,
requestType是action - 询问的是关于过去的物联网数据吗?如果是,
requestType是历史 - 询问是关于日历或日程信息吗? 如果是,
requestType是calendar
快速参考
操作
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"}'
文章底部电脑广告
手机广告位-内容正文底部


微信扫一扫,打赏作者吧~