Skip to content

Commit e3f2cfd

Browse files
committed
README: restructure and add configuration reference
1 parent e79b7a3 commit e3f2cfd

File tree

1 file changed

+61
-43
lines changed

1 file changed

+61
-43
lines changed

README.md

Lines changed: 61 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
</span>
1313

14-
### Features
14+
## Features
1515

1616
- Roomba start on demand
1717
- Roomba stop and dock on demand
@@ -21,67 +21,85 @@
2121
- Roomba running notification
2222
- Roomba bin full notification
2323

24-
25-
<span align="center">
26-
27-
28-
29-
# Installation
30-
</span>
31-
24+
## Installation
3225

3326
### Automatic Installation
27+
3428
1) Install Homebridge: ```sudo npm i -g homebridge --unsafe-perm```
3529
2) Download this plugin: ```sudo npm i -g homebridge-roomba2```
36-
3) Follow [Setup](https://github.com/iRayanKhan/homebridge-roomba2#setup), to get Roomba credentials
37-
4) Continue setup using [Config-Ui-X](https://github.com/oznu/homebridge-config-ui-x)
30+
3) Follow [Setup](#setup) to get Roomba credentials
31+
4) Add an Accessory for your Roomba and configure it using [Config-Ui-X](https://github.com/oznu/homebridge-config-ui-x)
3832
5) Restart Homebridge
3933

34+
### Manual Installation
4035

41-
### Manual Installation
4236
1) Install Homebridge: ```sudo npm i -g homebridge --unsafe-perm```
4337
2) Download this plugin: ```sudo npm i -g homebridge-roomba2```
44-
3) Follow [Setup](https://github.com/iRayanKhan/homebridge-roomba2#setup), to get Roomba credentials
45-
4) Enter Roomba credentials to your config.json file.
38+
3) Follow [Setup](#setup) to get Roomba credentials
39+
4) Enter Roomba's credentials in your `config.json` file.
4640
5) Restart Homebridge
4741

48-
49-
### Setup
50-
1) CD into where your plugins are installed. You can find this by typing ```npm root -g```
51-
2) Type ```sudo npm run getrobotpwd 192.168.x.xxx``` (find your iRobot's IP address and enter it at the end of this command replacing 192.168.x.xxx with your actual IP)
52-
3) Follow the instructions on screen
53-
4) Use the credentials from above, to fill into Homebridge. (Config template below):
42+
## Setup
43+
44+
1) `cd` into where the plugin is installed: ```cd $(npm root -g)/homebridge-roomba2```
45+
2) Type ```sudo npm run getrobotpwd 192.168.x.xxx``` (find your Roomba's IP address and enter it at the end of this command replacing 192.168.x.xxx with the actual IP)
46+
3) Follow the instructions on screen to obtain your Roomba's `blid` and password.
47+
48+
## Configuration
49+
50+
This plugin supports GUI-based configuration using [Config-Ui-X](https://github.com/oznu/homebridge-config-ui-x). You can also
51+
configure your accessory using JSON:
52+
53+
```json
54+
{
55+
"accessory": "Roomba2",
56+
"name": "Roomba",
57+
"model": "960",
58+
"blid": "1234567890",
59+
"robotpwd": "aPassword",
60+
"ipaddress": "192.168.x.xxx",
61+
"autoRefreshEnabled": true,
62+
"keepAliveEnabled": false,
63+
"dockContactSensor": true,
64+
"runningContactSensor": true,
65+
"binContactSensor": true,
66+
"cacheTTL": 30
67+
}
5468
```
55-
"accessories": [
56-
{
57-
"accessory": "Roomba2",
58-
"name": "Roomba",
59-
"model": "960",
60-
"blid": "1234567890",
61-
"robotpwd": "aPassword",
62-
"ipaddress": "192.168.x.xxx",
63-
"autoRefreshEnabled": true,
64-
"keepAliveEnabled": true,
65-
"dockContactSensor": true,
66-
"runningContactSensor": true,
67-
"cacheTTL": 30 //in seconds
68-
}
69-
]
70-
```
71-
Refresh mode
7269

73-
This plugins supports these refresh modes:
70+
|Key|Description|
71+
|---|-----------|
72+
|`accessory`|Loads this plugin. Must be set to `Roomba2`|
73+
|`name`|The name of your Roomb as it should appear in Homebridge and HomeKit|
74+
|`model`|The model of your Roomba as you'd like it to appear in HomeKit|
75+
|`blid`|The `blid` of your Roomba, obtained during setup|
76+
|`robotpwd`|The password for your Roomba, obtained during setup|
77+
|`ipaddress`|The IP address of your Roomba on your network|
78+
|`keepAliveEnabled`|See _Refresh modes_ below|
79+
|`autoRefreshEnabled`|See _Refresh modes_ below|
80+
|`dockContactSensor`|Add a contact sensor to HomeKit that's _closed_ when Roomba is docked|
81+
|`runningContactSensor`|Add a contact sensor to HomeKit that's _closed_ when Roomba is running|
82+
|`binContactSensor`|Add a contact sensor to HomeKit that's _open_ when Roomba's bin is full|
83+
|`cacheTTL`|How long to cache Roomba's status (in seconds) before contacting Roomba again|
84+
85+
### Refresh modes
86+
87+
This plugins supports three modes for refreshing the state of your Roomba:
88+
89+
#### Keep alive
90+
91+
With `keepAlive` set to `true` the plugin will keep a connection to your Roomba, which will deliver more immediate status changes and commands. However, this will cause the Roomba app to fail to connect to your Roomba in local network mode (cloud mode will work fine) and it will increase Roomba's energy consumption.
7492

75-
NONE (autoRefreshEnabled and keepAlive both set to false) - no auto refresh, we will connect to roomba and poll status when requested by home app. Please note that this will cause "Updating" status for all homebridge accessories.
93+
#### Auto refresh
7694

77-
AUTO REFRESH (autoRefreshEnabled set to true) - we will connect to roomba, every pollingInterval seconds, and store the status in cache. if pollingInterval = cacheTTL - 10 (or more), this will make sure we will always have a valid status.
95+
With `autoRefreshEnabled` set to `true` the plugin will connect to Roomba every `cacheTTL` seconds to check its status, and then cache the status so HomeKit always shows Roomba's status immediately.
7896

79-
KEEP ALIVE (keepAlive set to true) - we will keep a connection to roomba, this will cause app to fail to connect to roomba in local network mode (cloud mode will work just fine, even in your home wifi). This will lead to better performance (status will refresh faster, and toggle will work faster as well). Keep in mind this will increase the Roomba battery consumption.
97+
#### None
8098

81-
Source: https://github.com/stvmallen/homebridge-roomba-stv#refresh-mode
99+
With `autoRefreshEnabled` and `keepAlive` both set to `false` the plugin connects to Roomba when its status is requested by HomeKit. This will cause HomeKit to show an "Updating" status for your Roomba until its status is returned.
82100

101+
## Credits
83102

84-
### Credits:
85103
STVMallen - [Original plugin](https://github.com/stvmallen/homebridge-roomba-stv)
86104

87105
ncovercash - [Dock status](https://github.com/stvmallen/homebridge-roomba-stv/pull/63)

0 commit comments

Comments
 (0)