Skip to content

Latest commit

 

History

History
128 lines (102 loc) · 5.99 KB

README.md

File metadata and controls

128 lines (102 loc) · 5.99 KB

Roomba for Hubitat

Roomba for Hubitat is a forked version from the previous author Aaron Ward, which was forked from original author Dominick Meglio. This forked version enables advanced scheduling, notification and support for all WiFi enabled Roomba devices.

Prerequisites and installation:

Roomba for Hubitat uses Dorita980 for Roomba control and Rest980 for API control and connectivity into Hubitat using a Rapsberry Pi. It is highly recommended that both your Raspberry Pi and Roomba have reserved IP addresses within your router. These directions will be how to install both on a RPi currently running Node.JS and GIT installed. I would recommend using a /share directory for this installation.

Dorita980 and Rest980 Installation process:

  1. sudo npm install -g dorita980 --save
  2. sudo npm -g install dorita980
  3. Install Rest980

Rest980 Configuration (recommended to have two SSH windows open):

  • [SSH Window #1] Edit ../rest980/config/default.json
  • [SSH Window #2]get-roomba-password YOUR_ROOMBA_IP_ADDRESS
    • On your Roomba device that is on the Home Base and powered on, press and hold your Roomba's Home button for at least two seconds until you hear a beep or a series of tones
    • Press any key in the SSH Windows #2 to continue
  • Copy "blid" and paste into [SSH Window #1] for blid
  • Copy the "password" revealed and past into [SSH Windows #1] for password
  • Enter Roomba IP Address into [SSH Windows #1] for robotIP
  • Enter the Port you want Rest980 to listen on: default is 3000
  • Change "firmwareVersion" in [SSH Windows #1] to 2
  • Logout of [SSH Window #2]
  • Testing:
    • Navigate back to ../rest980 root
    • Type the following: DEBUG=rest980:* npm start
    • In a new browser tab navigate to http://YOUR_RASPBERRY_PI:PORT (PORT usually is 3000)
    • Response should be similar to: {"documentation":"htps://githubcom/koalazak/rest980","pong":"2019-09-13T12:13:36.408Z"}
    • CTRL-C to exit Rest980 app

Setting up Rest980 to run as a service:

  • sudo nano /etc/systemd/system/roomba.service
  • Enter the following, changing your WorkingDirectory to where yours is:
[Unit]
Description=Roomba Service
After=network.target

[Service]
WorkingDirectory=/share/rest980
ExecStart=/usr/bin/npm start
Restart=on-failure
User=pi

[Install]
WantedBy=multi-user.target
  • sudo systemctl enable roomba.service
  • sudo systemctl start roomba.service
  • Test connectivity in browser tab: http://YOUR_RASPBERRY_PI:PORT (usually PORT is 3000)
  • Response should be similar to: {"documentation":"htps://githubcom/koalazak/rest980","pong":"2019-09-13T12:13:36.408Z"}

Note: If you would like to control multiple Roomba devices from a single RPi then you just need to follow the above steps but create and change the folder name Rest980 to Rest980-1 and change the PORT Rest980 listens on to something other than 3000. Also change the name of the service filename roomba.service to something like roomba1.service

Install Hubitat App and Driver:

Roomba for Hubitat Configuration:

  • Rest980/Dorita980 Integration:
    • Rest980 Server IP Address - IP Address running Rest980 and Dorita980
    • Rest980 Server Port - Port running Rest980
    • Rest980 Server Username/Password (Optional) - Username/Password set for Basic Auth in Rest980
  • Notification Device(s):
    • Pushover Device - select one to many devices to send notification to and Roomba's start/stop/pause/resume and dock status
  • Cleaning Schedule:
    • Select days to schedule cleaning - Sunday - Saturday
    • Number of times per day to clean - this can be between 1-10 times to clean in a single day
    • First time - Tenth time - times when you want Roomba to clean (time does not have to be in order)
    • First rooms - Tenth rooms (optional, i7/s9) - rooms you want Roomba to clean at the corresponding time
  • Logging and Testing:
    • AppWatchDog2 - this app is enabled to support App Watch Dog 2
    • Enable Debug Logging - set timeout for debug logs to continously log. 0=forever

Roomba Scheduler Dashboard Tile configuration:

note: If your dashboards do not use all of your devices then you will need to go into your dashboard app and add your Roomba device.

  • Click "+" to add a new tile
  • Select your Roomba device
  • Template = attribute
  • Attribute = RoombaTile

Use Local Images

If you have enabled this option in the App preferences, then the RoombaTile attribute will point to the Hub's local storage. Upload each of the png images under the support directory to your Hub's File Manager.

Roomba i7/s9 "cleanRoom" configuration

The configuration/args for the cleanRoom command accepts a JSON format similar to the following:

{
  "ordered": 1,
  "pmap_id": "ABCDEFG123456FGKS789",
  "regions": [
    { "region_id": "5", "type": "rid"},
    { "region_id": "0", "type": "rid"},
    { "region_id": "1", "type": "rid"}
  ],
  "user_pmapv_id": "190917T20125Z"
}

The dorita980 documentation has details on how to identify the room mappings -- namely, by starting a job from the iRobot app for the desired room/rooms, then pulling the details from your browser at url: http://YOUR_RASPBERRY_PI:PORT/api/local/info/state (usually PORT is 3000)