Access this instance at HomeyAPIV2.insights
.
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
deleteLog
(async) deleteLog(opts)Scopes
homey.insights
HTTP
DELETE /api/manager/insights/log/:uri/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
uri
|
string | |
|
deleteLogEntries
(async) deleteLogEntries(opts): Promise.<any>Scopes
homey.insights
HTTP
DELETE /api/manager/insights/log/:uri/:id/entry
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
uri
|
string | |
|
Returns
deleteLogs
(async) deleteLogs(): Promise.<any>Scopes
homey.insights
HTTP
DELETE /api/manager/insights/log/
Returns
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
emit
emit(event, …data)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
data
|
any
<repeatable> |
getLog
(async) getLog(opts): Promise.<HomeyAPIV2.ManagerInsights.Log>Scopes
homey.insights.readonly
HTTP
GET /api/manager/insights/log/:uri/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
uri
|
string | |
|
Returns
getLogEntries
(async) getLogEntries(opts): Promise.<any>Scopes
homey.insights.readonly
HTTP
GET /api/manager/insights/log/:uri/:id/entry
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
uri
|
string | |
resolution
|
string
<optional> |
|
|
Returns
getLogs
(async) getLogs(): Promise.<Object.<string, HomeyAPIV2.ManagerInsights.Log>>Scopes
homey.insights.readonly
HTTP
GET /api/manager/insights/log/
Returns
getStorageInfo
(async) getStorageInfo(): Promise.<any>Scopes
homey.insights.readonly
HTTP
GET /api/manager/insights/storage
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 |
updateLog
(async) updateLog(opts): Promise.<HomeyAPIV2.ManagerInsights.Log>Scopes
homey.insights
HTTP
PUT /api/manager/insights/log/:uri/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
uri
|
string | |
log
|
* | |
|
Returns
Events
log.create
.on('log.create')Parameters
Name | Type | Description |
---|---|---|
log
|
HomeyAPIV2.ManagerInsights.Log |
log.delete
.on('log.delete')Parameters
Name | Type | Description |
---|---|---|
log
|
HomeyAPIV2.ManagerInsights.Log |
log.update
.on('log.update')Parameters
Name | Type | Description |
---|---|---|
log
|
HomeyAPIV2.ManagerInsights.Log |