← 返回
未分类 中文

Control Usb Relay

Control USB relay modules with on/off switching, state tracking, and automation support.
控制USB继电器模块,支持开关切换、状态追踪与自动化。
lj-hao lj-hao 来源
未分类 clawhub v1.0.2 1 版本 99776.3 Key: 无需
★ 0
Stars
📥 446
下载
💾 0
安装
1
版本
#latest

概述

When to Use

User wants to control a USB relay module to switch devices on/off or automate based on sensor input.

Core Rules

  1. Verify Hardware First — Confirm relay is at /dev/ttyUSB1 and user is in dialout group.
  1. Always Initialize — Call relay.connect() before any control. Wait 500ms for connection.
  1. Use Correct Protocol — ON: A0 01 01 A2, OFF: A0 01 00 A1. Different modules may use different protocols.
  1. State May Driftget_status() tracks last command. May differ if manual override occurred.
  1. 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

EndpointPurpose
-------------------
/dev/ttyUSB1Serial control

Quick Reference

TopicFile
-------------
Setup & examplessetup.md
Troubleshootingsetup.md

Security Notes

  • Physical device control — confirm with user before switching
  • Some relays need external 5V/12V power supply

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-30 16:02 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

Web Auto Analyzer

lj-hao
自动使用 Lighthouse 分析网站性能指标和审计问题
★ 0 📥 585
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,598
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 181,725