Access this instance at HomeyAPIV2.rf
.
Extends
Instance Properties
homey
homey: HomeyAPIV3uri
uri: StringThe URI of the Item, e.g. homey:manager:bar
.
Type
- String
Instance Methods
addListener
addListener(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
connect
(async) connect(): Promise.<void>Connect to this manager's Socket.io namespace.
Returns
Promise.<void>
destroy
destroy()Destroy this Manager by cleaning up all references, unbinding event listeners and disconnecting from the Socket.io namespace.
disconnect
(async) disconnect(): Promise.<void>Disconnect from this manager's Socket.io namespace.
Returns
Promise.<void>
emit
emit(event, …data)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
data
|
any
<repeatable> |
emulate
(async) emulate(opts): Promise.<any>Scopes
homey.system
HTTP
POST /api/manager/rf/:frequency/emulate
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
frequency
|
string
<optional> |
|
data
|
*
<optional> |
|
|
Returns
Promise.<any>
isConnected
isConnected(): BooleanIf this manager's namespace is connected to Socket.io.
Returns
Boolean
off
off(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
on
on(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
once
once(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
record
(async) record(opts): Promise.<any>Scopes
homey.system
HTTP
POST /api/manager/rf/record
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
frequency
|
string
<optional> |
|
timeout
|
number
<optional> |
|
|
Returns
Promise.<any>
removeAllListeners
removeAllListeners(eventopt)Parameters
Name | Type | Description |
---|---|---|
event
|
string
<optional> |
removeListener
removeListener(event, callback)Shortcut to EventEmitter#off
Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
txInfraredProntohex
(async) txInfraredProntohex(opts): Promise.<any>Scopes
homey.system
HTTP
POST /api/manager/rf/ir/prontohex
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
repetitions
|
number
<optional> |
|
payload
|
string
<optional> |
|
|
Returns
Promise.<any>