ManagerInsights

Access this instance at HomeyAPIV2.insights.

Extends

Classes

Instance Properties

homey

homey: HomeyAPIV3

The Homey of the Manager.

Type

uri

uri: String

The 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>

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

Promise.<any>

deleteLogs

(async) deleteLogs(): Promise.<any>

Scopes

homey.insights

HTTP

DELETE /api/manager/insights/log/

Returns

Promise.<any>

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>

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

Promise.<any>

getLogs

(async) getLogs(): Promise.<Object.<string, HomeyAPIV2.ManagerInsights.Log>>

Scopes

homey.insights.readonly

HTTP

GET /api/manager/insights/log/

Returns

Promise.<Object.<string, HomeyAPIV2.ManagerInsights.Log>>

getStorageInfo

(async) getStorageInfo(): Promise.<any>

Scopes

homey.insights.readonly

HTTP

GET /api/manager/insights/storage

Returns

Promise.<any>

isConnected

isConnected(): Boolean

If 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(event)

Parameters

Name Type Description
event
string

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