Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

home-assistant-agent-secure家庭助理 Agent 安全

Agent Skill

home-assistant-agent-secure 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

44,075

周安装

1,855

GitHub Stars

3

下载量

15,434
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:home-assistant-agent-secure(家庭助理 Agent 安全)
来源仓库:https://github.com/szafranski/home-assistant-agent-secure
安装命令:
openclaw skills install home-assistant-agent-secure
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install home-assistant-agent-secure

简介

通过 Assist API 安全控制 Home Assistant 智能家居设备。

  • 支持灯光、开关、温控器等多种设备的自然语言指令。
  • 利用内置 NLU 解析意图,保障操作的安全性与准确性。
  • 需配置 OAuth 2.0 凭证并与本地实例建立可信连接。
  • 建议限制远程访问权限,防止未授权设备操控。home-assistant-agent-secure 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
home-assistant-agent-secure
description
Control Home Assistant smart home devices securely using the Assist (Conversation) API. Passes natural language to Home Assistant's built-in NLU for safe, token-efficient device control. Designed to work with a restricted non-admin HA user for minimal access exposure.
metadata
{"openclaw":{"emoji":"🏠","requires":{"bins":["curl"],"env":["HOME_ASSISTANT_URL","HOME_ASSISTANT_TOKEN"]},"primaryEnv":"HOME_ASSISTANT_TOKEN"}}

Home Assistant Agent (Secure)

Control smart home devices by sending natural language to Home Assistant's Conversation (Assist) API.

Security model: This skill uses ONLY the /api/conversation/process endpoint. Do NOT use the token to call any other HA API endpoint. The token should belong to a restricted, non-admin Home Assistant user with access limited to specific areas and entities.

Important Security Rules

  • ONLY call /api/conversation/process — never call /api/states, /api/services, /api/config, or any other endpoint
  • NEVER output or echo the token value
  • NEVER use the token for any purpose other than the Assist API call below
  • NEVER attempt to log in to Home Assistant via the browser or web UI — always use the API token
  • If a user request cannot be handled by Assist, say so — do not fall back to other API calls

Important: Disable Trusted Networks Login Bypass

If your Home Assistant instance uses the trusted_networks auth provider with allow_bypass_login: true, any agent or user on the local network can log in as any HA user (including administrators) without a password. This completely bypasses the restricted-user security model of this skill.

To fix: In your HA configuration.yaml, set allow_bypass_login: false under the trusted_networks auth provider, or remove the trusted_networks provider entirely. Restart HA after making the change.

Setup

1. Create a Restricted Home Assistant User

  1. In Home Assistant go to Settings → People → Add Person
  2. Create a new user (e.g. openclaw-bot)
  3. Do NOT make it an administrator
  4. Under Settings → Areas & Zones, assign only the areas this user should control
  5. Optionally restrict entity access using a custom group or dashboard-only permissions

2. Generate a Long-Lived Access Token

  1. Log in to Home Assistant as the restricted user (openclaw-bot)
  2. Go to Profile (bottom-left)
  3. Scroll to Long-Lived Access Tokens
  4. Click Create Token, name it (e.g. openclaw)
  5. Copy the token immediately — it is shown only once

3. Configure OpenClaw

Set HOME_ASSISTANT_URL and HOME_ASSISTANT_TOKEN using any of the methods below. OpenClaw applies them in this precedence order (highest first): process environment → .env file → openclaw.json config. A value set by a higher-priority source is never overridden by a lower one.

Option A: .env file (recommended)

Add to ~/.openclaw/.env:

HOME_ASSISTANT_URL=https://your-ha-instance.local
HOME_ASSISTANT_TOKEN=your-restricted-user-token-here

The URL can be a hostname (e.g. https://homeassistant.local) or an IP address (e.g. https://192.168.1.50:8123).

Option B: Config file

Add to ~/.openclaw/openclaw.json under skills.entries:

{
  "skills": {
    "entries": {
      "home-assistant-agent-secure": {
        "apiKey": "your-restricted-user-token-here",
        "env": {
          "HOME_ASSISTANT_URL": "https://your-ha-instance.local"
        }
      }
    }
  }
}

The apiKey field automatically maps to HOME_ASSISTANT_TOKEN via the skill's primaryEnv declaration.

Option C: Shell environment variables

Export in your shell profile (e.g. ~/.bashrc, ~/.zshrc):

export HOME_ASSISTANT_URL="https://your-ha-instance.local"
export HOME_ASSISTANT_TOKEN="your-restricted-user-token-here"

Usage

Send any smart home command in natural language. The skill passes it directly to HA Assist:

curl -sk -X POST "$HOME_ASSISTANT_URL/api/conversation/process" \
  -H "Authorization: Bearer $HOME_ASSISTANT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text": "USER REQUEST HERE", "language": "DETECTED LANGUAGE CODE"}'
