Dominevo
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.

MethodKindTierToken scopeViewer
getConfigqueryadminadmin onlyno
setConfigmutationadminadmin onlyno
listCommandsqueryprotectedviewno
sendCommandmutationprotectedcreateno
getAssumedStatusqueryprotectedviewno
sendMediaCommandmutationprotectedcreateno

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.getConfig on 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.setConfig on 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

RemoteSetConfigResultSchema

Shapes: RemoteSetConfigResultSchema

remote.listCommands

  • Kind: query — GET /trpc/remote.listCommands
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability remote, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=remote.listCommands on your hub

Input

{ deviceId: number }

Output

RemoteCommandListSchema

Shapes: RemoteCommandListSchema

remote.sendCommand

  • Kind: mutation — POST /trpc/remote.sendCommand
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability remote, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=remote.sendCommand on your hub

Input

{ deviceId: number; role: string; repeat?: number = 1 }

Output

RemoteSendResultSchema

Shapes: RemoteSendResultSchema

remote.getAssumedStatus

  • Kind: query — GET /trpc/remote.getAssumedStatus
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability remote, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=remote.getAssumedStatus on your hub

Input

{ deviceId: number }

Output

MediaPlayerStatusSchema | null

Shapes: MediaPlayerStatusSchema

remote.sendMediaCommand

  • Kind: mutation — POST /trpc/remote.sendMediaCommand
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability remote, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=remote.sendMediaCommand on your hub

Input

{ deviceId: number; command: RemoteMediaCommandSchema; muted?: boolean; source?: string; mediaType?: string; mediaId?: string; repeat?: number = 1 }

Output

RemoteMediaCommandResultSchema

Shapes: RemoteMediaCommandSchema · RemoteMediaCommandResultSchema