Access this instance at HomeyAPIV2.devkit
.
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> |
getAppStdOut
(async) getAppStdOut(opts): Promise.<any>Scopes
homey.app.readonly
HTTP
GET /api/manager/devkit/std/:session
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
session
|
string | |
|
Returns
Promise.<any>
getAppUsage
(async) getAppUsage(): Promise.<any>Scopes
homey.app.readonly
HTTP
GET /api/manager/devkit/usage
Returns
Promise.<any>
getUsbMode
(async) getUsbMode(): Promise.<any>Scopes
homey.system
HTTP
GET /api/manager/devkit/usb/
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 |
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 |
runApp
(async) runApp(opts): Promise.<any>Scopes
homey.app
HTTP
POST /api/manager/devkit/
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
purgeSettings
|
string | |
env
|
string | |
debug
|
string | |
app
|
string | |
|
Returns
Promise.<any>
setUsbMode
(async) setUsbMode(opts): Promise.<any>Scopes
homey.system
HTTP
PUT /api/manager/devkit/usb/
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
os
|
string | |
|
Returns
Promise.<any>
startLedringAnimation
(async) startLedringAnimation(opts): Promise.<any>Scopes
homey.app
HTTP
POST /api/manager/devkit/ledring
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
animation
|
* | |
|
Returns
Promise.<any>
stopApp
(async) stopApp(opts): Promise.<any>Scopes
homey.app
HTTP
DELETE /api/manager/devkit/:session
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
session
|
string | |
|
Returns
Promise.<any>
stopLedringAnimation
(async) stopLedringAnimation(opts): Promise.<any>Scopes
homey.app
HTTP
DELETE /api/manager/devkit/ledring
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
animation_id
|
string | |
|
Returns
Promise.<any>