Skip to content

Commit 2863a49

Browse files
committed
noDockOnStop -> DockOnStop
Resolves #73, merges #74 commit 478c293 Author: rcoletti116 <[email protected]> Date: Fri Sep 24 15:42:44 2021 -0400 attempt to fix readme commit 65b5fa3 Author: rcoletti116 <[email protected]> Date: Fri Sep 24 15:22:31 2021 -0400 Update config.schema.json commit 22cd135 Author: rcoletti116 <[email protected]> Date: Fri Sep 24 10:45:37 2021 -0400 Update README.md commit 30e8b31 Author: rcoletti116 <[email protected]> Date: Fri Sep 24 10:40:24 2021 -0400 Update README.md commit 667730f Author: rcoletti116 <[email protected]> Date: Fri Sep 24 10:37:11 2021 -0400 Update config.schema.json commit 48cd769 Author: rcoletti116 <[email protected]> Date: Fri Sep 24 10:32:33 2021 -0400 Update README.md commit 01a3082 Author: Karl von Randow <[email protected]> Date: Sat Sep 25 10:54:33 2021 +1200 Update README.md commit 3fe2ccc Author: rcoletti116 <[email protected]> Date: Fri Sep 24 10:31:28 2021 -0400 Update ReadMe commit 26d32f3 Author: rcoletti116 <[email protected]> Date: Fri Sep 24 10:27:54 2021 -0400 Update readmne commit 72df304 Author: Karl von Randow <[email protected]> Date: Sat Sep 25 10:53:26 2021 +1200 Only update Characteristics with changes commit 39cdc96 Author: Karl von Randow <[email protected]> Date: Sat Sep 25 10:51:49 2021 +1200 Update Config Docs commit 9a0bafa Author: rcoletti116 <[email protected]> Date: Fri Sep 24 10:00:09 2021 -0400 make dockOnStop default true w/o configschema commit ea22cc8 Author: rcoletti116 <[email protected]> Date: Thu Sep 23 16:17:01 2021 -0400 revert order of callback & mergeCahedStatus commit 634eb40 Author: rcoletti116 <[email protected]> Date: Thu Sep 23 15:27:39 2021 -0400 lower case 'dock' commit 2d8af4c Author: rcoletti116 <[email protected]> Date: Thu Sep 23 15:26:11 2021 -0400 lower case 'dock' commit 1c70969 Author: rcoletti116 <[email protected]> Date: Thu Sep 23 15:25:09 2021 -0400 lower case 'dock' commit 7e0f964 Author: rcoletti116 <[email protected]> Date: Thu Sep 23 12:27:02 2021 -0400 noDockOnStop -> DockOnStop commit 0a6a9f4 Author: rcoletti116 <[email protected]> Date: Thu Sep 23 12:23:20 2021 -0400 Reverse noDockOnStop to DockOnStop commit cf06343 Author: rcoletti116 <[email protected]> Date: Thu Sep 23 11:29:24 2021 -0400 Reverse noDockOnStop tp DockOnStop DockOnStop = true will now send the robot home on stop. This is the default value. commit 9fd8704 Author: rcoletti116 <[email protected]> Date: Thu Sep 23 11:28:10 2021 -0400 Reverse noDockOnStop function to DockOnStop No uses positive languages to indicate DockOnStop. If True (Default), Roomba will return home when stopped.
1 parent eb39685 commit 2863a49

File tree

4 files changed

+27
-21
lines changed

4 files changed

+27
-21
lines changed

