ReferenceHTTP API
remote
The remote router: 6 methods of the remote capability, with tier, scope, input and output.
Capability remote · scope system · mode singleton · source packages/types/src/capabilities/remote.cap.ts:149.
Every method is called at /trpc/remote.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getConfig | query | admin | admin only | no |
setConfig | mutation | admin | admin only | no |
listCommands | query | protected | view | no |
sendCommand | mutation | protected | create | no |
getAssumedStatus | query | protected | view | no |
sendMediaCommand | mutation | protected | create | no |
remote.getConfig
- Kind: query —
GET /trpc/remote.getConfig - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=remote.getConfigon your hub
Input
{ deviceId: number }Output
{ layoutTemplateId: string | null; defaultTransmitterId?: number | null = null; bindings: Record<string, { action: { kind: "cap"; deviceId: number; cap: string; method: string; args?: Record<string, unknown>; argUnits?: Record<string, string> } }>; customButtons: ({ key: string; name: string })[]; sources?: ({ id: string; name: string; kind: "digits"; number: string } | { id: string; name: string; kind: "sequence"; steps: string[] } | { id: string; name: string; kind: "ir"; transmitterId?: number; payload: { kind: "raw"; timings: number[]; settings?: { carrierHz?: number; dutyCyclePercent?: number; repeat?: number; repeatDelayMs?: number } } | { kind: "pronto"; code: string } | { kind: "native"; format: "tuya"; code: string } })[] = []; stepDelayMs?: number = 500; refusedSources?: ({ index: number; id: string | null; name: string | null; reason: string })[] }remote.setConfig
- Kind: mutation —
POST /trpc/remote.setConfig - Tier: admin — an administrator; a viewer only as the Viewer line says; never a scoped token
- Token scope: none — the admin tier needs an administrator (a
*token or an admin session) - Viewer: no
- Try it: open
/system/api-explorer?method=remote.setConfigon your hub
Input
{ deviceId: number; config: { layoutTemplateId: string | null; defaultTransmitterId?: number | null = null; bindings: Record<string, { action: { kind: "cap"; deviceId: number; cap: string; method: string; args?: Record<string, unknown>; argUnits?: Record<string, string> } }>; customButtons: ({ key: string; name: string })[]; sources?: ({ id: string; name: string; kind: "digits"; number: string } | { id: string; name: string; kind: "sequence"; steps: string[] } | { id: string; name: string; kind: "ir"; transmitterId?: number; payload: { kind: "raw"; timings: number[]; settings?: {…} } | { kind: "pronto"; code: string } | { kind: "native"; format: "tuya"; code: string } })[] = []; stepDelayMs?: number = 500; refusedSources?: ({ index: number; id: string | null; name: string | null; reason: string })[] } }Output
RemoteSetConfigResultSchemaShapes: RemoteSetConfigResultSchema
remote.listCommands
- Kind: query —
GET /trpc/remote.listCommands - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityremote, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=remote.listCommandson your hub
Input
{ deviceId: number }Output
RemoteCommandListSchemaShapes: RemoteCommandListSchema
remote.sendCommand
- Kind: mutation —
POST /trpc/remote.sendCommand - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityremote, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=remote.sendCommandon your hub
Input
{ deviceId: number; role: string; repeat?: number = 1 }Output
RemoteSendResultSchemaShapes: RemoteSendResultSchema
remote.getAssumedStatus
- Kind: query —
GET /trpc/remote.getAssumedStatus - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityremote, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=remote.getAssumedStatuson your hub
Input
{ deviceId: number }Output
MediaPlayerStatusSchema | nullShapes: MediaPlayerStatusSchema
remote.sendMediaCommand
- Kind: mutation —
POST /trpc/remote.sendMediaCommand - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityremote, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=remote.sendMediaCommandon your hub
Input
{ deviceId: number; command: RemoteMediaCommandSchema; muted?: boolean; source?: string; mediaType?: string; mediaId?: string; repeat?: number = 1 }Output
RemoteMediaCommandResultSchemaShapes: RemoteMediaCommandSchema · RemoteMediaCommandResultSchema