返回顶部
o

omada-viewerOmada查看器

Read-only diagnostics for TP-Link Omada SDN controllers via the Open API. Use when inspecting Omada devices, clients, VLANs, LAN networks, WAN status, router ports, switch ports, DHCP ranges, port forwards, or general controller/network health. Requires user-provided Omada Open API credentials and HTTPS access to the user's controller. Best for troubleshooting and inventory, not config changes.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
95
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

omada-viewer

Omada Viewer

通过 Open API 对 TP-Link Omada SDN 控制器进行只读诊断。

功能说明

使用此技能可检查:

  • - 设备
  • 客户端
  • VLAN / LAN 网络
  • WAN 状态
  • 路由器端口
  • 交换机端口
  • DHCP 范围
  • 端口转发
  • 控制器常规健康状态

不支持的操

  • - 进行配置更改
  • 创建、编辑或删除控制器设置
  • 正常使用需要管理员角色

前提条件

此技能确实需要

  • - 可通过 HTTPS 访问的 Omada 控制器
  • 在 Omada 中用户创建的 Open API 应用程序
  • 用户提供的该 API 应用的凭据

推荐角色:

  • - 查看者

必需配置:

  • - OMADAURL
  • OMADACLIENTID
  • OMADACLIENT_SECRET

可选配置:

  • - OMADAOMADACID
  • OMADASITE
  • OMADAVERIFY_SSL

快速设置

  1. 1. 在 Omada 中,进入:
- 设置 > 平台集成 > Open API
  1. 2. 在以下位置创建应用程序:
- 客户端模式
  1. 3. 优先选择此权限级别:
- 查看者
  1. 4. 将凭据存储在本地,而非聊天中

常用命令

bash
python scripts/omada_query.py summary
python scripts/omada_query.py clients
python scripts/omada_query.py devices
python scripts/omada_query.py vlans
python scripts/omada_query.py port-forwards
python scripts/omada_query.py wan-status
python scripts/omada_query.py router-summary

身份验证

使用客户端凭据模式:

http
POST {baseurl}/openapi/authorize/token?granttype=client_credentials
Content-Type: application/json

{
omadacId: ,
clientid: id>,
clientsecret: secret>
}

成功响应返回:

  • - accessToken
  • refreshToken
  • expiresIn

按如下方式使用令牌:

http
Authorization: AccessToken=

重要提示:

  • - 以 UTF-8 无 BOM 格式发送 JSON
  • 部分本地控制器允许通过 GET /api/info 发现 omadacId

核心只读端点

以下所有站点范围路径均相对于:

text
/openapi/v1/{omadacId}/sites/{siteId}

发现

  • - GET /api/info
  • GET /openapi/v1/{omadacId}/sites?page=1&pageSize=100

设备和客户端

  • - GET /devices?page=1&pageSize=200
  • GET /devices/{deviceMac}
  • GET /clients?page=1&pageSize=200
  • GET /clients/{clientMac}

LAN / VLAN / DHCP

  • - GET /lan-networks?page=1&pageSize=50
  • GET /lan-networks/{networkId}
  • GET /networks/vlans

典型的 LAN 网络响应可能包含:

  • - VLAN ID
  • 网关子网
  • DHCP 范围
  • DNS 设置
  • 租约时间

端口转发 / NAT / 防火墙

  • - GET /nat/port-forwardings?page=1&pageSize=50
  • GET /firewall
  • GET /firewall/timeout/default
  • GET /insight/port-forwarding/{type}

网关 / WAN / 路由器端口

  • - GET /gateways/{gatewayMac}
  • GET /gateways/{gatewayMac}/ports
  • GET /gateways/{gatewayMac}/wan-status
  • GET /gateways/{gatewayMac}/lan-status
  • GET /internet/ports-config
  • GET /internet/load-balance
  • GET /internet/load-balance/status
  • GET /health/gateways/{gatewayMac}/wans/details

交换机 / AP

  • - GET /switches/{switchMac}/ports
  • GET /port-status-ports
  • GET /poe-ports
  • GET /aps/{apMac}
  • GET /aps/{apMac}/ports
  • GET /aps/{apMac}/port-vlans
  • GET /aps/{apMac}/vlan

脚本命令

使用 scripts/omada_query.py 进行快速诊断。

支持的命令:

bash
python scripts/omada_query.py sites
python scripts/omada_query.py devices
python scripts/omada_query.py clients
python scripts/omada_query.py vlans
python scripts/omada_query.py dhcp-reservations
python scripts/omada_query.py port-forwards
python scripts/omadaquery.py switch-ports mac>
python scripts/omada_query.py wan-ports
python scripts/omada_query.py wan-status
python scripts/omada_query.py router-ports
python scripts/omada_query.py router-summary
python scripts/omada_query.py summary

附带的参考文件

  • - references/api-endpoints.md — 精简端点参考
  • references/discovered-endpoints.md — 实用起始端点
  • references/all-endpoints.md — 分类端点目录
  • scripts/extract_endpoints.py — 从 OpenAPI 导出重新生成端点目录

安全注意事项

  • - 正常使用优先选择查看者角色
  • 切勿将密钥粘贴到聊天中
  • 将只读诊断与任何未来的管理/写入技能分开
  • 如果后续发布支持写入的版本,请使用单独的管理员范围 API 应用

故障排除

  • - 401 / 身份验证失败:检查客户端模式、凭据和 granttype=clientcredentials
  • 凭据无效错误:确认准确的 clientid、clientsecret 和 omadacId
  • SSL 错误:使用自签名证书的本地控制器可能需要禁用 SSL 验证
  • 缺少端点:API 覆盖范围因控制器版本、型号和启用的功能而异
  • 意外的 JSON/身份验证问题:确保请求体为 UTF-8 格式且无 BOM

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 omada-viewer-1775937323 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 omada-viewer-1775937323 技能

通过命令行安装

skillhub install omada-viewer-1775937323

下载

⬇ 下载 omada-viewer v1.0.2(免费)

文件大小: 41.02 KB | 发布时间: 2026-4-12 10:46

v1.0.2 最新 2026-4-12 10:46
- Clarified that user-provided Omada Open API credentials and HTTPS access are required.
- Improved setup and requirements instructions for easier onboarding.
- Reorganized and simplified endpoint documentation for better readability.
- Emphasized security practices and the use of the Viewer role for diagnostics.
- No functional changes; documentation updates only.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large