Connect to a Lobby
1. Authenticate
Retrieve your API key and Lobby ID from the LiftAuth Dashboard. Use this API Key and Lobby ID to authenticate your websocket connection.
2. Establish Connection
To connect to the lobby server via WebSocket:
- Pass the
lobbyIdas a query parameter in the connection URL. - Include the API key in the
Authorizationheader.
The WebSocket connection will close automatically in 30 minutes. Be sure to finish up your session before then.
3. Enable Robot Mode (optional)
Before sending any lobby control commands, you can optionally enable robot mode to take exclusive control of the lobby operations. Exclusive control means that only your robot can take the lift that has been reserved. Other passengers (human or robot) will not be able to use this lift.
{ "requestId": "req000", "command": "ROBOT_MODE_ON", "parameters": {"reservedLiftId": "lift1"} }
Note that you must wait for the ROBOT_MODE_ENABLED message first. For more information, please refer to the command page.
Keep in mind that this step is optional. Only enable it if you need your robot's elevator journey to be uninterrupted. Otherwise, you can proceed to the next step.
4. Send Commands
Once robot mode is enabled, you can begin to send commands to control the lift. The commands are documented in detail here.
To get you started, we have set up a public test lobby for you to run operations on.
We will simulate the workflow of a robot travelling from one floor to another.
Remember to disable robot mode when your workflow is complete by sending the ROBOT_MODE_OFF command to release lobby control if you enabled it in step 3.
All floors are indexed starting from 0, regardless of how the floors are labeled in the actual lift.
Mapping real-world floor labels: For example, [B2, B1, G, 1, 2] in a real lift would be mapped to [0, 1, 2, 3, 4] in our system.
Best Practices
- Disable Robot Mode When Done: If you have enabled robot mode, always send
ROBOT_MODE_OFFto release lobby control when your workflow is complete. - Reconnect on Failure: If the WebSocket connection is lost, ensure your fleet manager can reconnect automatically and re-enable robot mode if needed.
- Handle Errors Gracefully: Design your system to manage error codes and retry failed operations where appropriate.
- Monitor Lift Status: Periodically poll the lift's position and door status to ensure smooth coordination between your robots and the lift.
- Optimize Command Timing: Avoid sending excessive commands. Let the lobby system manage its queue efficiently.
Support
For further assistance, please contact our support team at hello@liftauth.com.