Install
openclaw skills install 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 iot-bridgeUse this skill when:
Do NOT use this skill when:
pip install aitun
Or verify it is already installed:
which aitun || pip show 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 -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)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) 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 |
aitun.cc/abc123), NOT subdomains-k token--tcp-ports to forward multiple TCP ports: --tcp-ports 1883,5683,502