Interface Status

Device statuses are typically states, sensor data etc that can change at any time. There are two ways to get status info:

  1. Query them (get)
  2. Subscribe to them (on). In this case you will be notified whenever a status changes. Note: Only a few statuses actually support notifications.

Hierarchy

  • Status

Properties

Properties

get: ((deviceId, path, allowEmpty?) => Promise<string | number | DataObject>)

Type declaration

    • (deviceId, path, allowEmpty?): Promise<string | number | DataObject>
    • allowEmpty: if set to true, returns empty array if path was not found, otherwise it throws error. Typically useful when working with dynamic lists.

      Parameters

      • deviceId: string
      • path: string
      • Optional allowEmpty: boolean

      Returns Promise<string | number | DataObject>

on: ((path, listener) => void)

Type declaration

    • (path, listener): void
    • Parameters

      Returns void

Generated using TypeDoc