ir-transmitter
ir-transmitter — emit a pulse train (infrared or RF) with settings.
ir-transmitter — emit a pulse train (infrared or RF) with settings. One cap for both media: everything medium-specific is a per-call setting, validated against what the transmitter declares in getInfo.
send refuses with a typed user error: ir-transmitter.offline (the transmitter cannot be reached) and ir-transmitter.too-long (more pulses than the transmitter's maxTimings). A setting the transmitter cannot apply is NOT a refusal: the train is sent and the key comes back in ignoredSettings. send takes exactly one of timings or native (a code in a format listed in getInfo.formats).
learn waits for the user to point a remote at the transmitter and refuses with ir-transmitter.learn-unsupported, ir-transmitter.learn-timeout or ir-transmitter.learn-undecodable.
At a glance
| Capability | ir-transmitter |
| Provided by | The device's own driver provides it: each device registers its own provider. |
| Active providers per device | one |
| Device types | generic |
| Source | packages/types/src/capabilities/ir-transmitter.cap.ts |
Methods
Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.
| Method | Kind | Required of a provider | Access |
|---|---|---|---|
send | mutation | yes | protected |
learn | mutation | yes | protected |
getInfo | query | yes | protected |
send
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
timings | number[] | no | |
native | { format: "tuya"; code: string } | no | |
settings | { carrierHz?: number; dutyCyclePercent?: number; repeat?: number; repeatDelayMs?: number } | no |
Output
| Field | Type | Required | Description |
|---|---|---|---|
ok | true | yes | |
ignoredSettings | string[] | yes | Settings the transmitter could not apply; the train was still sent. |
learn
mutation
Input
| Field | Type | Required | Description |
|---|---|---|---|
timeoutMs | number | no (default 20000) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
native | { format: "tuya"; code: string } | null | yes | The code in the device's own format, when it reports one. |
timings | number[] | yes | |
carrierHz | number | null | yes |
getInfo
query
Input
No fields besides deviceId.
Output
| Field | Type | Required | Description |
|---|---|---|---|
media | ("ir" | "rf")[] | yes | |
settable | ("carrierHz" | "dutyCyclePercent" | "repeat" | "repeatDelayMs")[] | yes | |
maxTimings | number | yes | |
learn | boolean | no (default false) | The transmitter can learn a code (learn). |
formats | "tuya"[] | no (default []) | Native code formats the transmitter replays verbatim (send.native). |
Runtime state
The state Dominevo keeps for each device with this capability, readable without calling the provider.
Last send and last learn, for the device card. Written by the provider on every attempt, including a typed refusal. A learn-unsupported refusal is not an attempt and is not written.
| Field | Type | Required | Description |
|---|---|---|---|
lastSend | { at: number; ok: boolean; error: string | null; medium: "ir" | "rf" } | null | yes | |
lastLearn | { at: number; ok: boolean; error: string | null } | null | yes | |
lastFetchedAt | number | yes | Ms epoch when the slice was last updated. |