Skip to main content

User-Node mapping

about

In ESP RainMaker, claiming is performed first upon the node's initial contact with the RainMaker Cloud, followed by user-node mapping.

  • Claiming registers the device with the cloud and assigns it a unique Node ID, but it does not link the device to any user.
  • Before the devices under a node can be monitored and controlled remotely, the node must first be mapped to a user to ensure that only the specific user has access permissions.
  • This user-node mapping process can only be performed using the ESP RainMaker phone app or CLI, as they drive the workflow for assigning the node to a user.

User-Node mapping Workflow

host-driven


  1. During Wi-Fi provisioning, the client sends the User ID and a randomly generated secret key to the node using BLE. The node will then send its Node ID back to the client.

  2. The client will then send the node ID and a secret key to the RainMaker Cloud over a secure and logged-in session and the RainMaker Cloud will send back a request ID to the client.

    Why is the User ID not sent from the client to the RainMaker Cloud?

    User ID is not sent as it is extracted by the Cloud from the session information as the request happens in a logged-in session, where the cloud already knows who is making the request, avoiding extra data transfer and reduce security risks.

  3. The node will also sends the Node ID, User ID, and Secret Key to the RainMaker Cloud over secure MQTT.

    info

    Step 2 and Step 3 can occur in reversed order without affecting the workflow.

  4. The client will then quey Rainmaker cloud for the status of the request based on the given request ID. There are three types of responses based on its request status:

    StatusDescription
    ConfirmedIf the RainMaker Cloud gets the same information from both the client and the node, the mapping is considered successful.
    Timed OutIf one minute has passed since the request was made, but no matching information was received from the other end, a time-out is triggered.
    RequestedMapping is still in progress. Keep checking.

tip
  • To know more about the node side communication on Step 3 of the workflow, please click here
  • To know more about the client side communication, please click here

On this page