deviceAdoption
The deviceAdoption router: 8 methods of the device-adoption capability, with tier, scope, input and output.
Capability device-adoption · scope system · mode collection · source packages/types/src/capabilities/device-adoption.cap.ts:359.
Every method is called at /trpc/deviceAdoption.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | no |
listCandidateFilters | query | admin | admin only | no |
listCandidates | query | admin | admin only | no |
getCandidate | query | admin | admin only | no |
refresh | mutation | admin | admin only | no |
adopt | mutation | admin | admin only | no |
release | mutation | admin | admin only | no |
resync | mutation | admin | admin only | no |
deviceAdoption.getStatus
- Kind: query —
GET /trpc/deviceAdoption.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilitydevice-adoption, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=deviceAdoption.getStatuson your hub
Input
{ deviceId: number }Output
AdoptionStatusSchemaShapes: AdoptionStatusSchema
deviceAdoption.listCandidateFilters
- Kind: query —
GET /trpc/deviceAdoption.listCandidateFilters - 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=deviceAdoption.listCandidateFilterson your hub
Input
{ integrationId: string }Output
{ filters: AdoptionFilterSchema[] }Shapes: AdoptionFilterSchema
deviceAdoption.listCandidates
- Kind: query —
GET /trpc/deviceAdoption.listCandidates - 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=deviceAdoption.listCandidateson your hub
Input
AdoptionListCandidatesInputSchemaOutput
AdoptionListCandidatesOutputSchemaShapes: AdoptionListCandidatesInputSchema · AdoptionListCandidatesOutputSchema
deviceAdoption.getCandidate
- Kind: query —
GET /trpc/deviceAdoption.getCandidate - 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=deviceAdoption.getCandidateon your hub
Input
AdoptionGetCandidateInputSchemaOutput
{ childNativeId: string; name: string; type: "camera" | "light" | "siren" | "switch" | "sensor" | "climate" | "button" | "event-emitter" | "update" | "generic" | "notifier" | "script" | "automation" | "lock" | "cover" | "valve" | "humidifier" | "water-heater" | "fan" | "media-player" | "alarm-panel" | "control" | "presence" | "weather" | "weather-station" | "vacuum" | "lawn-mower" | "container" | "image" | "pet-feeder" | "pet-fountain" | "dishwasher" | "washer" | "dryer" | "gateway" | "heat-pump" | "vehicle" | "energy-system" | "workload"; status: DiscoveredChildStatusSchema; metadata?: { model?: string; serialNumber?: string; uid?: string; mac?: string; rtspChannel?: number; isBattery?: boolean; isDoorbell?: boolean; isMultifocal?: boolean; externalLocation?: string; manufacturer?: string; integration?: string } = {}; alreadyAdopted: boolean; adoptedDeviceId: number | null; capabilities?: string[]; features?: string[]; sourceInfo?: { id: string; system: string; uniqueId?: string; quantity?: "temperature" | "pressure" | "speed" | "precipitation" | "precipitation-rate" | "length" | "area" | "illuminance" | "irradiance" | "power" | "energy" | "voltage" | "current" | "apparent-power" | "humidity" | "percentage" | "concentration-volume" | "concentration-mass" | "concentration-ppb" | "volume" | "price-per-volume" | "duration" | "duration-ms" | "information" | "sound-level" | "signal-level" | "signal-ratio" | "frequency" | "colour-temperature" | "angle" | "bitrate" | "rate" | "mass" | "index" | "ratio" | "count" | "none" | "device"; dateTimeShape?: "date" | "time" | "datetime"; raw?: Record<string, unknown> }; children?: self[]; parentStableId?: string } | nullShapes: AdoptionGetCandidateInputSchema · DiscoveredChildStatusSchema
deviceAdoption.refresh
- Kind: mutation —
POST /trpc/deviceAdoption.refresh - 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=deviceAdoption.refreshon your hub
Input
{ integrationId: string }Output
AdoptionStatusSchemaShapes: AdoptionStatusSchema
deviceAdoption.adopt
- Kind: mutation —
POST /trpc/deviceAdoption.adopt - 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=deviceAdoption.adopton your hub
Input
AdoptionAdoptInputSchemaOutput
AdoptionAdoptResultSchemaShapes: AdoptionAdoptInputSchema · AdoptionAdoptResultSchema
deviceAdoption.release
- Kind: mutation —
POST /trpc/deviceAdoption.release - 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=deviceAdoption.releaseon your hub
Input
AdoptionReleaseInputSchemaOutput
voidShapes: AdoptionReleaseInputSchema
deviceAdoption.resync
- Kind: mutation —
POST /trpc/deviceAdoption.resync - 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=deviceAdoption.resyncon your hub
Input
{ camDeviceId: number; resetToSource?: boolean }Output
{ changed: boolean; rebuiltChildren: number; removedChildren?: number }