← 返回 Skills 市场
mischa-petschenig

minos

作者 Mischa-Petschenig · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
318
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install home-assistant-bridge-python
功能描述
Control Home Assistant devices, read sensors, and manage automations using the Python Bridge. Use when the user wants to interact with their smart home - tur...
使用说明 (SKILL.md)

Home Assistant Skill (Python Bridge)

Integration with Home Assistant via Python Bridge for reliable smart home control.

Prerequisites

  • Home Assistant instance running (local or remote)
  • Long-lived access token from HA profile
  • Network connectivity to HA instance
  • Python 3 with requests module

Configuration

One-time setup:

cd /root/.openclaw/workspace/skills/home-assistant/scripts
./ha-setup.sh

This creates ~/.homeassistant.conf with your HA_URL and HA_TOKEN.

Load configuration:

source ~/.homeassistant.conf

Core Commands

All commands go through ha-bridge.py. Aliases are supported everywhere — use friendly names instead of entity IDs.

Device Control

python3 ha-bridge.py on \x3Centity|alias>          # Turn on
python3 ha-bridge.py off \x3Centity|alias>         # Turn off
python3 ha-bridge.py toggle \x3Centity|alias>      # Toggle
python3 ha-bridge.py on \x3Centity> --verify       # Turn on + verify state after 3s

Examples:

python3 ha-bridge.py on kitchen                 # Alias → switch.kitchen_light_relay
python3 ha-bridge.py off tv --verify            # Turn off + verify
python3 ha-bridge.py toggle bedroom             # Toggle bedroom light

Light Control

python3 ha-bridge.py light \x3Centity|alias> --brightness \x3C0-255>
python3 ha-bridge.py light \x3Centity|alias> --color-temp \x3Cmireds>
python3 ha-bridge.py light \x3Centity|alias> --rgb "255,0,0"

Examples:

python3 ha-bridge.py light bedroom --brightness 128
python3 ha-bridge.py light kitchen --rgb "255,200,100"

Climate Control

python3 ha-bridge.py climate \x3Centity|alias> --temperature \x3Cvalue>
python3 ha-bridge.py climate \x3Centity|alias> --mode \x3Cheat|cool|auto|off>

Scene Activation

python3 ha-bridge.py scene \x3Cscene_entity>

Read States

python3 ha-bridge.py states                     # All entities (JSON)
python3 ha-bridge.py state \x3Centity|alias>       # Specific entity (JSON)

Search Entities

python3 ha-bridge.py search \x3Cquery>             # Search by name or entity_id
python3 ha-bridge.py search licht               # Find all "licht" entities
python3 ha-bridge.py search temp --domain sensor  # Only sensors matching "temp"

History

python3 ha-bridge.py history \x3Centity|alias>              # Last 24h
python3 ha-bridge.py history kitchen --hours 48           # Last 48h

Aliases

python3 ha-bridge.py aliases                    # Show all configured aliases

Aliases are stored in scripts/aliases.json. Edit directly to add/change/remove.

Services

python3 ha-bridge.py services                   # List all available HA services

Alias System

Aliases map friendly names to entity IDs. Stored in scripts/aliases.json:

{
  "kitchen": "switch.kitchen_light_relay",
  "bedroom": "light.bedroom_led_strip",
  "thermostat": "climate.living_room"
}

Use aliases anywhere an entity ID is expected.

Aliases

Aliases are stored in scripts/aliases.json. Copy scripts/aliases.example.json as starting point:

cp scripts/aliases.example.json scripts/aliases.json

Then edit with your own device mappings. Use python3 ha-bridge.py search \x3Cquery> to find entity IDs.

Status Delay Note

Home Assistant needs 1-3 seconds to update state after a command. Use --verify to auto-check after 3 seconds.

File Structure

skills/home-assistant/
├── SKILL.md                          # This file
├── README.md                         # Human-readable docs
├── scripts/
│   ├── ha-bridge.py                  # Main bridge (all commands)
│   ├── ha-setup.sh                   # One-time setup
│   ├── aliases.json                  # Your alias mappings (create from example)
│   └── aliases.example.json          # Example alias mappings
└── references/
    └── finding-entities.md           # How to find entity IDs
