ReferenceHTTP API
schedulers
The schedulers router: 10 methods of the schedulers capability, with tier, scope, input and output.
Capability schedulers · scope system · mode singleton · source packages/types/src/capabilities/schedulers.cap.ts:25.
Every method is called at /trpc/schedulers.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
list | query | admin | admin only | no |
get | query | admin | admin only | no |
create | mutation | admin | admin only | no |
update | mutation | admin | admin only | no |
delete | mutation | admin | admin only | no |
setEnabled | mutation | admin | admin only | no |
preview | query | admin | admin only | no |
conflicts | query | admin | admin only | no |
getStatus | query | admin | admin only | no |
getTraces | query | admin | admin only | no |
schedulers.list
- Kind: query —
GET /trpc/schedulers.list - 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=schedulers.liston your hub
Input
{}Output
({ name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "any"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "not"; child: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: { kind: "sub-class"; className: string } } | { macro: "person"; label?: { kind: "identity"; identityId: string; name: string } } | { macro: "vehicle"; label?: { kind: "sub-class"; className: string } | { kind: "plate"; text: string } } | { macro: "package"; label?: { kind: "sub-class"; className: string } } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: { kind: "sub-class"; className: string } } | { macro: "person"; label?: { kind: "identity"; identityId: string; name: string } } | { macro: "vehicle"; label?: { kind: "sub-class"; className: string } | { kind: "plate"; text: string } } | { macro: "package"; label?: { kind: "sub-class"; className: string } } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: { kind: "sub-class"; className: string } } | { macro: "person"; label?: { kind: "identity"; identityId: string; name: string } } | { macro: "vehicle"; label?: { kind: "sub-class"; className: string } | { kind: "plate"; text: string } } | { macro: "package"; label?: { kind: "sub-class"; className: string } } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; to: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number } }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; priority?: number = 0; maxLateMs?: number = 600000; profiles: ({ id: string; name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "any"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "not"; child: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; points: ({ id: string; at: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; mode: "edge" | "hold" | "release"; steps?: ({ kind: "wait"; enabled?: boolean; seconds: number; if?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; else?: ({…} | {…})[] } | { kind: "command"; enabled?: boolean; target: {…} | {…} | {…}; actionId: string; args?: Record<string, unknown>; argUnits?: Record<string, string>; onFor?: {…}; if?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; else?: ({…} | {…})[] })[] = []; conditions?: { kind: "all"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "any"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "not"; child: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; override?: { mode: "respect" } | { mode: "reassert"; graceMs: number }; maxHoldAttempts?: number })[] })[]; tags?: string[]; tagIds?: string[]; id: string; createdAt: number; updatedAt: number })[]Shapes: EventVocabularyKindSchema
schedulers.get
- Kind: query —
GET /trpc/schedulers.get - 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=schedulers.geton your hub
Input
{ schedulerId: string }Output
{ scheduler: { name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "any"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "not"; child: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; priority?: number = 0; maxLateMs?: number = 600000; profiles: ({ id: string; name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "any"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "not"; child: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; points: ({ id: string; at: {…} | {…} | {…} | {…}; mode: "edge" | "hold" | "release"; steps?: ({…} | {…})[] = []; conditions?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; override?: {…} | {…}; maxHoldAttempts?: number })[] })[]; tags?: string[]; tagIds?: string[]; id: string; createdAt: number; updatedAt: number } | null }Shapes: EventVocabularyKindSchema
schedulers.create
- Kind: mutation —
POST /trpc/schedulers.create - 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=schedulers.createon your hub
Input
{ scheduler: { name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "any"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "not"; child: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; priority?: number = 0; maxLateMs?: number = 600000; profiles: ({ id: string; name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "any"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "not"; child: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; points: ({ id: string; at: {…} | {…} | {…} | {…}; mode: "edge" | "hold" | "release"; steps?: ({…} | {…})[] = []; conditions?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; override?: {…} | {…}; maxHoldAttempts?: number })[] })[]; tags?: string[]; tagIds?: string[] } }Output
{ scheduler: { name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "any"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "not"; child: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; priority?: number = 0; maxLateMs?: number = 600000; profiles: ({ id: string; name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "any"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "not"; child: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; points: ({ id: string; at: {…} | {…} | {…} | {…}; mode: "edge" | "hold" | "release"; steps?: ({…} | {…})[] = []; conditions?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; override?: {…} | {…}; maxHoldAttempts?: number })[] })[]; tags?: string[]; tagIds?: string[]; id: string; createdAt: number; updatedAt: number } }Shapes: EventVocabularyKindSchema
schedulers.update
- Kind: mutation —
POST /trpc/schedulers.update - 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=schedulers.updateon your hub
Input
{ schedulerId: string; scheduler: { name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "any"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "not"; child: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; priority?: number = 0; maxLateMs?: number = 600000; profiles: ({ id: string; name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "any"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "not"; child: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; points: ({ id: string; at: {…} | {…} | {…} | {…}; mode: "edge" | "hold" | "release"; steps?: ({…} | {…})[] = []; conditions?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; override?: {…} | {…}; maxHoldAttempts?: number })[] })[]; tags?: string[]; tagIds?: string[] } }Output
{ scheduler: { name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "any"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "not"; child: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; priority?: number = 0; maxLateMs?: number = 600000; profiles: ({ id: string; name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "any"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "not"; child: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; points: ({ id: string; at: {…} | {…} | {…} | {…}; mode: "edge" | "hold" | "release"; steps?: ({…} | {…})[] = []; conditions?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; override?: {…} | {…}; maxHoldAttempts?: number })[] })[]; tags?: string[]; tagIds?: string[]; id: string; createdAt: number; updatedAt: number } }Shapes: EventVocabularyKindSchema
schedulers.delete
- Kind: mutation —
POST /trpc/schedulers.delete - 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=schedulers.deleteon your hub
Input
{ schedulerId: string }Output
voidschedulers.setEnabled
- Kind: mutation —
POST /trpc/schedulers.setEnabled - 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=schedulers.setEnabledon your hub
Input
{ schedulerId: string; profileId?: string; enabled: boolean }Output
{ scheduler: { name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "any"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "not"; child: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; priority?: number = 0; maxLateMs?: number = 600000; profiles: ({ id: string; name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "any"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "not"; child: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; points: ({ id: string; at: {…} | {…} | {…} | {…}; mode: "edge" | "hold" | "release"; steps?: ({…} | {…})[] = []; conditions?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; override?: {…} | {…}; maxHoldAttempts?: number })[] })[]; tags?: string[]; tagIds?: string[]; id: string; createdAt: number; updatedAt: number } }Shapes: EventVocabularyKindSchema
schedulers.preview
- Kind: query —
GET /trpc/schedulers.preview - 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=schedulers.previewon your hub
Input
{ schedulerId: string; date?: string }Output
{ schedulerId: string; date: string; timeZone: string; idleReason: string | null; profileId: string | null; points: ({ pointId: string; mode: "edge" | "hold" | "release"; at: number | null; until: number | null; stepCount: number })[] }schedulers.conflicts
- Kind: query —
GET /trpc/schedulers.conflicts - 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=schedulers.conflictson your hub
Input
{ scheduler: { name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "any"; children: ({ kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] })[] } | { kind: "not"; child: { kind: "all"; children: self[] } | { kind: "any"; children: self[] } | { kind: "not"; child: self } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] } } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: { ms: number; mode: "held" | "stable"; tolerance?: number }; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: ({ path: string; equals: string | number | boolean })[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: { kind: "clock"; hh: number; mm: number } | { kind: "sun"; event: "sunrise" | "sunset" | "dawn" | "dusk"; offsetMin: number } | { kind: "date"; local: string } | { kind: "phase"; phase: "day" | "night"; offsetMin: number }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | { value: number; unit: string }; unit?: string; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({ macro: "animal"; label?: {…} } | { macro: "person"; label?: {…} } | { macro: "vehicle"; label?: {…} | {…} } | { macro: "package"; label?: {…} } | { macro: "other"; className: string })[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, { kind?: "field"; sourceKey: string; cap: string; fieldPath: string } | { kind: "literal"; value: string | number | boolean | null } | { kind: "global"; sourceStableId: string; addonId?: string; cap: string; fieldPath: string }>; for?: { ms: number; mode: "held" | "stable"; tolerance?: number } } | { between?: { from: {…} | {…} | {…} | {…}; to: {…} | {…} | {…} | {…} }; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; priority?: number = 0; maxLateMs?: number = 600000; profiles: ({ id: string; name: string; enabled?: boolean = true; activeWhen?: { kind: "all"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "any"; children: ({…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…})[] } | { kind: "not"; child: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} } | { kind: "device-becomes"; id?: string; deviceId: number; cap: string; fieldPath: string; becomes?: string | number | boolean; operator?: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between" | "outside"; value?: number | string | boolean | number[]; for?: {…}; edge?: boolean; forMs?: number; debounceMs?: number } | { kind: "device-event"; id?: string; category: string; deviceId?: number } | { kind: "device-fired"; id?: string; deviceId: number; eventIds?: string[]; sourceIds?: string[]; kinds?: EventVocabularyKindSchema[]; match?: {…}[] } | { kind: "device-fault-raised"; id?: string; deviceId: number; codes: string[] } | { kind: "schedule"; id?: string; at?: {…} | {…} | {…} | {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; cron?: string } | { kind: "manual"; id?: string } | { kind: "interval"; id?: string; minutes: number } | { kind: "detection"; id?: string; subjects: ({…} | {…} | {…} | {…} | {…})[]; deviceIds: number[]; zones?: string[]; minScore?: number } | { kind: "stationary"; id?: string; deviceIds: number[]; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; phase: "appeared" | "departed" } | { kind: "device-is"; deviceId: number; cap: string; fieldPath: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "in"; value: string | number | boolean | (string | number)[] | {…}; unit?: string; for?: {…} } | { kind: "device-fault-is"; deviceId: number; codes: string[] } | { kind: "stationary-present"; deviceId: number; subjects?: ({…} | {…} | {…} | {…} | {…})[]; zones?: string[]; minCount?: number } | { kind: "expression"; expr: string; bindings: Record<string, {…} | {…} | {…}>; for?: {…} } | { between?: {…}; days?: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; preset?: "day" | "night"; kind: "time-is" } | { kind: "triggered-by"; leafIds: string[] }; days: ("mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun")[]; points: ({ id: string; at: {…} | {…} | {…} | {…}; mode: "edge" | "hold" | "release"; steps?: ({…} | {…})[] = []; conditions?: {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…} | {…}; override?: {…} | {…}; maxHoldAttempts?: number })[] })[]; tags?: string[]; tagIds?: string[] }; schedulerId?: string }Output
{ conflicts: ({ deviceId: number; cap: string; field: string; mine: { profileId: string; pointId: string; value: string | number | boolean; priority: number }; other: { schedulerId: string; schedulerName: string; profileId: string; pointId: string; value: string | number | boolean; priority: number }; fromMinute: number; toMinute: number; winner: "mine" | "other" | "tie" })[] }Shapes: EventVocabularyKindSchema
schedulers.getStatus
- Kind: query —
GET /trpc/schedulers.getStatus - 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=schedulers.getStatuson your hub
Input
{}Output
({ schedulerId: string; profileId: string | null; hold: { pointId: string; until: number; suspendedInactive: boolean; targets: ({ deviceId: number; cap: string; field: string; status: "pending" | "held" | "suspended-manual" | "gave-up" | "overridden"; attempts: number })[] } | null })[]schedulers.getTraces
- Kind: query —
GET /trpc/schedulers.getTraces - 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=schedulers.getTraceson your hub
Input
{ schedulerId: string }Output
{ traces: ({ runId: string; startedAt: number; endedAt: number; trigger: { kind: string; path?: string; outcome: "pass" | "fail"; reason: string; vars: Record<string, string | number | boolean | null | (string | number)[]>; hold?: { phase: "pending" | "cancelled" | "fired" | "reseeded"; ms: number; mode: "held" | "stable"; since?: number; deadline?: number } }; conditions: ({ path: string; kind: "all" | "any" | "not" | "condition" | "device-is" | "device-fault-is" | "expression" | "stationary-present" | "time-is" | "triggered-by" | "device-becomes" | "device-event" | "device-fired" | "device-fault-raised" | "schedule" | "interval" | "manual" | "detection" | "stationary"; outcome: "pass" | "fail" | "not-evaluated"; reason: string; deviceId?: number; cap?: string; fieldPath?: string; operator?: string; expected?: string | number | boolean | null | (string | number)[]; observed?: string | number | boolean | null | (string | number)[] })[]; verdict?: { mode: { mode: "single" } | { mode: "restart" } | { mode: "queued"; max: number } | { mode: "parallel"; max: number } | { mode: "cooldown"; minutes: number }; decision: "run" | "queued" | "restart" | "drop" | "cooldown" | "bypass"; reason: string }; steps: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: ({ deviceId: number; outcome: "ok" | "error"; message?: string })[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; else?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string })[]; branch?: string; branchChecks?: ({ condition: "true" | "false" | "unknown"; conditionReason?: string })[]; iterations?: number; steps?: ({ path: string; kind: string; cap?: string; method?: string; actionId?: string; deviceId?: number; devices?: {…}[]; startedAt?: number; endedAt?: number; args?: Record<string, string | number | boolean | null | (string | number)[]>; templates?: string[]; attempts?: number; lastAttempt?: string; condition?: "true" | "false" | "unknown"; conditionReason?: string; outcome: "ok" | "error" | "not-run" | "empty" | "skipped" | "failed-continued" | "timed-out"; message?: string; branch?: string; branchChecks?: {…}[]; iterations?: number; steps?: {…}[] })[] })[]; outcome: "ran" | "skipped-trigger" | "skipped-conditions" | "skipped-cooldown" | "skipped-overlap" | "failed" | "aborted"; repeat: number; lastAt: number; scheduler?: "done" | "missed" | "inactive" | "condition-false" | "failed" | "held" | "gave-up" | "overridden" | "suspended-manual"; error?: string })[] }