HomeyAPI~ManagerInsights

Methods

async getLogs(optsopt) → {Promise.<Array.<HomeyAPI.ManagerInsights.Log>>}

Required OAuth scopes:
- homey.insights.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Attributes Description
filter HomeyAPI.ManagerInsights.Log <optional>
A response filter (Using a filter will bypass all caches, use sparingely)
Returns:
Promise.<Array.<HomeyAPI.ManagerInsights.Log>> - Successful response

async deleteLogs(optsopt) → {Promise.<void>}

Required OAuth scopes:
- homey.insights

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Returns:
Promise.<void> - Successful response

async getLog(optsopt) → {Promise.<HomeyAPI.ManagerInsights.Log>}

Required OAuth scopes:
- homey.insights.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
uri string
id string
Returns:
Promise.<HomeyAPI.ManagerInsights.Log> - Successful response

async updateLog(optsopt) → {Promise.<void>}

Required OAuth scopes:
- homey.insights

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
uri string
id string
log HomeyAPI.ManagerInsights.Log
Returns:
Promise.<void> - Successful response

async deleteLog(optsopt) → {Promise.<void>}

Required OAuth scopes:
- homey.insights

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
uri string
id string
Returns:
Promise.<void> - Successful response

async getLogEntries(optsopt) → {Promise.<object>}

Required OAuth scopes:
- homey.insights.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Attributes Description
uri string
id string
resolution string <optional>
The timespan to query ("lastHour" | "lastHourLowRes" | "last6Hours" | "last6HoursLowRes" | "last24Hours" | "last3Days" | "last7Days" | "last14Days" | "last31Days" | "last3Months" | "last6Months" | "last2Years" | "today" | "thisWeek" | "thisMonth" | "thisYear" | "yesterday" | "lastWeek" | "lastMonth" | "lastYear")
Returns:
Promise.<object> - Successful response

async deleteLogEntries(optsopt) → {Promise.<void>}

Required OAuth scopes:
- homey.insights

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
uri string
id string
Returns:
Promise.<void> - Successful response

async getStorageInfo(optsopt) → {Promise.<void>}

Required OAuth scopes:
- homey.insights.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Returns:
Promise.<void> - Successful response
Since:
  • 1.5.0

destroy()

Unsubscribes to realtime events, clear all caches, and remove all event listeners for this manager and it's managed objects

Events

log.create

Fired when a managed Log is created
Parameters:
Name Type Description
log HomeyAPI.ManagerInsights.Log The affected Log

log.update

Fired when a managed Log is changed
Parameters:
Name Type Description
log HomeyAPI.ManagerInsights.Log The affected Log

log.delete

Fired when a managed Log has been deleted
Parameters:
Name Type Description
log HomeyAPI.ManagerInsights.Log The affected Log

Classes

Error

Log