安全使用建议
This package is coherent with its stated purpose, but take these precautions before installing: - Verify the HA_TOKEN handling: ha-setup.sh saves your long-lived HA token to ~/.homeassistant.conf (permissions set to 600). Consider whether you want a file-stored token or prefer exporting the token into the current shell session only. Do not add the source line to ~/.bashrc unless you understand the tradeoff of persisting the token in your shell startup. - Confirm the setup path: SKILL.md instructs cd to /root/.openclaw/... which may not match your system. Run ha-setup.sh from the actual scripts directory included with the skill. - Inspect the code locally before running: the Python script issues API calls only to the HA_URL you provide and does not contact other endpoints, but you should still review it if you have higher security needs. - Use a dedicated long-lived token with minimal privileges if possible, and rotate it if compromised. - Ensure requests is installed in a controlled environment (virtualenv) to avoid interfering with system packages. If you want the registry metadata to be more accurate, ask the author to declare HA_URL and HA_TOKEN as required env vars/primary credentials and to avoid hardcoded paths in SKILL.md.
功能分析
Type: OpenClaw Skill Name: home-assistant-bridge-python Version: 1.0.0 The Home Assistant skill bundle is a well-structured integration for controlling smart home devices via the Home Assistant REST API. It includes a setup script (ha-setup.sh) that securely stores user-provided credentials in a local configuration file with restricted permissions (600) and a Python bridge (ha-bridge.py) that implements standard API calls for device management, state retrieval, and history. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
✓ Purpose & Capability
Name/description, CLI, and Python code all implement Home Assistant control via REST API. Required tools (Python + requests) and the behaviors (turn_on/off, lights, climate, search, history) are coherent with the stated purpose. No unrelated cloud providers, services, or binaries are requested.
ℹ Instruction Scope
Runtime instructions ask you to run ha-setup.sh which prompts for HA_URL and a long-lived HA_TOKEN and writes them to ~/.homeassistant.conf; they also instruct sourcing that file and optionally adding it to ~/.bashrc. The SKILL.md hardcodes a setup path (/root/.openclaw/workspace/skills/home-assistant/scripts) which may not match your environment and could confuse non-root users. The instructions do not attempt to read or transmit unrelated system files or external endpoints beyond the Home Assistant URL.
✓ Install Mechanism
There is no install spec that downloads code from arbitrary URLs. The skill is instruction-only but does include local scripts bundled with the skill. No remote install/extract operations or third-party package downloads are performed by the skill itself.
ℹ Credentials
The skill genuinely needs a Home Assistant URL and long-lived token (HA_URL, HA_TOKEN) which the setup script stores in ~/.homeassistant.conf and the Python client also accepts from environment variables. However, the registry metadata lists no required environment variables or primary credential — an inconsistency you should be aware of. Storing long-lived tokens in a file is functional but requires caution.
✓ Persistence & Privilege
The skill does not request forced/always-on installation and does not modify other skills or system-wide agent settings. The only persistent change the setup script suggests is writing ~/.homeassistant.conf and optionally adding a source entry to ~/.bashrc (user-level changes under your control).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install home-assistant-bridge-python
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /home-assistant-bridge-python 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Major update: Switched from bash CLI to Python Bridge for all Home Assistant control and automation. - New Python-based bridge script (ha-bridge.py) with comprehensive commands for device control, state queries, history, and scenes. - Alias system introduced: Use `aliases.json` to map friendly names to Home Assistant entity IDs. - One-time interactive setup script (`ha-setup.sh`) for configuration. - Documentation expanded: added concise usage guide in README.md and detailed reference on finding entity IDs. - Removed legacy bash scripts and outdated API reference.
元数据
Slug home-assistant-bridge-python
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

minos 是什么?

Control Home Assistant devices, read sensors, and manage automations using the Python Bridge. Use when the user wants to interact with their smart home - tur... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 318 次。

如何安装 minos?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install home-assistant-bridge-python」即可一键安装,无需额外配置。

minos 是免费的吗?

是的,minos 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

minos 支持哪些平台?

minos 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 minos?

由 Mischa-Petschenig(@mischa-petschenig)开发并维护,当前版本 v1.0.0。

💬 留言讨论