You are currently viewing the Homey Apps SDK v2 documentation. New apps should use Homey Apps SDK v3 ››

Homey.SignalInfrared

const { SignalInfrared } = require('homey');

The SignalInfrared class represents an Infrared Signal

Table of Contents

Constructor

new Homey.SignalInfrared(id)

Parameters:
Name Type Description
id string

The ID of the signal, as defined in the app's app.json.

Extends

Methods

cmd(commandId, optsopt, callbackopt) → {Promise}

Transmit a command

Overrides:
Parameters:
Name Type Attributes Description
commandId string

The ID of the command, as specified in /app.json

opts object <optional>

Transmission options

Name Type Attributes Description
repetitions object <optional>

A custom amount of repetitions

callback genericCallbackFunction <optional>
Returns:
Type:
Promise

register(callbackopt) → {Promise}

Register the signal. This is a shorthand method for ManagerRF#registerSignal.

Overrides:
Parameters:
Name Type Attributes Description
callback genericCallbackFunction <optional>
Returns:
Type:
Promise

tx(frame, optsopt, callbackopt) → {Promise}

Transmit a frame

Overrides:
Parameters:
Name Type Attributes Description
frame Array

An array of word indexes

opts object <optional>

Transmission options

Name Type Attributes Description
repetitions object <optional>

A custom amount of repetitions

callback genericCallbackFunction <optional>
Returns:
Type:
Promise

unregister(callbackopt) → {Promise}

Unregister the signal. This is a shorthand method for ManagerRF#unregisterSignal.

Overrides:
Parameters:
Name Type Attributes Description
callback genericCallbackFunction <optional>
Returns:
Type:
Promise