Local control adapter interface for node communication over LAN.

interface ESPLocalControlAdapterInterface {
    connect(
        nodeId: string,
        baseUrl: string,
        securtiyType: number,
        pop?: string,
        username?: string,
        options?: ESPLocalControlSessionOptions,
    ): Promise<Record<string, unknown>>;
    isConnected(nodeId: string): Promise<boolean>;
    sendData(nodeId: string, path: string, data: string): Promise<string>;
}

Methods

  • Connects to the node with local control parameters.

    Parameters

    • nodeId: string
    • baseUrl: string
    • securtiyType: number
    • Optionalpop: string
    • Optionalusername: string
    • Optionaloptions: ESPLocalControlSessionOptions

      Session endpoints for the protocol in use. Omitted only by callers that want the adapter's built-in default paths.

    Returns Promise<Record<string, unknown>>

  • Checks if the node is connected.

    Parameters

    • nodeId: string

    Returns Promise<boolean>

  • Sends data to the specified path on the node.

    Parameters

    • nodeId: string
    • path: string
    • data: string

    Returns Promise<string>