Properties

config: any

The device config.

name: string

The name of the device.

The device state.

type: string

The type of the device.

Events

  • Registers a callback which will be triggered when the device encounters an error.

    Parameters

    • callback: ((error: Error) => void)

      The callback which will be called once the device encountered an error.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns EventSubscription

Methods

  • Returns a promise which is fulfilled when the device is started.

    Returns Promise<any>

  • Parameters

    • error: string

    Returns void

  • Returns void

  • Sends a replyable message to the website, returns the response when it has been received.

    Parameters

    • message: string
    • Optional payload: unknown

    Returns Promise<unknown>

  • Sends a message to the website without waiting for any reply.

    Parameters

    • message: string
    • Optional payload: unknown

    Returns void

  • Starts the device when needed and returns a promise which is fulfilled when the device is started.

    Returns Promise<any>

  • Stops the device.

    Returns Promise<any>

Generated using TypeDoc