ReferenceHTTP API
automationControl
The automationControl router: 4 methods of the automation-control capability, with tier, scope, input and output.
Capability automation-control · scope device · mode singleton · source packages/types/src/capabilities/automation-control.cap.ts:35.
Every method is called at /trpc/automationControl.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
enable | mutation | admin | admin only | no |
disable | mutation | admin | admin only | no |
trigger | mutation | admin | admin only | no |
automationControl.getStatus
- Kind: query —
GET /trpc/automationControl.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityautomation-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=automationControl.getStatuson your hub
Input
{ deviceId: number }Output
AutomationControlStatusSchemaShapes: AutomationControlStatusSchema
automationControl.enable
- Kind: mutation —
POST /trpc/automationControl.enable - 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=automationControl.enableon your hub
Input
{ deviceId: number }Output
voidautomationControl.disable
- Kind: mutation —
POST /trpc/automationControl.disable - 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=automationControl.disableon your hub
Input
{ deviceId: number }Output
voidautomationControl.trigger
- Kind: mutation —
POST /trpc/automationControl.trigger - 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=automationControl.triggeron your hub
Input
{ deviceId: number; skipCondition?: boolean }Output
void