Constructors

Properties

advertisementData?: { [key: string]: any }[]
capabilities?: string[]
connected?: boolean
ESPProvisionAdapter: ESPProvisionAdapterInterface = ESPRMBase.ESPProvisionAdapter
name: string
security: number
transport: string
username?: string
versionInfo?: { [key: string]: any }[]

Methods

  • Disconnect the device.

    Returns Promise<void>

  • Gets the capabilities of the device.

    Returns Promise<string[]>

    A promise that resolves to an array of capabilities.

  • Gets the version info of the device.

    Returns Promise<{ [key: string]: any }>

    A promise that resolves to an object containing version info.

  • Initialize session with the device.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating whether the session was successfully initialized.

  • Initiates a user node mapping request.

    Parameters

    • requestBody: Record<string, any> = {}

      The request body for the user node mapping.

    Returns Promise<any>

    A promise that resolves to the response from the API.

  • Provisions the device with the given Wi-Fi credentials.

    Parameters

    • ssid: string

      The SSID of the Wi-Fi network.

    • passphrase: string

      The passphrase of the Wi-Fi network.

    • onProgress: (message: ESPProvResponse) => void

      A callback function to report progress.

    Returns Promise<void>

  • Sends data to the device.

    Parameters

    • endPoint: string

      The endpoint to send data to.

    • data: string

      The data to send.

    Returns Promise<string>

    A promise that resolves to the response data.

  • Sets the network credentials for the device.

    Parameters

    • ssid: string

      The SSID of the Wi-Fi network.

    • passphrase: string

      The passphrase of the Wi-Fi network.

    Returns Promise<ESPProvisionStatus>

  • Sets the proof of possession for the device.

    Parameters

    • proofOfPossession: string

      The proof of possession string.

    Returns Promise<boolean>

    A promise that resolves to a boolean indicating whether the proof of possession was successfully set.

  • Starts the assisted claiming process.

    Returns Promise<void>

  • Verifies the mapping between a user and a node.

    Parameters

    • requestBody: Record<string, any> = {}

      The request body for the user node mapping verification.

    Returns Promise<ESPAPIResponse>

    A promise that resolves to the response from the API.