Contract implemented by every transport (built-in or custom). The delegatedTransportHandler drives a transport purely through this interface, so custom transports (BLE, WebSocket, proprietary) are interchangeable with the built-in local/cloud transports.

interface ESPTransportInterface {
    getParams(
        payload: Record<string, any>,
        nodeRef?: ESPRMNeoNode,
    ): Promise<Record<string, any>>;
    setParam(
        payload: Record<string, any>,
        nodeRef?: ESPRMNeoNode,
    ): Promise<ESPAPIResponse>;
}

Implemented by

Methods

  • Gets parameters from the node.

    Parameters

    • payload: Record<string, any>

      { node_id } identifying the node to read.

    • OptionalnodeRef: ESPRMNeoNode

      Optional reference to the node instance.

    Returns Promise<Record<string, any>>

    A promise resolving to the node's parameters.

  • Sets parameters on the node.

    Parameters

    • payload: Record<string, any>

      { node_id, payload } where payload is the { <deviceOrServiceId>: { <paramId>: value } } map to apply.

    • OptionalnodeRef: ESPRMNeoNode

      Optional reference to the node instance (custom transports may use it to read config/metadata).

    Returns Promise<ESPAPIResponse>

    A promise resolving to the API response.