← 返回 Skills 市场
ctz168

Iot Bridge

作者 SamAI.cc · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
17
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install iot-bridge
功能描述
Bridge IoT devices to the cloud via aitun tunnel. Expose local MQTT brokers, device dashboards, or HTTP APIs so remote devices and services can connect, repo...
使用说明 (SKILL.md)

IoT Bridge - Connect IoT Devices via Aitun Tunnel

When to Use

Use this skill when:

  • You have IoT devices on a local network that need to be accessible from the internet
  • You want to expose a local MQTT broker or IoT gateway for remote device connections
  • You need to access a local IoT dashboard (Home Assistant, Node-RED, Grafana) remotely
  • You want to bridge local sensors or actuators to a cloud platform for data aggregation
  • You need to test IoT integrations where the device or service is behind NAT/firewall

Do NOT use this skill when:

  • The IoT platform is already cloud-hosted and publicly accessible
  • You only need local device-to-device communication (no tunnel needed)
  • You want to share a static file (use sendfile instead)

Instructions

Step 1: Install aitun

pip install aitun

Or verify it is already installed:

which aitun || pip show aitun

Step 2: Start the local IoT service

Start the IoT service you want to expose. Examples:

# Home Assistant
hass --config /path/to/config &

# Node-RED
node-red --port 8080 &

# Mosquitto MQTT broker
mosquitto -p 1883 -v &

# Custom IoT HTTP API / dashboard
python3 -m http.server 8080 --directory /path/to/dashboard &

# Grafana dashboard
grafana-server --homepath /usr/share/grafana &

Step 3: Create a tunnel

For HTTP-based services (dashboards, REST APIs):

aitun -p 8080 &
AITUN_PID=$!
sleep 3

For TCP-based services (MQTT broker on port 1883, use with auth token):

aitun -p 1883 --tcp-ports 1883 -k YOUR_TOKEN &
AITUN_PID=$!
sleep 3

The output will contain the public URL, e.g.:

  • https://aitun.cc/abc123 (HTTP)
  • TCP forwarding address for MQTT

Step 4: Share the IoT endpoint

Your IoT service is now accessible at: https://aitun.cc/abc123

- Dashboard: open in browser
- API endpoint: use for device data upload
- MQTT broker: connect via TCP forwarding

This tunnel expires in 24 hours.
For a permanent endpoint, register at https://aitun.cc

Step 5: Connect remote devices or services

Configure remote IoT devices or cloud services to use the tunnel URL:

  • HTTP devices: Set the reporting URL to https://aitun.cc/abc123/api/data
  • Cloud platforms: Configure the webhook or data source URL to the tunnel address
  • MQTT devices: Connect to the TCP-forwarded MQTT broker address
  • Dashboard users: Open the URL in a browser to view live data

Step 6: Clean up

When done, stop the tunnel and services:

kill $AITUN_PID 2>/dev/null

CLI Reference

The aitun command (installed via pip install aitun) accepts these flags:

Flag Description
-p PORT Local service port (default: 8080)
-k TOKEN Auth token for registered subdomain (omit for free tunnel)
--host HOST Local service address (default: localhost)
--tcp-ports PORTS TCP forwarding ports, comma-separated (e.g., 22,3306; requires -k)
--p2p Enable P2P direct connection (default: enabled)
--no-p2p Disable P2P, force server relay mode
--daemon Run as background daemon
--stop Stop running daemon

Notes

  • Free tunnels use proxy address mode (path-based URL like aitun.cc/abc123), NOT subdomains
  • Free tunnels expire after 24 hours, auto-renewed on restart
  • For a permanent IoT endpoint, register at https://aitun.cc to get a custom subdomain
  • TCP forwarding (for MQTT, Modbus, etc.) requires a registered account and -k token
  • Use --tcp-ports to forward multiple TCP ports: --tcp-ports 1883,5683,502
  • For security, enable authentication on your IoT services before exposing them
  • All traffic is encrypted end-to-end
  • P2P mode reduces latency for real-time device communication
  • Consider rate limiting for high-frequency sensor data
安全使用建议
Before using this skill, make sure any exposed IoT dashboard, broker, or API has strong authentication, TLS where applicable, least-privilege network binding, and logging. Avoid exposing admin, debug, default-password, or unauthenticated services, and remember that a third-party tunnel can make local device data and controls reachable from the internet.
能力标签
crypto
能力评估
Purpose & Capability
The stated purpose is to bridge local IoT devices, MQTT brokers, dashboards, and HTTP APIs to the cloud via Aitun; the public exposure risk is inherent to that purpose and is disclosed.
Instruction Scope
The instructions are user-directed setup steps for installing Aitun, starting local services, creating a tunnel, sharing the endpoint, and cleaning up. They include only limited security guidance, so users need to apply their own access controls before exposing services.
Install Mechanism
The artifact declares a uv install of the aitun package and requires python3; no install-time script, bundled executable, or hidden behavior is present in the artifact.
Credentials
Exposing MQTT, Home Assistant, Node-RED, Grafana, Modbus, or custom APIs can be high impact, but that authority is proportionate to the skill's advertised IoT tunneling purpose and is initiated by the user.
Persistence & Privilege
The skill does not show privilege escalation, credential harvesting, persistent background agents beyond optional tunnel daemon usage, or automatic long-running behavior without user action.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install iot-bridge
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /iot-bridge 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of iot-bridge skill. - Allows users to bridge IoT devices to the cloud via aitun tunnel. - Supports exposing local MQTT brokers, HTTP APIs, and dashboards for remote access. - Provides step-by-step setup instructions, including installation, tunnel creation, and endpoint sharing. - Supports both HTTP and TCP (e.g., MQTT, Modbus) tunneling, with token-based authentication for advanced features. - Includes security, usage notes, and CLI reference.
元数据
Slug iot-bridge
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Iot Bridge 是什么?

Bridge IoT devices to the cloud via aitun tunnel. Expose local MQTT brokers, device dashboards, or HTTP APIs so remote devices and services can connect, repo... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 17 次。

如何安装 Iot Bridge?

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

Iot Bridge 是免费的吗?

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

Iot Bridge 支持哪些平台?

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

谁开发了 Iot Bridge?

由 SamAI.cc(@ctz168)开发并维护,当前版本 v1.0.0。

💬 留言讨论