.changeset/khaki-suits-reply.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"homebridge-roomba2": minor
3+
---
4+
5+
Rename noDockOnStop to dockOnStop [#73 #74] (thanks @rcoletti116, @khad)

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,25 @@ configure your accessory using JSON:
6767
"ipaddress": "192.168.x.xxx",
6868
"dockContactSensor": true,
6969
"runningContactSensor": true,
70-
"binContactSensor": true
70+
"binContactSensor": true,
71+
"dockOnStop": true
7172
}
7273
```
7374

74-
|Key|Description|
75-
|---|-----------|
76-
|`accessory`|Loads this plugin. Must be set to `Roomba2`|
77-
|`name`|The name of your Roomb as it should appear in Homebridge and HomeKit|
78-
|`model`|The model of your Roomba as you'd like it to appear in HomeKit|
79-
|`serialnum`|The serial number as you'd like it to appear in HomeKit|
80-
|`blid`|The `blid` of your Roomba, obtained during setup|
81-
|`robotpwd`|The password for your Roomba, obtained during setup|
82-
|`ipaddress`|The IP address of your Roomba on your network|
83-
|`dockContactSensor`|Add a contact sensor to HomeKit that's _closed_ when Roomba is docked|
84-
|`runningContactSensor`|Add a contact sensor to HomeKit that's _open_ when Roomba is running|
85-
|`binContactSensor`|Add a contact sensor to HomeKit that's _open_ when Roomba's bin is full|
86-
|`dockingContactSensor`|Add a contact sensor to HomeKit that's _open_ when Roomba is docking|
87-
|`noDockOnStop`|Do not send home when stopped|
75+
|Key|Description|Default Value|
76+
|---|-----------|---|
77+
|`accessory`|Loads this plugin. Must be set to `Roomba2`||
78+
|`name`|The name of your Roomb as it should appear in Homebridge and HomeKit||
79+
|`model`|The model of your Roomba as you'd like it to appear in HomeKit||
80+
|`serialnum`|The serial number as you'd like it to appear in HomeKit||
81+
|`blid`|The `blid` of your Roomba, obtained during setup||
82+
|`robotpwd`|The password for your Roomba, obtained during setup||
83+
|`ipaddress`|The [IP address](#troubleshooting) of your Roomba on your network||
84+
|`dockContactSensor`|Add a contact sensor to HomeKit that's _closed_ when Roomba is docked|`true`|
85+
|`runningContactSensor`|Add a contact sensor to HomeKit that's _open_ when Roomba is running|`false`|
86+
|`binContactSensor`|Add a contact sensor to HomeKit that's _open_ when Roomba's bin is full|`false`|
87+
|`dockingContactSensor`|Add a contact sensor to HomeKit that's _open_ when Roomba is docking|`false`|
88+
|`dockOnStop`|Send home to dock when stopped|`true`|
8889

8990
### Deprecated configuration
9091

config.schema.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@
5555
"title": "Show docking status as a contact sensor",
5656
"required": false
5757
},
58-
"noDockOnStop": {
58+
"dockOnStop": {
5959
"type": "boolean",
60-
"title": "Do not send home when stopped",
60+
"title": "Dock when stopped",
61+
"default": true,
6162
"required": false
6263
}
6364
}

src/accessory.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default class RoombaAccessory implements AccessoryPlugin {
8181
private robotpwd: string
8282
private ipaddress: string
8383
private firmware: string
84-
private noDockOnStop: boolean
84+
private dockOnStop: boolean
8585

8686
private accessoryInfo: Service
8787
private filterMaintenance: Service
@@ -133,7 +133,7 @@ export default class RoombaAccessory implements AccessoryPlugin {
133133
this.robotpwd = config.robotpwd;
134134
this.ipaddress = config.ipaddress;
135135
this.firmware = "N/A";
136-
this.noDockOnStop = config.noDockOnStop;
136+
this.dockOnStop = config.dockOnStop !== undefined ? config.dockOnStop : true;
137137

138138
const showDockAsContactSensor = config.dockContactSensor === undefined ? true : config.dockContactSensor;
139139
const showRunningAsContactSensor = config.runningContactSensor;
@@ -456,8 +456,7 @@ export default class RoombaAccessory implements AccessoryPlugin {
456456
charging: false,
457457
docking: false,
458458
});
459-
460-
if (!this.noDockOnStop) {
459+
if (this.dockOnStop) {
461460
this.log("Roomba paused, returning to Dock");
462461
await this.dockWhenStopped(roomba, 3000);
463462
} else {

0 commit comments

Comments
 (0)