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 IoT Device Integration.

Start Session

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

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

📘

Note

To subscribe to a topic, enter the unique device ID and environment in the topic path. The environment was supplied to the device during device pairing.

Message body:

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

Parameter

Description

Format

context

A unique string representing the session. The context is passed back to BioT with every measurement message.

String

state

Indicates if the session should start or stop.

String
Possible values: SESSION_ACTIVE / SESSION_IDLE

_requiredMeasurementIntervalMilliseconds

The minimal time between measurements in milliseconds.

Integer

UsageCustomAttributes

Other 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.


Did this page help you?