360 Secure SkillHub
360 安全技能中心

Homeassistant N8n Agent

该 Skill 将用户关于智能家居/Home Assistant 的自然语言请求分类为 state、action、historical、calendar 四种 requestType,再以 curl POST 发送到本地 n8n webhook(localhost:5678),由 n8n 工作流处理 IoT 设备状态查询、设备控制、历史数据与日历信息,会话标识固定为 openclaw。

enchantedmotorcycle
enchantedmotorcycle
热度 52.98
最近更新 2026-05-17 11:19:10
分类:自动化依赖:代码执行 / 第三方 API应用场景:自动化脚本 / 工作流 / API 集成 / 日程安排

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add homeassistant-n8n-agent
Metadata
name
homeassistant-n8n-agent
description
Bridge OpenClaw with your n8n instance for Home Assistant automation.
homepage
https://n8n.io/
metadata
{"clawdis":{"emoji":"🤖","requires":{"bins":["curl"]}}}

Home‑Assistant – n8n Agent Skill

This skill bridges OpenClaw with your n8n instance for Home Assistant automation.

How it works

Uses curl to trigger a n8n workflow for all things related to IoT. All requests should be a POST formatted as follows: curl -X POST http://localhost:5678/webhook/05f3f217-08b9-42de-a84a-e13f135bde73 -H "Content-Type: application/json" -d '{"chatInput": "USERS QUESTION/REQUEST", "requestType": "DETERMINED REQUEST TYPE", "sessionId":"openclaw"}'

Steps

Determine the nature of a user's prompt.

  1. Is the inquiry about a current device state or multiple states? If so, requestType is state
  2. Is the inquiry asking for an IoT device state to be changed? If so, requestType is action
  3. Is the inquiry asking about IoT data from the past? If so, requestType is historical
  4. Is the inquiry asking about calendar or schedule information? If so, requestType is calendar

Quick Reference

Action

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"}'

Historical

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"}'

State

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"}'

Calendar

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"}'