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

xlink-iot-agentxlink 物联网 Agent

Agent Skill

xlink-iot-agent 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,039

周安装

165

GitHub Stars

公开资料未说明

下载量

1,307
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install xlink-iot-agent

简介

xlink-iot-agent 用于补充开发相关能力,适合在 OpenClaw 中需要 IoT 设备管理时使用。

  • 适用于通过 Xlink Gateway API 查询设备和事件的开发场景。
  • 核心能力包括设备概览、列表查询、事件实例和报警统计功能。
  • 通过 clawhub 安装,命令为 openclaw skills install xlink-iot-agent。
  • 安装前需确认权限范围和维护状态,注意可能触发联网或 API 调用操作。

SKILL.md

name
xlink-iot-agent
description
Xlink IoT Agent - Query IoT devices and events via Xlink Gateway API. Provides device overview, device list, event instance queries, and alert statistics. Use when managing IoT devices and monitoring events on the XLink IoT platform.
version
0.1.0
metadata
openclaw
requires
env
primaryEnv
XLINK_APP_ID

Xlink IoT Agent

Control and query IoT devices and events on the XLink IoT platform via GatewayAppClient with signature-based authentication.

When to Use

✅ Use This Skill When

  • Querying device status and statistics on XLink IoT platform
  • Monitoring device alerts and events
  • Batch querying device attributes (latest values or historical data)
  • Remote control of IoT devices (invoking thing model services)
  • Filtering device data by project/product

❌ Do Not Use This Skill For

  • Other IoT platforms (AWS IoT, Azure IoT, Alibaba Cloud IoT, etc.)
  • Direct local device control (not via XLink IoT platform)
  • Historical weather data or severe weather alerts (use weather skill)
  • Non-IoT related device management tasks

Quick Start

1. Set Environment Variables

export XLINK_BASE_URL="https://api-gw.xlink.cn"
export XLINK_APP_ID="your-app-id"
export XLINK_APP_SECRET="your-app-secret"
export XLINK_API_GROUP="your-group-id"

2. Run Commands

cd /path/to/xlink-iot-agent

# Device overview
python scripts/xlink_api.py overview

# Pending events
python scripts/xlink_api.py event-instances --status 1 --limit 20

# Alert statistics (last 24 hours)
python scripts/xlink_api.py alert-statistics

# Device control
python scripts/xlink_api.py device-control \
  --thing-id 10299402 \
  --service device_attribute_set_service \
  --input '{"PowerSwitch":true}'

Core Commands

CommandFunctionExample
overviewDevice overview statisticspython scripts/xlink_api.py overview
device-listDevice list querypython scripts/xlink_api.py device-list --limit 20
device-trendDevice statistics trendpython scripts/xlink_api.py device-trend --start-time "2026-03-17T00:00" --end-time "2026-03-24T23:59"
device-historyDevice attribute history snapshotspython scripts/xlink_api.py device-history --device-ids 300513220,501548135
device-latestDevice latest attributespython scripts/xlink_api.py device-latest --device-ids 300513220,501548135
device-controlDevice controlpython scripts/xlink_api.py device-control --thing-id 10299402 --service device_attribute_set_service --input '{"PowerSwitch":true}'
alert-overviewAlert overviewpython scripts/xlink_api.py alert-overview
alert-statisticsAlert time-series statisticspython scripts/xlink_api.py alert-statistics --interval hour
event-instancesEvent instance querypython scripts/xlink_api.py event-instances --status 1 --limit 20

Common Query Examples

Device Overview

python scripts/xlink_api.py overview

Output:

==================================================
📊 XLINK Device Overview
==================================================

   📱 Total Devices:    7823
   🟢 Online:           143 (1.8%)
   ✅ Activated:        6756 (86.4%)
   ⚫ Offline:          7680
   ⏸️  Not Activated:   1067

Pending Events

python scripts/xlink_api.py event-instances --status 1 --limit 20

Alert Overview

python scripts/xlink_api.py alert-overview

Device List (with Filtering)

# Filter by project
python scripts/xlink_api.py device-list \
  --query '{"logic":"AND","device":{"project_id":{"$eq":"XJA1JJAJA"}}}' \
  --limit 20

# JSON output
python scripts/xlink_api.py device-list --limit 20 --json

Device Control

# Set attributes
python scripts/xlink_api.py device-control \
  --thing-id 10299402 \
  --service device_attribute_set_service \
  --input '{"ColorTemperature": 8}'

# With command cache (10 minutes)
python scripts/xlink_api.py device-control \
  --thing-id 10299402 \
  --service device_attribute_set_service \
  --input '{"Brightness": 100}' \
  --ttl 600

Control Response Codes:

CodeDescription
200✅ Success - device responded
202⏸️ Device offline - command not sent
408⚠️ Connection closed - device sleeping
503❌ Control failed

Python API

import sys
sys.path.insert(0, "scripts")
from xlink_api import XlinkIoTClient

# Initialize (reads from environment variables)
client = XlinkIoTClient()

# Device overview
overview = client.get_device_overview(project_id="ab582")

# Device list
devices = client.get_device_list(limit=50)

# Alert statistics
alerts = client.get_alert_statistics(interval="hour")

# Event instances
events = client.get_event_instances(status=[1], limit=20)

# Device control
result = client.control_device(
    thing_id="10299402",
    service="device_attribute_set_service",
    input_params={"PowerSwitch": True}
)

Detailed Documentation

Complete CLI command reference, parameter descriptions, and API documentation:


Error Handling

StatusDescriptionSolution
401 UnauthorizedInvalid credentialsCheck App ID/Secret
403 ForbiddenAccess deniedVerify Group ID and permissions
404 Not FoundResource not foundCheck endpoint path or resource ID
429 Too Many RequestsRate limitedImplement exponential backoff retry
500 Server ErrorServer errorRetry later

Best Practices

  1. Use pagination - For large datasets, use --offset and --limit
  2. Filter early - Apply filters (status, device, time) to reduce data transfer
  3. Cache results - Device status changes infrequently; cache for 30-60 seconds
  4. Handle rate limits - Implement exponential backoff for 429 errors
  5. JSON output for scripting - Use --json for programmatic parsing
  6. Debug mode - Use --debug for troubleshooting

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

86.58%
按下载量换算1,132

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills