Install
openclaw skills install @ctz168/iot-bridgeBridge IoT devices to the cloud via aitun tunnel. Expose local MQTT brokers, device dashboards, or HTTP APIs so remote devices and services can connect, report data, and receive commands.
openclaw skills install @ctz168/iot-bridgeUse this skill when:
Do NOT use this skill when:
pip install aitun
Or install via one-line script (Linux/macOS):
curl -fsSL https://aitun.cc/install.sh | bash
Windows (PowerShell):
irm https://aitun.cc/install.ps1 | iex
Or verify it is already installed:
which aitun
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 &
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 -k YOUR_TOKEN --tcp-ports 1883 &
AITUN_PID=$!
sleep 3
The output will contain the public URL, e.g.:
https://aitun.cc/abc123 (HTTP)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
Configure remote IoT devices or cloud services to use the tunnel URL:
https://aitun.cc/abc123/api/dataWhen done, stop the tunnel and services:
kill $AITUN_PID 2>/dev/null
The aitun command (installed via pip install aitun, or alternatively curl -fsSL https://aitun.cc/install.sh | bash / irm https://aitun.cc/install.ps1 | iex on Windows) accepts these flags:
| Flag | Description |
|---|---|
-p PORT | Local HTTP service port (optional; omit for TCP-only mode with --tcp-ports) |
-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). Use without -p for TCP-only mode |
--p2p | Enable P2P direct connection (default: enabled) |
--no-p2p | Disable P2P, force server relay mode |
--daemon | Run as background daemon |
--stop | Stop running daemon |
aitun.cc/abc123), NOT subdomains-k token--tcp-ports to forward multiple TCP ports: --tcp-ports 1883,5683,502