This is a Viam module for Otis's family of elevators. THis module provides a gateway to receiving status updates and sending out requests for various interactions.
This otis-elevators module is particularly useful in applications that require an Otis elevator to be operated in conjunction with other robots or technical systems offered by the Viam Platform and/or separate through custom code.
Note
Before configuring the Otis elevator, you must add a machine.
Navigate to the CONFIGURE tab of your machine’s page in the Viam app. Click the + icon next to your machine part in the left-hand menu and select Component. Select the sensor
or generic
type, then search for and select the sensor / otis-elevator
or generic / otis-elevator
model. Click Add module, then enter a name or use the suggested name for your arm and click Create.
On the new component panel, copy and paste the following attribute template into your component's attributes field:
{
"client_id": "<STRING>",
"client_secret": "<STRING>",
"group_id": "<STRING>",
"installation_id": "<STRING>",
"log_level": "<BOOL>"
}
Edit the attributes as applicable.
Note
For more information, see Configure a Machine.
The following attributes are available:
Name | Type | Inclusion | Description |
---|---|---|---|
client_id |
string | Required | The client API id provided by Otis in order to get an access token. |
client_secret |
string | Required | The client API secret provided by Otis to get an access token. |
group_id |
string | Required | The group id that corresponds to the desired group of elevators. |
installation_id |
string | Required | The installation id that corresponds to the desired installation location. |
log_level |
bool | Optional | A bool that, if true, will log all responses and requests made to the Otis API (via SocketIO). Default is false. |
passive |
bool | Optional | A bool that, if false, will enable commands to be sent to the elevator. Default is false. |
exception_timeout |
bool | Optional | The time that a command will be held for while waiting for a possible exception to a given command. Default is 0.5 second. |
{
"sendCarCall": {
"groupId": 1,
"machineId": 123,
"floor": 5,
"side": "FRONT",
"deck": "TOP",
"type": "STANDARD"
}
}
An example of using this module to test out the codebase can be found in the tests
folder.