@espressif/rainmaker-base-cdf
    Preparing search index...

    Class ESPRMNode

    Represents a user node in the system, managing its configuration and connectivity status. Implements the ESPRMNodeInterface.

    Implements

    Index

    Constructors

    Properties

    availableTransports: {} | Partial<Record<ESPTransportMode, ESPTransportConfig>>

    Available Transports with the node.

    connectivityStatus?: ESPRMConnectivityStatus

    The connectivity status of the node.

    id: string

    The unique identifier of the node.

    isPrimaryUser?: boolean

    Indicates if the node is associated with a primary user.

    metadata?: Record<string, any>

    Metadata associated with the node.

    nodeConfig?: ESPRMNodeConfig

    The configuration settings for the node.

    role?: string

    Role of user associated with the node.

    tags?: string[]

    Tags associated with the node.

    transportOrder: [] | ESPTransportMode[]

    Transport order associated with the node.

    type?: string

    The type of the node.

    Methods

    • Adds a new automation trigger for the node.

      Parameters

      Returns Promise<ESPAutomation>

      A promise that resolves to an ESPAutomation instance containing details of the newly created automation.

    • Attaches tags to the node.

      Parameters

      • tags: string[]

        An array of tags to attach to the node.

      Returns Promise<ESPAPIResponse>

      A promise that resolves to the API response.

    • Checks if there is an Over-The-Air (OTA) update available for the node.

      Returns Promise<ESPOTAUpdateResponse>

      A promise that resolves to an ESPOTAUpdateResponse object containing details about the OTA update availability.

    • Deletes the mapping of current node with user.

      Returns Promise<ESPAPIResponse>

      A promise that resolves to the API success response.

    • Returns Promise<ESPAPIResponse>

    • Retrieves a list of all automations for this node with optional pagination.

      Returns Promise<ESPPaginatedAutomationsResponse>

      A promise that resolves to a paginated response containing automation data.

    • Returns Promise<ESPRMNodeConfig>

    • Checks the status of a previously initiated Over-The-Air (OTA) update for the node.

      Parameters

      • otaJobId: string

        The ID of the OTA job for which the status is being checked.

      Returns Promise<ESPOTAUpdateStatusResponse>

      A promise that resolves to an ESPOTAUpdateStatusResponse object containing details about the OTA update status.

      If the OTA job ID is missing or invalid.

    • Fetches the services for the current node.

      Returns Promise<ESPRMService[]>

      A promise that resolves to an array of updated services.

    • Initiates an Over-The-Air (OTA) update for the node using a specified OTA job ID.

      Parameters

      • otaJobId: string

        The ID of the OTA job to be used for the update.

      Returns Promise<ESPAPIResponse>

      A promise that resolves to an ESPAPIResponse object confirming the successful initiation of the OTA update.

      If the OTA job ID is missing or invalid.

    • Remove sharing of the current node for a specified user.

      Parameters

      • username: string

        The username of the user for whom the sharing is to be removed.

      Returns Promise<ESPAPIResponse>

      A promise that resolves to a success response upon successful removal.

    • Returns Promise<ESPAPIResponse>

    • Sets multiple parameters for the node.

      Parameters

      • payload: NodePayload

        The payload containing the parameters to be set.

      Returns Promise<ESPAPIResponse>

      A promise that resolves to the API response.

    • Set the timeZone for the node.

      Parameters

      • timeZoneString: string

        The timeZone string to set.

      Returns Promise<ESPAPIResponse>

      A promise that resolves to an ESPAPIResponse indicating the success of the operation.

    • Parameters

      Returns Promise<string>

    • Create Transfer request of the current node to a specified user.

      Parameters

      • transferNodeRequestParams: TransferNodeRequest

        Parameters specifying the user and transfer options.

      Returns Promise<string>

      A promise that resolves to a requestId upon successful transfer request creation.

    • Parameters

      • metadata: Record<string, any>

      Returns Promise<ESPAPIResponse>