Connection
Connect
pb connect <device_code>
Establish a WebSocket connection to a device. This starts a background daemon process that maintains the connection.
| Parameter | Type | Required | Description |
|---|---|---|---|
device_code | string | Yes | Device code (e.g., IDY291LX6WW6RCW) |
TIP
You must connect to a device before using input, screen, file, and app commands. The connection is maintained by a background daemon process.
Example:
bash
pb connect IDY291LX6WW6RCWtext
✓ Connected to device: IDY291LX6WW6RCWjson
{
"code": 200,
"data": null,
"msg": "Connected to device: IDY291LX6WW6RCW"
}Disconnect
pb disconnect [device_id]
Disconnect from a device. Without arguments, disconnects all active connections.
| Parameter | Type | Required | Description |
|---|---|---|---|
device_id | string | No | Device ID to disconnect. Omit to disconnect all |
Example:
bash
# Disconnect from a specific device
pb disconnect IDY291LX6WW6RCW
# Disconnect all
pb disconnect