Access this instance at HomeyAPIV2.apps
.
Extends
Classes
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
destroy
destroy()Destroy this Manager by cleaning up all references, unbinding event listeners and disconnecting from the Socket.io namespace.
disableApp
(async) disableApp(opts): Promise.<any>Scopes
homey.app
HTTP
PUT /api/manager/apps/app/:id/disable
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
disconnect
(async) disconnect(): Promise.<void>Disconnect from this manager's Socket.io namespace.
Returns
emit
emit(event, …data)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
data
|
any
<repeatable> |
enableApp
(async) enableApp(opts): Promise.<any>Scopes
homey.app
HTTP
PUT /api/manager/apps/app/:id/enable
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
garbageCollectApp
(async) garbageCollectApp(opts): Promise.<any>Scopes
homey.app
HTTP
POST /api/manager/apps/app/:id/gc
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
getApp
(async) getApp(opts): Promise.<HomeyAPIV2.ManagerApps.App>Scopes
homey.app.readonly
HTTP
GET /api/manager/apps/app/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
getAppLocales
(async) getAppLocales(opts): Promise.<any>Scopes
homey.app.readonly
HTTP
GET /api/manager/apps/app/:id/locale
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
getAppSetting
(async) getAppSetting(opts): Promise.<any>Scopes
homey.app.control
HTTP
GET /api/manager/apps/app/:id/setting/:name
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
name
|
string | |
id
|
string | |
|
Returns
getAppSettings
(async) getAppSettings(opts): Promise.<any>Scopes
homey.app.control
HTTP
GET /api/manager/apps/app/:id/setting
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
getAppStd
(async) getAppStd(opts): Promise.<any>Scopes
homey.app.readonly
HTTP
POST /api/manager/apps/app/:id/crashlog
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
message
|
string
<optional> |
|
|
Returns
getApps
(async) getApps(): Promise.<Object.<string, HomeyAPIV2.ManagerApps.App>>Scopes
homey.app.readonly
HTTP
GET /api/manager/apps/app
Returns
installFromAppStore
(async) installFromAppStore(opts): Promise.<any>Scopes
homey.app
HTTP
POST /api/manager/apps/store/
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
channel
|
string
<optional> |
|
id
|
string | |
|
Returns
isConnected
isConnected(): BooleanIf this manager's namespace is connected to Socket.io.
Returns
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 |
restartApp
(async) restartApp(opts): Promise.<any>Scopes
homey.app
HTTP
POST /api/manager/apps/app/:id/restart
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
setAppSetting
(async) setAppSetting(opts): Promise.<any>Scopes
homey.app.control
HTTP
PUT /api/manager/apps/app/:id/setting/:name
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
name
|
string | |
id
|
string | |
value
|
* | |
|
Returns
uninstallApp
(async) uninstallApp(opts): Promise.<any>Scopes
homey.app
HTTP
DELETE /api/manager/apps/app/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
purgeSettings
|
string
<optional> |
|
|
Returns
unsetAppSetting
(async) unsetAppSetting(opts): Promise.<any>Scopes
homey.app.control
HTTP
DELETE /api/manager/apps/app/:id/setting/:name
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
name
|
string | |
id
|
string | |
|
Returns
updateApp
(async) updateApp(opts): Promise.<HomeyAPIV2.ManagerApps.App>Scopes
homey.app
HTTP
PUT /api/manager/apps/app/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
app
|
* | |
|
Returns
Events
app.create
.on('app.create')Parameters
Name | Type | Description |
---|---|---|
app
|
HomeyAPIV2.ManagerApps.App |
app.delete
.on('app.delete')Parameters
Name | Type | Description |
---|---|---|
app
|
HomeyAPIV2.ManagerApps.App |
app.update
.on('app.update')Parameters
Name | Type | Description |
---|---|---|
app
|
HomeyAPIV2.ManagerApps.App |