-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathconfig.schema.json
228 lines (228 loc) · 8.78 KB
/
config.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
{
"pluginAlias": "Roomba2",
"pluginType": "accessory",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"required": true
},
"model": {
"type": "string",
"title": "Model",
"required": true
},
"serialnum": {
"type": "string",
"title": "Serial Number",
"required": false
},
"blid": {
"type": "string",
"title": "blid",
"required": true
},
"robotpwd": {
"type": "string",
"title": "Robot Password",
"required": true
},
"ipaddress": {
"type": "string",
"title": "IP Address",
"required": true
},
"debug": {
"type": "boolean",
"title": "Debug logging",
"required": false
},
"dockContactSensor": {
"type": "boolean",
"title": "Home",
"default": true,
"required": false
},
"runningContactSensor": {
"type": "boolean",
"title": "Running",
"required": false
},
"binContactSensor": {
"type": "boolean",
"title": "Bin Full",
"required": false
},
"dockingContactSensor": {
"type": "boolean",
"title": "Returning Home",
"required": false
},
"tankContactSensor": {
"type": "boolean",
"title": "Braava Water Tank",
"required": false
},
"homeSwitch": {
"type": "boolean",
"title": "Home",
"required": false
},
"cleanBehaviour": {
"type": "string",
"title": "When Roomba is turned on",
"required": true,
"default": "everywhere",
"oneOf": [
{ "title": "Clean everywhere", "enum": ["everywhere"] },
{ "title": "Clean specific rooms", "enum": ["rooms"] }
]
},
"mission": {
"type": "object",
"title": "Mission Info",
"properties": {
"ordered": {
"type": "number",
"title": "Clean rooms in order",
"default": 1,
"required": true,
"oneOf": [
{ "title": "Yes", "enum": [1] },
{ "title": "No", "enum": [0] }
],
"condition": {
"functionBody": "return model.cleanBehaviour === 'rooms';"
}
},
"pmap_id": {
"type": "string",
"title": "Pmap Id",
"required": true,
"condition": {
"functionBody": "return model.cleanBehaviour === 'rooms';"
}
},
"regions": {
"type": "array",
"title": "Rooms to be cleaned",
"items": {
"type": "object",
"properties": {
"region_id": {
"type": "string",
"title": "Region Id",
"required": true
},
"type": {
"type": "string",
"title": "Type",
"default": "rid",
"required": true
},
"params":{
"type": "object",
"properties": {
"noAutoPasses": {
"type": "boolean",
"required": false,
"default": false,
"title": "Specify Number of Cleaning Passes"
},
"twoPass": {
"type": "boolean",
"required": false,
"default": false,
"title": "Two Passes"
}
}
}
}
},
"condition": {
"functionBody": "return model.cleanBehaviour === 'rooms';"
}
},
"user_pmapv_id": {
"type": "string",
"title": "User Pmapv Id",
"required": true,
"condition": {
"functionBody": "return model.cleanBehaviour === 'rooms';"
}
}
}
},
"stopBehaviour": {
"type": "string",
"title": "When Roomba is turned off",
"required": true,
"default": "home",
"oneOf": [
{ "title": "Home", "enum": ["home"] },
{ "title": "Pause", "enum": ["pause"] }
]
},
"idleWatchInterval": {
"type": "integer",
"title": "Idle Poll Interval (minutes)",
"description": "How often to poll Roomba's status when it is idle. Defaults to 15 minutes.",
"required": false
}
}
},
"headerDisplay": "For more information and help please consult the [README](https://github.com/homebridge-plugins/homebridge-roomba#setup).",
"layout": [
{ "type": "section", "title": "Display Details", "items": [
{ "type": "help", "helpvalue": "<span class='help-block'>Details about your Roomba to be displayed in the Home app. You can make up the values you enter here.</span>" },
"name", "model", "serialnum"
] },
{ "type": "section", "title": "Connection", "items": [
{ "type": "help", "helpvalue": "<span class='help-block'>Please consult the <a href='https://github.com/homebridge-plugins/homebridge-roomba#setup' target='_blank'>README</a> to obtain these connection values for your Roomba.</span>" },
"blid", "robotpwd", "ipaddress"
] },
{ "type": "section", "title": "Switches", "items": [
{ "type": "help", "helpvalue": "<span class='help-block'>Switches add additional buttons in the Home app to control Roomba’s behaviour.</span>" },
"homeSwitch"
] },
{ "type": "section", "title": "Contact Sensors", "items": [
{ "type": "help", "helpvalue": "<span class='help-block'>Contact sensors appear in the Home app and show what state Roomba is in.</span>" },
"dockContactSensor", "dockingContactSensor", "runningContactSensor", "binContactSensor", "tankContactSensor"
] },
{ "type": "section", "title": "Behavior", "items": [ "cleanBehaviour", "mission.pmap_id", "mission.user_pmapv_id", {
"key": "mission.regions",
"type": "array",
"notitle": true,
"items": [
{
"type": "div",
"displayFlex": true,
"flex-direction": "row",
"items": [
{
"key": "mission.regions[].region_id",
"notitle": true,
"placeholder": "Region Id"
},
{
"key": "mission.regions[].type",
"notitle": true,
"placeholder": "Type"
},
{
"key": "mission.regions[].params.noAutoPasses"
},
{
"key": "mission.regions[].params.twoPass",
"condition": "mission.regions[arrayIndex].params.noAutoPasses"
}
]
}
]
},
"mission.ordered", "stopBehaviour" ] },
{ "type": "section", "title": "Additional Options", "items": [ "idleWatchInterval", "debug" ] }
]
}