The -k flag allows connections to HA instances using self-signed certificates. If your HA uses a trusted certificate (e.g. Let's Encrypt), you can remove it.

Set the language field based on the detected language of the user's input (e.g. "pl" for Polish, "en" for English, "de" for German, etc.).

Examples

  • "Turn on the living room lights" (English)
  • "Włącz światło w salonie" (Polish)
  • "Schalte das Licht im Wohnzimmer ein" (German)
  • "Jaka jest temperatura w kuchni?" (Polish)
  • "Turn off all lights in the bedroom" (English)

Inflected Language Handling (Nominative Retry)

Many languages use grammatical cases or word inflection, causing entity names to change form in natural speech. Home Assistant entity names are typically in their base/dictionary form (nominative), but users naturally use other grammatical forms in commands.

This affects languages including (but not limited to):

  • Polish — 7 cases (e.g. *drukarkę* → *drukarka*, *lampę* → *lampa*)
  • Czech — 7 cases (e.g. *tiskárnu* → *tiskárna*, *lampu* → *lampa*)
  • German — 4 cases + articles (e.g. *den Drucker* → *Drucker*, *die Lampe* → *Lampe*)
  • Finnish — 15 cases (e.g. *tulostinta* → *tulostin*, *lamppua* → *lamppu*)
  • Hungarian — 18 cases (e.g. *nyomtatót* → *nyomtató*, *lámpát* → *lámpa*)
  • Russian — 6 cases (e.g. *принтеру* → *принтер*, *лампу* → *лампа*)
  • Croatian/Serbian — 7 cases, similar patterns to Polish and Czech

Example: A user says *"włącz drukarkę 3d"* (Polish accusative), but the entity is named *"drukarka 3d"* (nominative). HA Assist won't find it.

Retry strategy: If HA responds with an error (no_valid_targets, no_intent_match, or a message indicating the entity was not found), and the user's input is in an inflected language:

  1. Identify the entity name within the command
  2. Convert inflected words to their base/dictionary/nominative form
  3. Retry the API call with the corrected form
  4. If the retry also fails, report the error to the user

Important: Only retry once. Do not loop. If the nominative retry also fails, inform the user that the entity was not found.

Handling Responses

The response is in response.speech.plain.speech. Relay it directly to the user:

  • "Turned on the light" → success
  • "Sorry, I couldn't understand that" → Assist couldn't parse the request
  • "Sorry, there are multiple devices called X" → ambiguous entity name

On errors (response_type: "error")

ErrorWhat to tell the user
no_intent_matchTry nominative retry (if inflected language). If still fails: "Home Assistant didn't recognize that command."
no_valid_targetsTry nominative retry (if inflected language). If still fails: "Entity not found — check the device name or add an alias in HA."
Multiple matches"Multiple devices share that name — consider adding unique aliases in HA."

Troubleshooting

  • 401 Unauthorized: Token is invalid or expired. Generate a new one from the restricted user's profile.
  • Connection refused: Check that HOME_ASSISTANT_URL is correct and HA is reachable.
  • Command not understood: Rephrase the request or check that the entity is exposed to the restricted user.
  • Entity not found: The restricted user may not have access to that area/entity. Update permissions in HA.

API Reference

Endpoint

POST /api/conversation/process

Note: Use /api/conversation/process, NOT /api/services/conversation/process.

Request Body

{
  "text": "turn on the kitchen lights",
  "language": "en"
}

Polish example:

{
  "text": "włącz światło w salonie",
  "language": "pl"
}

Success Response

{
  "response": {
    "speech": {
      "plain": {"speech": "Turned on the light"}
    },
    "response_type": "action_done",
    "data": {
      "success": [{"name": "Kitchen Light", "id": "light.kitchen"}],
      "failed": []
    }
  }
}

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

80.93%
按下载量换算12,491

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills