Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@homebridge-plugins/homebridge-roomba

homebridge-plugin for Roomba devices

homebridge-plugin, iRobot, Roomba

readme

homebridge-roomba

verified-by-homebridge

Features

  • Roomba start on demand
  • Roomba stop and dock on demand
  • Roomba charging status
  • Roomba battery level (with low battery warning)
  • Roomba docked notification
  • Roomba running notification
  • Roomba bin full notification
  • Find Roomba (Identify Function, supported in 3rd Party HomeKit apps)

The homebridge-roomba plugin polls Roomba for its status when requested by HomeKit, so when you first open the Home app you may see an old status, or no status, until Roomba has had time to respond (which may take a few seconds).

Installation

  1. Use the Homebridge UI’s Plugins screen to search for and install "homebridge-roomba"
  2. Follow Setup to get Roomba credentials and to configure your Roomba
  3. Restart Homebridge

Manual Installation

  1. Install Homebridge: sudo npm i -g homebridge --unsafe-perm
  2. Download this plugin: sudo npm i -g @homebridge-plugins/homebridge-roomba
  3. Follow Setup to get Roomba credentials
  4. Enter Roomba's credentials in your config.json file.
  5. Restart Homebridge

Setup

  1. Find your Roomba's IP address (for help see the troubleshooting section); it will look like 192.168.X.XXX or 10.X.X.XXX, or similar.
  2. Open a terminal on your Homebridge system, either using ssh or by using the Homebridge Terminal located in the ⋮ menu, top-right in the Homebridge UI.
  3. Change into the directory where the plugin is installed: cd $(npm root -g)/homebridge-roomba
  4. Type npm run roomba:getpassword <IP ADDRESS> (replacing <IP ADDRESS> with the IP address you discovered above).
  5. Follow the instructions on screen to obtain your Roomba's blid and password. NB: Read the instructions carefully and ensure that you're pressing and holding the correct button on your Roomba.
  6. Proceed to Configuration.

Configuration

This plugin supports GUI-based configuration using Homebridge UI, which is the recommended approach for configuring your Roomba.

Manual configuration

Here is example JSON for configuring a Roomba accessory:

{
  "accessory": "Roomba",
  "name": "Roomba",
  "model": "960",
  "blid": "1234567890",
  "robotpwd": "aPassword",
  "ipaddress": "192.168.x.xxx",
  "dockContactSensor": true,
  "runningContactSensor": true,
  "binContactSensor": true,
  "cleanBehaviour": "rooms",
  "mission": {
    "ordered": 1,
    "pmap_id": "ab1cd_eFGhiJklMN2PqRsT",
    "regions": [
      {
        "region_id": "1",
        "type": "rid",
        "params": {
          "noAutoPasses": true,
          "twoPasses": true
        }
      }
    ],
    "user_pmapv_id": "220101T120101"
  },
  "stopBehaviour": "home"
}
Key Description Default Value
accessory Loads this plugin. Must be set to Roomba
name The name of your Roomba as it should appear in Homebridge and HomeKit
model The model of your Roomba as you'd like it to appear in HomeKit
serialnum The serial number as you'd like it to appear in HomeKit
blid The blid of your Roomba, obtained during setup
robotpwd The password for your Roomba, obtained during setup
ipaddress The IP address of your Roomba on your network
dockContactSensor Add a contact sensor to HomeKit that's closed when Roomba is docked true
runningContactSensor Add a contact sensor to HomeKit that's open when Roomba is running false
binContactSensor Add a contact sensor to HomeKit that's open when Roomba's bin is full false
dockingContactSensor Add a contact sensor to HomeKit that's open when Roomba is docking false
tankContactSensor Add a contact sensor to HomeKit that's open when Braava's water tank is empty false
cleanBehaviour Roomba can clean everywhere or go on a specific cleaning mission when started everywhere
mission Instructions passed to your Roomba for a specific cleaning mission
ordered Clean rooms in order specified 1
pmap_id The id of your map in the iRobot app
regions One or more rooms to be cleaned during mission
region_id The region id of the room to be cleaned
type The type of region id specified rid
params Additional parameters for the room to be cleaned
noAutoPasses Specify the number of cleaning passes for the room to be cleaned false
twoPass Specify two cleaning passes for the room false
user_pmapv_id The version id of your map in the iRobot app (contains Date and Time last modified)
stopBehaviour Roomba can go home or pause when stopped home

Cleaning Mission configuration

This plugin can instruct the Roomba to clean everywhere or go on a specific cleaning job when started. Follow these steps to get the mission configuration values from the iRobot app.

  1. Select the rooms you want to clean in the iRobot app, start the cleaning job, then close the iRobot app.
  2. Open a terminal on your Homebridge system, either using ssh or by using the Homebridge Terminal located in the ⋮ menu, top-right in the Homebridge UI.
  3. Change into the directory where the plugin is installed: cd $(npm root -g)/homebridge-roomba
  4. Type npm run roomba:getlastcommand <BLID> <PASSWORD> <IP ADDRESS> (replacing <BLID> <PASSWORD> <IP ADDRESS> with the values for your robot).

Note: Modifying the map (Room Dividers, Names or Zones) in the iRobot app will result in a new `userpmapv_idvalue and may result in newregion_id` values that will cause an error if not updated in mission configuration._

Deprecated configuration

The homebridge-roomba plugin used to support keep-alive and auto refresh modes for obtaining Roomba's status. Both of these modes required more resources from Homebridge and Roomba than were necessary.

Now the plugin efficiently queries Roomba's status on demand so as not to slow down Homebridge and so as to provide HomeKit with Roomba's status only when it requests it.

Troubleshooting

Click on any of the items below to expand the corresponding answer.

<summary>Finding my Roomba's IP address</summary>

You can find your Roomba's IP Address in the iRobot app. Open the app and choose your Robot. Scroll down to the bottom and find Robot Settings. Click Wi-Fi Settings and then Robot Wi-FI Details. You will find your IP address and various other network goodies here.

Alt Text

Alternatively you can open up your Router Admin Panel and look for a list of devices. Once you identify the Roomba, you should see an associated IP address, however, this process will be different for each type of router.

While identifying your Roomba's IP address, we strongly recommend assigning your Roomba a Static IP Address (See Roomba cannot be found after router restart OR Roomba's IP Address changed below).

<summary>Roomba cannot be found after router restart OR Roomba's IP Address changed</summary>

If you experience issues with connecting to your Roomba, you might want to assign a Static IP Address to your Roomba. In order to do this, you'll need to navigate to your Router's Admin Portal and modify the configuration; because this process is different for each type of router, you will need to research this process on your own.

NOTE: If you choose to set an IP address that is different than the IP address your Roomba was previously assigned, you'll need to restart your router before the Roomba will begin responding on the new IP address.

Building

The homebridge-roomba plugin uses TypeScript and nvm.

nvm is used to control the version of node used. You can skip the nvm step if you manage your own node versions.

Use nvm to select the required node version:

nvm use

or, if you don't have the required node version installed:

nvm install

Prepare the project:

npm install

Build the project:

npm run build

or

npm run watch

Testing

The fastest way to test changes is to copy the built product directly to your Homebridge, and then to restart Homebridge.

If your Homebridge is running on your local machine, you can build (as above) and then copy the config.schema.json file and dist folder to the homebridge-roomba folder in your Homebridge's node_modules folder.

If your Homebridge is running on another machine, you can use a remote copy tool such as scp to copy the files:

npm run build && scp -r config.schema.json package.json dist user@host.local:/usr/lib/node_modules/homebridge-roomba/

Note: the destination path above is an example of what the path to node_modules on your Homebridge server might be.

If you see "Permission denied" errors from scp you will need to adjust the permissions on the files in that folder on your Homebridge machine.

Contributing

The homebridge-roomba plugin uses Changesets to maintain the CHANGELOG.md and to bump the package's version number according to semver.

If you are preparing a PR, please consider using Changesets to include a summary of your change for the CHANGELOG.md, following the example of existing changelog entries (but feel free to provide more detail).

To create a new changeset:

npm exec changeset

That will prompt you to indicate whether your change is a patch (a bug fix) or a minor or major change. If you are adding a feature it is a minor change, not a patch.

Changesets will create a new file in the .changeset directory that you can commit as part of your PR.

.git-blame-ignore-revs

Some revisions in the git history are spurious in a git blame, such as linting the code base. These revisions are listed in .git-blame-ignore-revs. You can configure your local git repository to use this file to skip these revisions in a blame:

git config blame.ignoreRevsFile .git-blame-ignore-revs

config.schema.json

Useful references for the config.schema.json:

Releasing

The maintainer will run these steps to update the plugin version and publish to npmjs.com:

npm exec changeset version

Review the additions to CHANGELOG.md and package.json, commit with the comment "vX.X", and then publish:

npm exec changeset publish

Credits

STVMallen - Original plugin

ncovercash - Dock status

changelog

Changelog

2.1.0 (2025-03-04)

What's Changes

  • BETA Added option to use iRobot credentials to get devices info.
  • Set default idleWatchInterval for plugin, but allow for override per device or overall plugin.
  • Housekeeping and updated dependencies.

Full Changelog: https://github.com/homebridge-plugins/homebridge-roomba/compare/v2.0.0...v2.1.0

2.0.0 (2025-03-04)

What's Changes

Major Changes

  • Change from Accessory base to Platform based Plugin
    • You will need to re-setup your vacuum
      • You can reuse your config by taking your serialnum, blid, robotpwd, ipaddress from the Accessory config and input it in the Homebridge UI when adding a new device.
  • Pluging has been renamed from homebridge-roomba2 to homebridge-roomba now that it is a scoped plugin.
  • Compaitable with Homebridge v2.0.0

Other Changes

  • Housekeeping and updated dependencies.

Full Changelog: https://github.com/homebridge-plugins/homebridge-roomba/compare/v1.5.3...v2.0.0

1.5.3 (2025-01-24)

What's Changes

  • Fixed require is not defined #148

Full Changelog: https://github.com/homebridge-plugins/homebridge-roomba/compare/v1.5.2...v1.5.3

1.5.2 (2025-01-24)

What's Changes

  • Fixed Cannot find module Issue #148

Full Changelog: https://github.com/homebridge-plugins/homebridge-roomba/compare/v1.5.1...v1.5.2

1.5.1 (2025-01-23)

What's Changes

  • Fixed Cannot find module Issue #148
  • Housekeeping and updated dependencies.

Full Changelog: https://github.com/homebridge-plugins/homebridge-roomba/compare/v1.5.0...v1.5.1

1.5.0

Minor Changes

  • Add clean specific rooms behaviour from @boomseklecki
  • 695324d: Add more help and restructure the configuration schema
  • 8220909: Attempt multiple ciphers when connecting to Roomba to support newer Roomba models

Patch Changes

  • d1ea23f: Make retrying connection log a debug log
  • 7a98203: getlastcommand script doesn't require npm install
  • f70fe7f: Fix build issue
  • 70ed087: Attempt different ciphers based on error message seen from i1+

1.5.0-beta.4

Patch Changes

  • 7a98203: getlastcommand script doesn't require npm install

1.5.0-beta.3

Minor Changes

  • Add clean specific rooms behaviour from @boomseklecki

1.5.0-beta.2

Patch Changes

  • d1ea23f: Make retrying connection log a debug log
  • 70ed087: Attempt different ciphers based on error message seen from i1+

1.5.0-beta.1

Patch Changes

  • f70fe7f: Fix build issue

1.5.0-beta.0

Minor Changes

  • 695324d: Add more help and restructure the configuration schema
  • 8220909: Attempt multiple ciphers when connecting to Roomba to support newer Roomba models

1.4.0

