/install control-usb-relay
When to Use
User wants to control a USB relay module to switch devices on/off or automate based on sensor input.
Core Rules
-
Verify Hardware First — Confirm relay is at
/dev/ttyUSB1and user is indialoutgroup. -
Always Initialize — Call
relay.connect()before any control. Wait 500ms for connection. -
Use Correct Protocol — ON:
A0 01 01 A2, OFF:A0 01 00 A1. Different modules may use different protocols. -
State May Drift —
get_status()tracks last command. May differ if manual override occurred. -
Disconnect on Exit — Always call
relay.disconnect()to release serial port.
Data Storage
No persistent storage. Relay state tracked in memory during session only.
External Endpoints
| Endpoint | Purpose |
|---|---|
/dev/ttyUSB1 |
Serial control |
Quick Reference
| Topic | File |
|---|---|
| Setup & examples | setup.md |
| Troubleshooting | setup.md |
Security Notes
- Physical device control — confirm with user before switching
- Some relays need external 5V/12V power supply
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install control-usb-relay - After installation, invoke the skill by name or use
/control-usb-relay - Provide required inputs per the skill's parameter spec and get structured output
What is Control Usb Relay?
Control USB relay modules with on/off switching, state tracking, and automation support. It is an AI Agent Skill for Claude Code / OpenClaw, with 184 downloads so far.
How do I install Control Usb Relay?
Run "/install control-usb-relay" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Control Usb Relay free?
Yes, Control Usb Relay is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Control Usb Relay support?
Control Usb Relay is cross-platform and runs anywhere OpenClaw / Claude Code is available (linux).
Who created Control Usb Relay?
It is built and maintained by jiahaoli (@lj-hao); the current version is v1.0.2.