Start a Remote Session

BioT sends Start and Stop messages to the device to indicate that a user has requested remote control usage of the device. During the session, the device is expected to send measurements and optionally perform other additional tasks.
Each Usage Type has a unique name that appears in the topic name used to communicate with the device about this type of usage.

📘

Note

The clientId in the following topics is configured in the device during the activation stage. See Direct Device Connection.

Start Session

To start a session, the device needs to listen to the following topic:

$aws/things/<clientId>/shadow/name/<usageName>/update/delta

Message body:

{
    "state": {
        "delta": {
          "metadata": {
               "context": "VVVJRHMgb2YgcGFpZW5kSWQgYW5kIHNlc3Npb25JZA==",
             "state": "SESSION_ACTIVE"
       },
          "data": {
               "_requiredMeasurementIntervalMilliseconds": 1000,
               <UsageCustomAttributes>
         }
      }
   }
}
ParameterDescriptionFormat
contextA unique string representing the session. The context is passed back to BioT with every measurement message.String
stateIndicates if the session should start or stop.String
Possible values: SESSION_ACTIVE / SESSION_IDLE
_requiredMeasurementIntervalMillisecondsThe minimal time between measurements in milliseconds.Integer
UsageCustomAttributesOther custom attributes defined in BioT console for this usage session type.key: value
Example:
"algo1": true,
"feature1": false

To acknowledge, send an ACK message to the following topic:

$aws/things/<clientId>/shadow/name/<usageName>/update

ACK Message structure (note the “reported” section):

{
    "state": {
        "reported": {
          "metadata": {
             "context": "VVVJRHMgb2YgcGFpZW5kSWQgYW5kIHNlc3Npb25JZA==",
                "state": "SESSION_ACTIVE"
       },
          "data": {
               "_requiredMeasurementIntervalMilliseconds": 1000,
               <UsageCustomAttributes>
         }
      }
   }
}

The ACK message will include all the parameters sent in the start session message.


What’s Next