Minor Changes

  • 8edc43f: Change terminology from "watch" to "poll"
  • 1bfd4d1: Keep checking Roomba's status frequently for two minutes after it has been active [#112]
  • aa07d0e: Fix upstream dorita980 to fix node 18 TLS fault when connecting to Roomba
  • eb29f42: Upgrade dorita980 to resolve Node 18 connection issues [#126]
  • bd7c6c1: Add cipher to dorita980 to support J7 [#106]
  • 5e9a0f2: Make the idle watch interval configurable
  • 64a137b: Support evac phase [#114]
  • 931ba0d: Make starting Roomba more reliable by tacking whether a clean cycle is paused
  • 63a3a40: Decrease the frequency of Roomba status queries when Roomba is idle [#112]

    Based on work by @Write. Also tidied up the handling of async in the connect method and re-wrote the status watching approach.

Patch Changes

  • 09ef460: Don't use state from cache if we want to force a refresh
  • c438513: Change max cache age to reflect current polling rate
  • 342a814: Fix custom dorita980 dependency
  • 80c790b: Simplify robot password script running
  • b646681: Fix too many close listeners warning when refreshing state
  • 6f697d0: Don't double-log connect timeouts
  • 7cc3440: Fix Homebridge crash due to ECONNREFUSED is dorita980 cannot connect to Roomba
  • 27dc29b: Refactor watch loop to ensure no double-ups
  • 404bb02: Fix "Releasing an unexpected Roomba instance" logging after a timeout
  • e1989e4: Update to node 18 and upgrade dependencies

1.3.2-beta.5

Patch Changes

  • c438513: Change max cache age to reflect current polling rate
  • 8edc43f: Change terminology from "watch" to "poll"
  • 27dc29b: Refactor watch loop to ensure no double-ups

1.3.2-beta.4

Patch Changes

  • 1bfd4d1: Keep checking Roomba's status frequently for two minutes after it has been active [#112]
  • 931ba0d: Make starting Roomba more reliable by tacking whether a clean cycle is paused

1.3.2-beta.3

Patch Changes

  • b646681: Fix too many close listeners warning when refreshing state
  • 7cc3440: Fix Homebridge crash due to ECONNREFUSED is dorita980 cannot connect to Roomba
  • 5e9a0f2: Make the idle watch interval configurable
  • 63a3a40: Decrease the frequency of Roomba status queries when Roomba is idle [#112]

    Based on work by @Write. Also tidied up the handling of async in the connect method and re-wrote the status watching approach.

1.3.2-beta.2

Patch Changes

  • 64a137b: Support evac phase [#114]

1.3.2-beta.1

Patch Changes

  • 342a814: Fix custom dorita980 dependency

1.3.2-beta.0

Patch Changes

  • 09ef460: Don't use state from cache if we want to force a refresh
  • 80c790b: Simplify robot password script running
  • aa07d0e: Fix upstream dorita980 to fix node 18 TLS fault when connecting to Roomba
  • eb29f42: Upgrade dorita980 to resolve Node 18 connection issues [#126]
  • bd7c6c1: Add cipher to dorita980 to support J7 [#106]
  • 6f697d0: Don't double-log connect timeouts
  • 404bb02: Fix "Releasing an unexpected Roomba instance" logging after a timeout
  • e1989e4: Update to node 18 and upgrade dependencies

1.3.1

Patch Changes

  • d69dcf0: Reduce info logging so the plugin is a lot quieter when not in debug logging mode
  • 438e99c: Add debug option to config schema

1.3.0

Minor Changes

  • ae578c0: Refactor Roomba connection handling to improve reporting of issues connecting to Roomba and to reuse existing Roomba connections to avoid conflicts [#66]
  • e7f574c: Organise config schema into sections and rename options
  • 5ab1507: Increase the frequency of Roomba status checks in order to support automations
  • 2863a49: Rename noDockOnStop to dockOnStop [#73 #74] (thanks @rcoletti116, @khad)
  • f15404e: Added support for Identify method (supported in 3rd party HomeKit apps)
  • 3e9e48b: Include a resume command when starting cleaning so we can cope with a paused Roomba
  • 44c6f8a: Actively watch Roomba's status and update HomeKit for a short period of time after being inspected

    HomeKit inspects Roomba when you open the Home app, but it doesn't continously poll for changes so the plugin now watches Roomba for changes and pushes them to the Home app.

  • b7322c0: Add docking contact sensor

  • 721c3a6: Add a setting to control whether Roomba is sent home when stopped [#63] (thanks @rcoletti116)
  • 0e87755: Add Home switch as separate to docking contact sensor
  • 28eeeec: Report current plugin version as the firmware version
  • 8ab5243: Change docking sensor to a switch so you can trigger docking
  • e32d078: Add a long-term slow watching of Roomba's status so we always have a status
  • 44c026c: Stop behaviour now checks what state Roomba is in and no longer triggers a docking if Roomba is already docked
  • aac6159: Change state refresh approach to be on demand rather than constant polling or keeping a permanent connection.
  • 6dbb668: Convert to using TypeScript and pnpm for development
  • 853b39e: Overhauled Roomba connections and status again, status gathering is now more passive

Patch Changes

  • Enable serial number to be specified in the configuration
  • Change the manufacturer reported to HomeKit to iRobot
  • f71c085: Add source code linting
  • 05ca4e6: Improve handling around connections to Roomba that timeout
  • b3a25b0: Debug logging improvements and re-including the raw status in debug logs
  • 58cba16: Improve Roomba connection handling
  • 032098a: Improve the log message when Roomba fails to complete a docking manoeuvre
  • e623a28: Rename Docked contact sensor to Dock
  • 1f02665: Improve the default name of the Bin Full sensor
  • b9daed9: Recognise more Roomba phases, including more docking phases and stuck
  • 73b02d3: Add a timeout when waiting for the full status from Roomba so we release our connection to Roomba
  • c8ce152: Only update characteristics with changes
  • e79b7a3: Update dependencies
  • 477f571: Upgrade dependencies including dorita980 to address #81
  • f100e9f: Refresh Roomba's status after every action so we update our version of Roomba's state ASAP.

    The previous approach of updating the state directly had a race condition with pre-existing updates of Roomba's state.

  • 5399dbb: Fix delay when trying to dock

  • 1346008: Logging more efficient and added a switch to enable easier debug logging

1.3.0-beta.11

Patch Changes

  • 477f571: Upgrade dependencies including dorita980 to address #81

1.3.0-beta.10

Minor Changes

  • e7f574c: Organise config schema into sections and rename options
  • 0e87755: Add Home switch as separate to docking contact sensor

1.3.0-beta.9

Minor Changes

  • 8ab5243: Change docking sensor to a switch so you can trigger docking

1.3.0-beta.8

Minor Changes

  • 5ab1507: Increase the frequency of Roomba status checks in order to support automations

Patch Changes

  • 05ca4e6: Improve handling around connections to Roomba that timeout
  • f100e9f: Refresh Roomba's status after every action so we update our version of Roomba's state ASAP.

    The previous approach of updating the state directly had a race condition with pre-existing updates of Roomba's state.

1.3.0-beta.7

Minor Changes

  • 2863a49: Rename noDockOnStop to dockOnStop [#73 #74] (thanks @rcoletti116, @khad)

1.3.0-beta.6

Minor Changes

  • e32d078: Add a long-term slow watching of Roomba's status so we always have a status

1.3.0-beta.5

Patch Changes

  • 73b02d3: Add a timeout when waiting for the full status from Roomba so we release our connection to Roomba
  • c8ce152: Only update characteristics with changes

1.3.0-beta.4

Patch Changes

  • b3a25b0: Debug logging improvements and re-including the raw status in debug logs

1.3.0-beta.3

Minor Changes

  • 853b39e: Overhauled Roomba connections and status again, status gathering is now more passive

Patch Changes

  • 5399dbb: Fix delay when trying to dock

1.3.0-beta.2

Minor Changes

  • 721c3a6: Add a setting to control whether Roomba is sent home when stopped [#63] (thanks @rcoletti116)
  • 44c026c: Stop behaviour now checks what state Roomba is in and no longer triggers a docking if Roomba is already docked

Patch Changes

  • b9daed9: Recognise more Roomba phases, including more docking phases and stuck

1.3.0-beta.1

Patch Changes

  • 58cba16: Improve Roomba connection handling

1.3.0-beta.0

Minor Changes

  • ae578c0: Refactor Roomba connection handling to improve reporting of issues connecting to Roomba and to reuse existing Roomba connections to avoid conflicts [#66]
  • 3e9e48b: Include a resume command when starting cleaning so we can cope with a paused Roomba
  • 44c6f8a: Actively watch Roomba's status and update HomeKit for a short period of time after being inspected

    HomeKit inspects Roomba when you open the Home app, but it doesn't continously poll for changes so the plugin now watches Roomba for changes and pushes them to the Home app.

  • b7322c0: Add docking contact sensor

  • 28eeeec: Report current plugin version as the firmware version
  • aac6159: Change state refresh approach to be on demand rather than constant polling or keeping a permanent connection.
  • 6dbb668: Convert to using TypeScript and pnpm for development

Patch Changes

  • Enable serial number to be specified in the configuration
  • Change the manufacturer reported to HomeKit to iRobot
  • f71c085: Add source code linting
  • 032098a: Improve the log message when Roomba fails to complete a docking manoeuvre
  • e623a28: Rename Docked contact sensor to Dock
  • 1f02665: Improve the default name of the Bin Full sensor
  • e79b7a3: Update dependencies
  • 1346008: Logging more efficient and added a switch to enable easier debug logging

1.2.2

Patch Changes

  • 50a3640: Updated sample-config.json with accurate plugins section [#47]
  • 450333e: Change the logging of each status request to debug level to reduce log noise [#50]
  • 20d74fc: Fix double calling of the callback when using an expired status [#49]

1.2.1 (2021-02-01)

  • Fix filterMaintenance service not being published properly, thanks @m-ruhl [#24]

1.2.0 (2020-05-12)

  • Fixes #10 (Thank you @dvcrn) [PR: #16]

1.1.0 (2020-10-29)

  • Added support for bin full notifications.

1.0.0 (2020-10-28)

  • Plugin verified

0.0.2 (2020-10-28)

  • Fixed (#1)

  • Fied a typo in config.schema.json line 34, thanks @benasher44

0.0.1 (2020-10-20)

  • Base plugin

  • Added Contact sensor for running/docked notifications in home app, thanks @ncovercash