### Example HTTP Request and Response Source: https://github.com/koalazak/rest980/blob/master/README.md An example of how to call the `/api/cloud/action/clean` endpoint using an HTTP GET request and the expected success response. ```APIDOC ### Request Example ```http GET http://192.168.1.110:3000/api/cloud/action/clean ``` ### Response Example #### Success Response (200) - **status** (string) - Indicates the status of the operation. - **method** (string) - Indicates the method that was executed. ```json { "status": "OK", "method": "multipleFieldSet" } ``` ``` -------------------------------- ### Install rest980 Project Source: https://github.com/koalazak/rest980/blob/master/README.md Clone the repository, navigate to the directory, and install dependencies using npm. ```bash git clone https://github.com/koalazak/rest980.git cd rest980 npm install ``` -------------------------------- ### Cloud API Action Start Command Source: https://github.com/koalazak/rest980/blob/master/README.md Begin robot operation with a GET request to the /api/cloud/action/start endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/action/start ``` -------------------------------- ### Start Cleaning Action Source: https://github.com/koalazak/rest980/blob/master/README.md Initiates a general cleaning cycle for the robot. This is a simple GET request to the action endpoint. ```http GET http://192.168.1.110:3000/api/local/action/start ``` -------------------------------- ### Start rest980 API Server Source: https://github.com/koalazak/rest980/blob/master/README.md Start the rest980 server using npm. Debug logging can be enabled by prefixing the command with DEBUG=rest980:*. ```bash cd rest980 DEBUG=rest980:* npm start ``` -------------------------------- ### Get Configuration Source: https://github.com/koalazak/rest980/blob/master/README.md Retrieves the current configuration for a specified setting. Accessed via `/api/local/config/[configName]` using a GET request. ```APIDOC ## GET /api/local/config/{configName} ### Description Retrieves the current value of a specific configuration setting. ### Method GET ### Endpoint `/api/local/config/{configName}` ### Parameters #### Path Parameters - **configName** (string) - Required - The name of the configuration to retrieve. Available options include `ptime` (firmware 1 only), `bbrun`, `cloud`, `langs`, `week`, `time` (firmware 1 & 2), `preferences`. ### Response #### Success Response (200) - **ok** (object) - Contains the configuration details. - **id** (integer) - A unique identifier for the request. ### Request Example ```http GET http://192.168.1.110:3000/api/local/config/preferences ``` ### Response Example ```json { "ok": { "flags": 1024, "lang": 2, "timezone": "America/Buenos_Aires", "name": "myRobotName", "cleaningPreferences": { "carpetBoost": "auto", "edgeClean": true, "cleaningPasses": "1", "alwaysFinish": true } }, "id": 2 } ``` ``` -------------------------------- ### Get Preferences (Firmware 1) Source: https://github.com/koalazak/rest980/blob/master/README.md Fetches the current user preferences, including language, timezone, and cleaning settings. This is a GET request to the config preferences endpoint. ```http GET http://192.168.1.110:3000/api/local/config/preferences ``` -------------------------------- ### Success Response Example Source: https://github.com/koalazak/rest980/blob/master/README.md A typical success response from a cloud API action, indicating the operation was processed. ```json {"status":"OK","method":"multipleFieldSet"} ``` -------------------------------- ### Cloud API Action Quick Command Source: https://github.com/koalazak/rest980/blob/master/README.md Initiate a quick clean action by sending a GET request to the /api/cloud/action/quick endpoint. Compatible with firmware 1.6.x. ```http GET /api/cloud/action/quick ``` -------------------------------- ### Cloud API Action Spot Command Source: https://github.com/koalazak/rest980/blob/master/README.md Execute a spot cleaning command with a GET request to the /api/cloud/action/spot endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/action/spot ``` -------------------------------- ### Get Mission Info Source: https://github.com/koalazak/rest980/blob/master/README.md Retrieves the current mission status and variables of the robot. This is a GET request to the info endpoint. ```http GET http://192.168.1.110:3000/api/local/info/mission ``` -------------------------------- ### Cloud API Action Fbeep Command Source: https://github.com/koalazak/rest980/blob/master/README.md Trigger the fbeep action with a GET request to the /api/cloud/action/fbeep endpoint. Compatible with firmware 1.6.x. ```http GET /api/cloud/action/fbeep ``` -------------------------------- ### Cloud API Action Wipe Command Source: https://github.com/koalazak/rest980/blob/master/README.md Initiate a wipe action with a GET request to the /api/cloud/action/wipe endpoint. Compatible with firmware 1.6.x. ```http GET /api/cloud/action/wipe ``` -------------------------------- ### Cloud API Action Dock Command Source: https://github.com/koalazak/rest980/blob/master/README.md Send the robot to its dock using a GET request to the /api/cloud/action/dock endpoint. Applicable for firmware 1.6.x. ```http GET /api/cloud/action/dock ``` -------------------------------- ### Send Clean Action Command Source: https://github.com/koalazak/rest980/blob/master/README.md Use GET requests to the /api/cloud/action/clean endpoint to initiate a cleaning cycle. This is applicable for firmware version 1.6.x. ```http GET http://192.168.1.110:3000/api/cloud/action/clean ``` -------------------------------- ### Cloud Action Endpoints Source: https://github.com/koalazak/rest980/blob/master/README.md These endpoints trigger various actions on the robot. They all use the GET method and do not require any query parameters. ```APIDOC ## GET /api/cloud/action/clean ### Description Initiates a cleaning action. ### Method GET ### Endpoint /api/cloud/action/clean ## GET /api/cloud/action/quick ### Description Initiates a quick cleaning action. ### Method GET ### Endpoint /api/cloud/action/quick ## GET /api/cloud/action/spot ### Description Initiates a spot cleaning action. ### Method GET ### Endpoint /api/cloud/action/spot ## GET /api/cloud/action/dock ### Description Commands the robot to dock. ### Method GET ### Endpoint /api/cloud/action/dock ## GET /api/cloud/action/start ### Description Starts the robot. ### Method GET ### Endpoint /api/cloud/action/start ## GET /api/cloud/action/stop ### Description Stops the robot. ### Method GET ### Endpoint /api/cloud/action/stop ## GET /api/cloud/action/pause ### Description Pauses the robot. ### Method GET ### Endpoint /api/cloud/action/pause ## GET /api/cloud/action/resume ### Description Resumes the robot's operation. ### Method GET ### Endpoint /api/cloud/action/resume ## GET /api/cloud/action/wake ### Description Wakes the robot up. ### Method GET ### Endpoint /api/cloud/action/wake ## GET /api/cloud/action/reset ### Description Resets the robot. ### Method GET ### Endpoint /api/cloud/action/reset ## GET /api/cloud/action/find ### Description Finds the robot. ### Method GET ### Endpoint /api/cloud/action/find ## GET /api/cloud/action/wipe ### Description Initiates a wiping action. ### Method GET ### Endpoint /api/cloud/action/wipe ## GET /api/cloud/action/sleep ### Description Puts the robot to sleep. ### Method GET ### Endpoint /api/cloud/action/sleep ## GET /api/cloud/action/off ### Description Turns the robot off. ### Method GET ### Endpoint /api/cloud/action/off ## GET /api/cloud/action/fbeep ### Description Triggers a beep sound from the robot. ### Method GET ### Endpoint /api/cloud/action/fbeep ``` -------------------------------- ### Cloud API Info Mission History Endpoint Source: https://github.com/koalazak/rest980/blob/master/README.md Get mission history details via a GET request to the /api/cloud/info/missionHistory endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/info/missionHistory ``` -------------------------------- ### Cloud API Action Resume Command Source: https://github.com/koalazak/rest980/blob/master/README.md Resume robot operation after a pause with a GET request to the /api/cloud/action/resume endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/action/resume ``` -------------------------------- ### Cloud API Action Find Command Source: https://github.com/koalazak/rest980/blob/master/README.md Locate the robot using a GET request to the /api/cloud/action/find endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/action/find ``` -------------------------------- ### Cloud API Action Off Command Source: https://github.com/koalazak/rest980/blob/master/README.md Turn off the robot via a GET request to the /api/cloud/action/off endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/action/off ``` -------------------------------- ### Perform Cleaning Actions Source: https://github.com/koalazak/rest980/blob/master/README.md Initiates various cleaning actions on the Roomba robot. These actions are accessed via the `/api/local/action/[action]` endpoint using a GET request. ```APIDOC ## GET /api/local/action/{action} ### Description Initiates a specific cleaning action on the Roomba. ### Method GET ### Endpoint `/api/local/action/{action}` ### Parameters #### Path Parameters - **action** (string) - Required - The action to perform. Available actions: `start`, `stop`, `pause`, `dock`, `resume`, `cleanRoom`. ### Response #### Success Response (200) - **ok** (null) - Indicates success. - **id** (integer) - A unique identifier for the action. ### Request Example ```http GET http://192.168.1.110:3000/api/local/action/start ``` ### Response Example ```json { "ok": null, "id": 23 } ``` ``` -------------------------------- ### Cloud API Action Sleep Command Source: https://github.com/koalazak/rest980/blob/master/README.md Put the robot to sleep using a GET request to the /api/cloud/action/sleep endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/action/sleep ``` -------------------------------- ### Cloud API Action Wake Command Source: https://github.com/koalazak/rest980/blob/master/README.md Wake the robot from a sleep state using a GET request to the /api/cloud/action/wake endpoint. Compatible with firmware 1.6.x. ```http GET /api/cloud/action/wake ``` -------------------------------- ### Cloud API Action Reset Command Source: https://github.com/koalazak/rest980/blob/master/README.md Reset the robot's state by sending a GET request to the /api/cloud/action/reset endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/action/reset ``` -------------------------------- ### Cloud API Action Stop Command Source: https://github.com/koalazak/rest980/blob/master/README.md Halt robot operation using a GET request to the /api/cloud/action/stop endpoint. Compatible with firmware 1.6.x. ```http GET /api/cloud/action/stop ``` -------------------------------- ### Cloud API Info History Endpoint Source: https://github.com/koalazak/rest980/blob/master/README.md Retrieve historical data for the robot using a GET request to the /api/cloud/info/history endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/info/history ``` -------------------------------- ### Cloud Info Endpoints Source: https://github.com/koalazak/rest980/blob/master/README.md These endpoints provide information about the cloud status, history, and mission history. They all use the GET method and do not require any query parameters. ```APIDOC ## GET /api/cloud/info/status ### Description Retrieves the current status of the cloud service. ### Method GET ### Endpoint /api/cloud/info/status ## GET /api/cloud/info/history ### Description Retrieves the historical data from the cloud service. ### Method GET ### Endpoint /api/cloud/info/history ## GET /api/cloud/info/missionHistory ### Description Retrieves the mission history from the cloud service. ### Method GET ### Endpoint /api/cloud/info/missionHistory ``` -------------------------------- ### Cloud API Action Pause Command Source: https://github.com/koalazak/rest980/blob/master/README.md Temporarily pause robot operation by sending a GET request to the /api/cloud/action/pause endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/action/pause ``` -------------------------------- ### Retrieve Information Records Source: https://github.com/koalazak/rest980/blob/master/README.md Fetches various information records from the Roomba robot. These records are accessed via the `/api/local/info/[record]` endpoint using a GET request. ```APIDOC ## GET /api/local/info/{record} ### Description Retrieves specific information records from the Roomba. ### Method GET ### Endpoint `/api/local/info/{record}` ### Parameters #### Path Parameters - **record** (string) - Required - The type of record to retrieve. Available records: `mission`, `wireless`, `lastwireless`, `sys`, `state` (firmware 2 only). ### Response #### Success Response (200) - **ok** (object) - Contains the requested information. - **id** (integer) - A unique identifier for the request. ### Request Example ```http GET http://192.168.1.110:3000/api/local/info/mission ``` ### Response Example ```json { "ok": { "flags": 0, "cycle": "none", "phase": "charge", "pos": { "theta": 179, "point": { "x": 102, "y": -13 } }, "batPct": 99, "expireM": 0, "rechrgM": 0, "error": 0, "notReady": 0, "mssnM": 0, "sqft": 0 }, "id": 2 } ``` ``` -------------------------------- ### Cloud API Info Status Endpoint Source: https://github.com/koalazak/rest980/blob/master/README.md Access the robot's status information using a GET request to the /api/cloud/info/status endpoint. Requires firmware 1.6.x. ```http GET /api/cloud/info/status ``` -------------------------------- ### Serve Static Files Source: https://github.com/koalazak/rest980/blob/master/README.md Place images or files in the `public/` folder to serve them as static files. This allows direct access via the server's file serving capabilities. ```shell public/ ``` -------------------------------- ### Execute Docker Build and Create Script Source: https://github.com/koalazak/rest980/blob/master/README.md Make the dockerCreate.sh script executable and run it to automatically build the Docker image and create a container. You will be prompted for configuration details or can set them directly in the script. ```bash chmod +x dockerCreate.sh ./dockerCreate.sh ``` -------------------------------- ### Build rest980 Docker Image Locally Source: https://github.com/koalazak/rest980/blob/master/README.md Build the rest980 Docker image from the local Dockerfile. ```bash docker build . -t koalazak/rest980 ``` -------------------------------- ### Set Preferences (Firmware 1) Source: https://github.com/koalazak/rest980/blob/master/README.md Updates user preferences such as language, timezone, and robot name. This is a POST request to the config preferences endpoint with a JSON body. ```http POST http://192.168.1.110:3000/api/local/config/preferences ``` -------------------------------- ### Set Configuration Source: https://github.com/koalazak/rest980/blob/master/README.md Sets a new configuration value for a specified setting. Accessed via `/api/local/config/[configName]` using a POST request with a JSON body. ```APIDOC ## POST /api/local/config/{configName} ### Description Sets a new value for a specific configuration setting. ### Method POST ### Endpoint `/api/local/config/{configName}` ### Parameters #### Path Parameters - **configName** (string) - Required - The name of the configuration to set. Available options include `week`, `time` (firmware 1 only), `preferences`, `carpetBoost/auto`, `carpetBoost/performance`, `carpetBoost/eco`, `edgeClean/on`, `edgeClean/off`, `cleaningPasses/auto`, `cleaningPasses/one`, `cleaningPasses/two`, `alwaysFinish/on`, `alwaysFinish/off`. #### Request Body - The request body format depends on the `configName`. Refer to specific configuration documentation for details. ### Response #### Success Response (200) - **ok** (null) - Indicates success. - **id** (integer) - A unique identifier for the request. ### Request Example (Set preferences) ```http POST http://192.168.1.110:3000/api/local/config/preferences Content-Type: application/json { "flags": 1107, "lang": 2, "timezone": "America/Buenos_Aires", "name": "myRobotName" } ``` ### Response Example (Set preferences) ```json { "ok": null, "id": 293 } ``` ### Request Example (Set cleaning passes to two) ```http POST http://192.168.1.110:3000/api/local/config/cleaningPasses/two Content-Type: application/json {} ``` ### Response Example (Set cleaning passes to two) ```json { "ok": null, "id": 293 } ``` ``` -------------------------------- ### Realtime Map Access Source: https://github.com/koalazak/rest980/blob/master/README.md Access the experimental realtime map feature by navigating to `http://serverIP:3000/map` in your browser. This provides a visual representation of the robot's cleaning activity. ```http http://serverIP:3000/map ``` -------------------------------- ### Run rest980 Docker Container Source: https://github.com/koalazak/rest980/blob/master/README.md Run the rest980 Docker image, mapping the port and setting required environment variables for BLID, PASSWORD, and optionally ROBOT_IP. ```bash docker run -p 3000:3000 -e BLID=myuser -e PASSWORD=mypass -e ROBOT_IP=myrobotIP koalazak/rest980 ``` -------------------------------- ### Clean Specific Room Action Source: https://github.com/koalazak/rest980/blob/master/README.md Triggers a cleaning of specific rooms. Requires a POST request with a JSON body containing room details, map IDs, and cleaning order. Ensure correct `pmap_id` and `user_pmapv_id` are used, which can be found via the `state` endpoint. ```sh curl -X POST http://192.168.1.110:3000/api/local/action/cleanRoom -H 'Content-Type: application/json' -d '{"ordered": 0, "pmap_id": "123456", "regions": [{"region_id":"5", "region_name":"Hallway","region_type":"hallway"}], "user_pmapv_id": "987654"}' ``` -------------------------------- ### Info Endpoints Source: https://github.com/koalazak/rest980/blob/master/README.md Provides information about the rest980 server, its connection, and robot capabilities. ```APIDOC ## GET /api/info/version ### Description Retrieves version information for rest980, dorita980, Node.js, and the robot's firmware. ### Method GET ### Endpoint /api/info/version ### Response #### Success Response (200) - **rest980Version** (string) - The version of the rest980 server. - **dorita980Version** (string) - The version of the dorita980 library. - **nodeVersion** (string) - The Node.js version. - **firmwareVersion** (string) - The robot's firmware version. ## GET /api/info/protocol ### Description Provides details about the communication protocol, transport, keep-alive status, and robot IP address. ### Method GET ### Endpoint /api/info/protocol ### Response #### Success Response (200) - **protocol** (string) - The communication protocol used. - **transport** (string) - The transport layer protocol. - **keepAlive** (boolean) - Indicates if keep-alive is enabled. - **robotIP** (string) - The IP address of the robot. ## GET /api/info/capabilities ### Description Retrieves flags indicating support for local and cloud APIs, as well as robot state. ### Method GET ### Endpoint /api/info/capabilities ### Response #### Success Response (200) - **localSupport** (boolean) - Whether local API is supported. - **cloudSupport** (boolean) - Whether cloud API is supported. - **stateSupport** (boolean) - Whether robot state reporting is supported. ``` -------------------------------- ### Pull rest980 Docker Image Source: https://github.com/koalazak/rest980/blob/master/README.md Download the rest980 Docker image from Docker Hub. ```bash docker pull koalazak/rest980 ``` -------------------------------- ### Clean Specific Room Source: https://github.com/koalazak/rest980/blob/master/README.md Initiates a room-specific cleaning command for compatible Roomba models (e.g., s9, i7) that support 'Smart Map'. Requires `pmap_id`, `user_pmapv_id`, and region details. ```APIDOC ## POST /api/local/action/cleanRoom ### Description Cleans a specific room or set of rooms based on the provided map and region IDs. ### Method POST ### Endpoint `/api/local/action/cleanRoom` ### Parameters #### Request Body - **ordered** (integer) - Optional - Indicates if the cleaning order matters. - **pmap_id** (string) - Required - The ID of the personal map. - **regions** (array) - Required - A list of regions to clean. - **region_id** (string) - Required - The ID of the region. - **region_name** (string) - Required - The name of the region. - **region_type** (string) - Required - The type of the region. - **user_pmapv_id** (string) - Required - The ID of the user's personal map version. ### Request Example ```json { "ordered": 0, "pmap_id": "123456", "regions": [ { "region_id": "5", "region_name": "Hallway", "region_type": "hallway" } ], "user_pmapv_id": "987654" } ``` ### Response #### Success Response (200) - **ok** (null) - Indicates success. - **id** (integer) - A unique identifier for the command. ``` -------------------------------- ### Set Cleaning Passes to Two Source: https://github.com/koalazak/rest980/blob/master/README.md Configures the robot to perform two cleaning passes. This is a POST request to the specific cleaning passes endpoint. ```http POST http://192.168.1.110:3000/api/local/config/cleaningPasses/two ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.