@qualithm/device - v0.12.2
    Preparing search index...

    Class ProvisioningServer

    The device-side soft-AP provisioning server.

    Serves the claim exchange on the device's setup network while no credential is stored, and only then: construction with an already-populated store fails at ProvisioningServer.start, and a successful claim stops the server before Device.connect opens the gateway session.

    const server = new ProvisioningServer({
    provisioningUrl: "https://api.qualithm.com",
    store,
    deviceName: "field-gateway",
    onProvisioned: () => device.connect()
    })
    await server.start()
    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get boundAddress(): { host: string; port: number } | null

      The bound listening address once started, otherwise null.

      Returns { host: string; port: number } | null

    Methods

    • Bring up the setup access point (when a controller is supplied) and start serving the claim endpoint. Resolves with the bound address.

      Returns Promise<{ host: string; port: number }>

      ProvisioningError when the device is already provisioned, the server is already running, or the access point or listener fails to start.

    • Stop serving and tear down the setup access point. Safe to call when not running. After a plain stop (no claim), start may be called again to restart onboarding.

      Returns Promise<void>