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 |
| Parameter | Type | Required | Description |
|---|---|---|---|
command | String | Yes | GET_LIFT_POSITION |
requestId | String | Yes | Unique identifier for the request |
parameters.liftId | String | Yes | The ID of the lift to query |
Response
| Field | Type | Description |
|---|---|---|
requestId | String | Matches the ID in the original request |
status | String | Status of the request only (success or error). |
code | String | Response code (e.g., GET_LIFT_POSITION_OK) |
message | String | Descriptive message about the response |
info.currentFloor | Integer | The current floor the lift is on |
info.isMoving | Boolean | Indicates whether the lift is in motion |
Example Request
{"requestId": "a1b2c3d9", "command": "GET_LIFT_POSITION", "parameters": {"liftId": "lobby0_lift0"}}
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": "Lift with ID lobby0_lift5 not found"}