ping_pong
Animates a single relay output bouncing back and forth between start and end circuits, creating a ping-pong effect. Sends all commands in one call with configurable delay and round trips.
Instructions
单灯 ping-pong 弹跳动画:从起始回路到终止回路的单个灯来回跑动效果。每次只亮一路,像乒乓球一样弹跳。内部连续发送多条 SET_RELAY_MASK 指令(fire-and-forget),一次调用完成全部动画。起始和结束自动全部断开,适配 TCP 透传设备(含 V4/V5)。最后自动读取状态确认终点位置。参数:address=设备地址, start=起始回路(默认1), end=终止回路(默认8), count=来回次数(默认1), delay=帧间隔秒数(默认0.1)。对应自然语言:跑马灯、ping-pong、来回弹跳、弹弹球。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | 终止回路号 (1-16),默认 8。不能小于起始回路。 | |
| count | No | 来回次数,默认 1 次(1→end→1 算一次往返)。 | |
| delay | No | 每帧间隔(秒),默认 0.1(100ms)。0.3 = 300ms 间隔。最小强制 50ms 防止 TCP 透传桥溢出。 | |
| start | No | 起始回路号 (1-16),默认 1。例如 1-8 的 ping-pong 从 1 开始。 | |
| address | No | 设备地址/机器号 (1-254),即机器地址。可通过 scan_devices 自动发现,或用 list_devices 查看已注册设备。255为广播地址。 |