Actions
Timers
7 actions in the Timers group. Each is its own JSON-RPC method, and also runs through action.run.
timer.startStart timer
Starts a Timer, or carries on from where it was paused. A countdown that's done starts again from its starting time.
Parameters
The Timer source, by id or name. Give its id or name.
Result
sourcestring (uuid)alwaysThe Timer's id.
timerTimeralwaysThe Timer after it.
Fields of
timerduration_msintegeralwaysIts starting time, in ms.
ends_at_msintegeralwayscan be nullA running countdown: when it reaches zero (Unix ms); null otherwise.
finishedbooleanalwaysA countdown that reached zero.
runningbooleanalwaysIt's counting.
started_at_msintegeralwayscan be nullA running stopwatch: the moment it counts from (Unix ms); null otherwise.
textstringalwaysWhat it shows now ("1:04:59", or its words for zero once a countdown is done).
value_msintegeralwaysThe time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.
Live state
sources.items[source].timer object
The Timer: what it shows (text), whether it's running, the time it holds (value_ms) and, running, when a countdown ends (ends_at_ms) or a stopwatch started (started_at_ms). From the sources topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "timer.start",
"params": {
"source": "<source id or name>"
}
}In the SDKs
Task<TimerStartResult> TimerStartAsync(TimerStartParams parameters, CancellationToken cancellationToken = default)timerStart(params: TimerStartParams): Promise<TimerStartResult>async def timer_start(self, *, source: str) -> TimerStartResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer source, by id or name. Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [
"source"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer's id.",
"format": "uuid",
"type": "string"
},
"timer": {
"additionalProperties": false,
"description": "The Timer after it.",
"properties": {
"duration_ms": {
"description": "Its starting time, in ms.",
"type": "integer"
},
"ends_at_ms": {
"description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"finished": {
"description": "A countdown that reached zero.",
"type": "boolean"
},
"mode": {
"enum": [
"countdown",
"count_up"
],
"title": "TimerMode",
"type": "string"
},
"running": {
"description": "It's counting.",
"type": "boolean"
},
"started_at_ms": {
"description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"text": {
"description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
"type": "string"
},
"value_ms": {
"description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
"type": "integer"
}
},
"required": [
"mode",
"text",
"running",
"finished",
"value_ms",
"duration_ms",
"ends_at_ms",
"started_at_ms"
],
"title": "Timer",
"type": "object"
}
},
"required": [
"source",
"timer"
],
"type": "object"
}
}timer.pausePause timer
Stops a Timer where it is.
Parameters
The Timer source, by id or name. Give its id or name.
Result
sourcestring (uuid)alwaysThe Timer's id.
timerTimeralwaysThe Timer after it.
Fields of
timerduration_msintegeralwaysIts starting time, in ms.
ends_at_msintegeralwayscan be nullA running countdown: when it reaches zero (Unix ms); null otherwise.
finishedbooleanalwaysA countdown that reached zero.
runningbooleanalwaysIt's counting.
started_at_msintegeralwayscan be nullA running stopwatch: the moment it counts from (Unix ms); null otherwise.
textstringalwaysWhat it shows now ("1:04:59", or its words for zero once a countdown is done).
value_msintegeralwaysThe time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.
Live state
sources.items[source].timer object
The Timer as it is now. From the sources topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "timer.pause",
"params": {
"source": "<source id or name>"
}
}In the SDKs
Task<TimerPauseResult> TimerPauseAsync(TimerPauseParams parameters, CancellationToken cancellationToken = default)timerPause(params: TimerPauseParams): Promise<TimerPauseResult>async def timer_pause(self, *, source: str) -> TimerPauseResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer source, by id or name. Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [
"source"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer's id.",
"format": "uuid",
"type": "string"
},
"timer": {
"additionalProperties": false,
"description": "The Timer after it.",
"properties": {
"duration_ms": {
"description": "Its starting time, in ms.",
"type": "integer"
},
"ends_at_ms": {
"description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"finished": {
"description": "A countdown that reached zero.",
"type": "boolean"
},
"mode": {
"enum": [
"countdown",
"count_up"
],
"title": "TimerMode",
"type": "string"
},
"running": {
"description": "It's counting.",
"type": "boolean"
},
"started_at_ms": {
"description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"text": {
"description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
"type": "string"
},
"value_ms": {
"description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
"type": "integer"
}
},
"required": [
"mode",
"text",
"running",
"finished",
"value_ms",
"duration_ms",
"ends_at_ms",
"started_at_ms"
],
"title": "Timer",
"type": "object"
}
},
"required": [
"source",
"timer"
],
"type": "object"
}
}timer.toggleStart or pause timer
Pauses a running Timer, starts a stopped one.
Parameters
The Timer source, by id or name. Give its id or name.
Result
sourcestring (uuid)alwaysThe Timer's id.
timerTimeralwaysThe Timer after it.
Fields of
timerduration_msintegeralwaysIts starting time, in ms.
ends_at_msintegeralwayscan be nullA running countdown: when it reaches zero (Unix ms); null otherwise.
finishedbooleanalwaysA countdown that reached zero.
runningbooleanalwaysIt's counting.
started_at_msintegeralwayscan be nullA running stopwatch: the moment it counts from (Unix ms); null otherwise.
textstringalwaysWhat it shows now ("1:04:59", or its words for zero once a countdown is done).
value_msintegeralwaysThe time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.
Live state
sources.items[source].timer object
The Timer as it is now (running: whether it's counting). From the sources topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "timer.toggle",
"params": {
"source": "<source id or name>"
}
}In the SDKs
Task<TimerToggleResult> TimerToggleAsync(TimerToggleParams parameters, CancellationToken cancellationToken = default)timerToggle(params: TimerToggleParams): Promise<TimerToggleResult>async def timer_toggle(self, *, source: str) -> TimerToggleResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer source, by id or name. Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [
"source"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer's id.",
"format": "uuid",
"type": "string"
},
"timer": {
"additionalProperties": false,
"description": "The Timer after it.",
"properties": {
"duration_ms": {
"description": "Its starting time, in ms.",
"type": "integer"
},
"ends_at_ms": {
"description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"finished": {
"description": "A countdown that reached zero.",
"type": "boolean"
},
"mode": {
"enum": [
"countdown",
"count_up"
],
"title": "TimerMode",
"type": "string"
},
"running": {
"description": "It's counting.",
"type": "boolean"
},
"started_at_ms": {
"description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"text": {
"description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
"type": "string"
},
"value_ms": {
"description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
"type": "integer"
}
},
"required": [
"mode",
"text",
"running",
"finished",
"value_ms",
"duration_ms",
"ends_at_ms",
"started_at_ms"
],
"title": "Timer",
"type": "object"
}
},
"required": [
"source",
"timer"
],
"type": "object"
}
}timer.resetReset timer
Puts a Timer back to its starting time, stopped.
Parameters
The Timer source, by id or name. Give its id or name.
Result
sourcestring (uuid)alwaysThe Timer's id.
timerTimeralwaysThe Timer after it.
Fields of
timerduration_msintegeralwaysIts starting time, in ms.
ends_at_msintegeralwayscan be nullA running countdown: when it reaches zero (Unix ms); null otherwise.
finishedbooleanalwaysA countdown that reached zero.
runningbooleanalwaysIt's counting.
started_at_msintegeralwayscan be nullA running stopwatch: the moment it counts from (Unix ms); null otherwise.
textstringalwaysWhat it shows now ("1:04:59", or its words for zero once a countdown is done).
value_msintegeralwaysThe time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.
Live state
sources.items[source].timer object
The Timer as it is now. From the sources topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "timer.reset",
"params": {
"source": "<source id or name>"
}
}In the SDKs
Task<TimerResetResult> TimerResetAsync(TimerResetParams parameters, CancellationToken cancellationToken = default)timerReset(params: TimerResetParams): Promise<TimerResetResult>async def timer_reset(self, *, source: str) -> TimerResetResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer source, by id or name. Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [
"source"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer's id.",
"format": "uuid",
"type": "string"
},
"timer": {
"additionalProperties": false,
"description": "The Timer after it.",
"properties": {
"duration_ms": {
"description": "Its starting time, in ms.",
"type": "integer"
},
"ends_at_ms": {
"description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"finished": {
"description": "A countdown that reached zero.",
"type": "boolean"
},
"mode": {
"enum": [
"countdown",
"count_up"
],
"title": "TimerMode",
"type": "string"
},
"running": {
"description": "It's counting.",
"type": "boolean"
},
"started_at_ms": {
"description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"text": {
"description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
"type": "string"
},
"value_ms": {
"description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
"type": "integer"
}
},
"required": [
"mode",
"text",
"running",
"finished",
"value_ms",
"duration_ms",
"ends_at_ms",
"started_at_ms"
],
"title": "Timer",
"type": "object"
}
},
"required": [
"source",
"timer"
],
"type": "object"
}
}timer.addAdd time
Gives a Timer more time: a countdown lasts longer (one that ran out counts down again), a stopwatch jumps ahead. Shows at once.
Parameters
The Timer source, by id or name. Give its id or name.
Hours to add.
Minutes to add (added to the hours and seconds).
Seconds to add (added to the hours and minutes). Give at least one of the three.
Result
sourcestring (uuid)alwaysThe Timer's id.
timerTimeralwaysThe Timer after it.
Fields of
timerduration_msintegeralwaysIts starting time, in ms.
ends_at_msintegeralwayscan be nullA running countdown: when it reaches zero (Unix ms); null otherwise.
finishedbooleanalwaysA countdown that reached zero.
runningbooleanalwaysIt's counting.
started_at_msintegeralwayscan be nullA running stopwatch: the moment it counts from (Unix ms); null otherwise.
textstringalwaysWhat it shows now ("1:04:59", or its words for zero once a countdown is done).
value_msintegeralwaysThe time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.
Live state
sources.items[source].timer object
The Timer as it is now. From the sources topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "timer.add",
"params": {
"source": "<source id or name>"
}
}In the SDKs
Task<TimerAddResult> TimerAddAsync(TimerAddParams parameters, CancellationToken cancellationToken = default)timerAdd(params: TimerAddParams): Promise<TimerAddResult>async def timer_add(self, *, source: str, hours: float | None = None, minutes: float | None = None, seconds: float | None = None) -> TimerAddResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"hours": {
"description": "Hours to add.",
"maximum": 10000.0,
"minimum": 0.0,
"type": "number"
},
"minutes": {
"description": "Minutes to add (added to the hours and seconds).",
"maximum": 600000.0,
"minimum": 0.0,
"type": "number"
},
"seconds": {
"description": "Seconds to add (added to the hours and minutes). Give at least one of the three.",
"maximum": 36000000.0,
"minimum": 0.0,
"type": "number"
},
"source": {
"description": "The Timer source, by id or name. Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [
"source"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer's id.",
"format": "uuid",
"type": "string"
},
"timer": {
"additionalProperties": false,
"description": "The Timer after it.",
"properties": {
"duration_ms": {
"description": "Its starting time, in ms.",
"type": "integer"
},
"ends_at_ms": {
"description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"finished": {
"description": "A countdown that reached zero.",
"type": "boolean"
},
"mode": {
"enum": [
"countdown",
"count_up"
],
"title": "TimerMode",
"type": "string"
},
"running": {
"description": "It's counting.",
"type": "boolean"
},
"started_at_ms": {
"description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"text": {
"description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
"type": "string"
},
"value_ms": {
"description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
"type": "integer"
}
},
"required": [
"mode",
"text",
"running",
"finished",
"value_ms",
"duration_ms",
"ends_at_ms",
"started_at_ms"
],
"title": "Timer",
"type": "object"
}
},
"required": [
"source",
"timer"
],
"type": "object"
}
}timer.removeRemove time
Takes time off a Timer, never below zero.
Parameters
The Timer source, by id or name. Give its id or name.
Hours to take off.
Minutes to take off (added to the hours and seconds).
Seconds to take off (added to the hours and minutes). Give at least one of the three.
Result
sourcestring (uuid)alwaysThe Timer's id.
timerTimeralwaysThe Timer after it.
Fields of
timerduration_msintegeralwaysIts starting time, in ms.
ends_at_msintegeralwayscan be nullA running countdown: when it reaches zero (Unix ms); null otherwise.
finishedbooleanalwaysA countdown that reached zero.
runningbooleanalwaysIt's counting.
started_at_msintegeralwayscan be nullA running stopwatch: the moment it counts from (Unix ms); null otherwise.
textstringalwaysWhat it shows now ("1:04:59", or its words for zero once a countdown is done).
value_msintegeralwaysThe time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.
Live state
sources.items[source].timer object
The Timer as it is now. From the sources topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "timer.remove",
"params": {
"source": "<source id or name>"
}
}In the SDKs
Task<TimerRemoveResult> TimerRemoveAsync(TimerRemoveParams parameters, CancellationToken cancellationToken = default)timerRemove(params: TimerRemoveParams): Promise<TimerRemoveResult>async def timer_remove(self, *, source: str, hours: float | None = None, minutes: float | None = None, seconds: float | None = None) -> TimerRemoveResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"hours": {
"description": "Hours to take off.",
"maximum": 10000.0,
"minimum": 0.0,
"type": "number"
},
"minutes": {
"description": "Minutes to take off (added to the hours and seconds).",
"maximum": 600000.0,
"minimum": 0.0,
"type": "number"
},
"seconds": {
"description": "Seconds to take off (added to the hours and minutes). Give at least one of the three.",
"maximum": 36000000.0,
"minimum": 0.0,
"type": "number"
},
"source": {
"description": "The Timer source, by id or name. Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [
"source"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer's id.",
"format": "uuid",
"type": "string"
},
"timer": {
"additionalProperties": false,
"description": "The Timer after it.",
"properties": {
"duration_ms": {
"description": "Its starting time, in ms.",
"type": "integer"
},
"ends_at_ms": {
"description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"finished": {
"description": "A countdown that reached zero.",
"type": "boolean"
},
"mode": {
"enum": [
"countdown",
"count_up"
],
"title": "TimerMode",
"type": "string"
},
"running": {
"description": "It's counting.",
"type": "boolean"
},
"started_at_ms": {
"description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"text": {
"description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
"type": "string"
},
"value_ms": {
"description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
"type": "integer"
}
},
"required": [
"mode",
"text",
"running",
"finished",
"value_ms",
"duration_ms",
"ends_at_ms",
"started_at_ms"
],
"title": "Timer",
"type": "object"
}
},
"required": [
"source",
"timer"
],
"type": "object"
}
}timer.setSet time
Sets a Timer to exactly this much time, running or stopped as it was.
Parameters
The Timer source, by id or name. Give its id or name.
Hours it holds.
Minutes it holds (added to the hours and seconds).
Seconds it holds (added to the hours and minutes). Give at least one of the three.
Result
sourcestring (uuid)alwaysThe Timer's id.
timerTimeralwaysThe Timer after it.
Fields of
timerduration_msintegeralwaysIts starting time, in ms.
ends_at_msintegeralwayscan be nullA running countdown: when it reaches zero (Unix ms); null otherwise.
finishedbooleanalwaysA countdown that reached zero.
runningbooleanalwaysIt's counting.
started_at_msintegeralwayscan be nullA running stopwatch: the moment it counts from (Unix ms); null otherwise.
textstringalwaysWhat it shows now ("1:04:59", or its words for zero once a countdown is done).
value_msintegeralwaysThe time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.
Live state
sources.items[source].timer object
The Timer as it is now. From the sources topic. How to read it.
{
"jsonrpc": "2.0",
"id": 1,
"method": "timer.set",
"params": {
"source": "<source id or name>"
}
}In the SDKs
Task<TimerSetResult> TimerSetAsync(TimerSetParams parameters, CancellationToken cancellationToken = default)timerSet(params: TimerSetParams): Promise<TimerSetResult>async def timer_set(self, *, source: str, hours: float | None = None, minutes: float | None = None, seconds: float | None = None) -> TimerSetResultJSON Schema
{
"params_schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"hours": {
"description": "Hours it holds.",
"maximum": 10000.0,
"minimum": 0.0,
"type": "number"
},
"minutes": {
"description": "Minutes it holds (added to the hours and seconds).",
"maximum": 600000.0,
"minimum": 0.0,
"type": "number"
},
"seconds": {
"description": "Seconds it holds (added to the hours and minutes). Give at least one of the three.",
"maximum": 36000000.0,
"minimum": 0.0,
"type": "number"
},
"source": {
"description": "The Timer source, by id or name. Give its id or name.",
"minLength": 1,
"type": "string"
}
},
"required": [
"source"
],
"type": "object"
},
"result_schema": {
"additionalProperties": false,
"properties": {
"source": {
"description": "The Timer's id.",
"format": "uuid",
"type": "string"
},
"timer": {
"additionalProperties": false,
"description": "The Timer after it.",
"properties": {
"duration_ms": {
"description": "Its starting time, in ms.",
"type": "integer"
},
"ends_at_ms": {
"description": "A running countdown: when it reaches zero (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"finished": {
"description": "A countdown that reached zero.",
"type": "boolean"
},
"mode": {
"enum": [
"countdown",
"count_up"
],
"title": "TimerMode",
"type": "string"
},
"running": {
"description": "It's counting.",
"type": "boolean"
},
"started_at_ms": {
"description": "A running stopwatch: the moment it counts from (Unix ms); null otherwise.",
"type": [
"integer",
"null"
]
},
"text": {
"description": "What it shows now (\"1:04:59\", or its words for zero once a countdown is done).",
"type": "string"
},
"value_ms": {
"description": "The time it holds now: what's left (a countdown) or how long it's run (a stopwatch), in ms.",
"type": "integer"
}
},
"required": [
"mode",
"text",
"running",
"finished",
"value_ms",
"duration_ms",
"ends_at_ms",
"started_at_ms"
],
"title": "Timer",
"type": "object"
}
},
"required": [
"source",
"timer"
],
"type": "object"
}
}
