Skip to main content

Get Lift Position

The GET_LIFT_POSITION command retrieves the current status of the lift, including its floor position and whether it is in motion. This command provides real-time insights but is served on a best-effort basis depending on system availability.


WebSocket API

Command

  • Command: GET_LIFT_POSITION

Parameters

| Parameter | Type | Required | Description |

ParameterTypeRequiredDescription
commandStringYesGET_LIFT_POSITION
requestIdStringYesUnique identifier for the request
parameters.liftIdStringYesThe ID of the lift to query

Response

FieldTypeDescription
requestIdStringMatches the ID in the original request
statusStringStatus of the request only (success or error).
codeStringResponse code (e.g., GET_LIFT_POSITION_OK)
messageStringDescriptive message about the response
info.currentFloorIntegerThe current floor the lift is on
info.isMovingBooleanIndicates whether the lift is in motion

Example Request

{
"requestId": "a1b2c3d9",
"command": "GET_LIFT_POSITION",
"parameters": {
"liftId": "lift1"
}
}

Expected Response

  • On Success:
{
"requestId": "a1b2c3d9",
"status": "success",
"code": "GET_LIFT_POSITION_OK",
"message": "Lift position retrieved successfully",
"info": {
"isMoving": false,
"currentFloor": 1
}
}
  • On Error:
{
"requestId": "a1b2c3d9",
"status": "error",
"code": "ERROR_NOT_FOUND",
"message": "The specified lift ID does not exist."
}