-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.schema.json
292 lines (291 loc) · 11.5 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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
{
"pluginAlias": "SignalK",
"pluginType": "platform",
"singular": true,
"headerDisplay": "This plugin maps [API keys of a Signal K server](https://github.com/Krillle/homebridge-signalk/blob/master/README.md#mapped-api-keys-and-devices) to matching HomeKit devices.",
"footerDisplay": "For help or in case of issues please visit the [GitHub repository](https://github.com/Krillle/homebridge-signalk/issues).",
"schema": {
"type": "object",
"properties": {
"host": {
"title": "Signal K Host",
"type": "string",
"default": "127.0.0.1:3000",
"required": true,
"description": "Hostname or IP address and port of your Signal K server"
},
"ssl": {
"title": "Signal K Host Uses SSL",
"type": "boolean",
"default": false,
"required": true,
"description": "Check if Signal K server is awaiting connections via SSL"
},
"accessRequest": {
"title": "Use Access Requests to access Signal K server",
"type": "boolean",
"default": true,
"required": false,
"description": "Check to use Signal K Access Requests to request and be granted access to the Signal K server. Approve access request in Signal K > Security > Access Requests. To reset access request, uncheck and restart Homebridge."
},
"securityToken": {
"title": "Signal K Security Token",
"type": "string",
"required": false,
"description": "Token entered here overrides token from access requests. Create token with signalk-generate-token."
},
"removeDevicesNotPresent": {
"title": "Remove Devices Not Present in Signal K",
"type": "boolean",
"placeholder": false,
"description": "If checked, devices which are not present in Signal K (after restart of Signal K server) are removed from HomeKit (at start of Homebridge server). Uncheck to prevent devices disappearing when restarting Raspberry Pi in case homebridge loads faster than the Signal K tree is being filled."
},
"signalkInitializeDelay": {
"title": "Signal K API Delay",
"type": "integer",
"placeholder": 10000,
"description": "Delay before adding or removing devices to give Signal K time to fill the API tree (in milliseconds)"
},
"autodetectNewAccessoriesInterval": {
"title": "Detecting New Devices Interval",
"type": "integer",
"placeholder": 900000,
"description": "Interval to check for new devices (in milliseconds)"
},
"accessRequestInterval": {
"title": "Access Request Interval",
"type": "integer",
"placeholder": 60000,
"description": "Interval to check Signal K access request status (in milliseconds)"
},
"emptyBatteryVoltage": {
"title": "Empty Battery Voltage",
"type": "number",
"placeholder": 22,
"description": "Voltage at which battery state of charge will be shown as 0% (ignored if SOC is reported from battery)"
},
"fullBatteryVoltage": {
"title": "Full Battery Voltage",
"type": "number",
"placeholder": 25.8,
"description": "Voltage at which battery state of charge will be shown as 100% (ignored if SOC is reported from battery)"
},
"lowBatteryVoltage": {
"title": "Low Battery Voltage",
"type": "number",
"placeholder": 23.5,
"description": "Voltage below wich a battery low warning will be shown"
},
"chargingBatteryVoltage": {
"title": "Charging Battery Voltage",
"type": "number",
"placeholder": 27,
"description": "Voltage above wich batteries will be shown as charging (ignored if current is reported from battery)"
},
"lowFreshWaterLevel": {
"title": "Fresh Water Low Level",
"type": "integer",
"placeholder": 25,
"minimum": 0,
"maximum": 100,
"description": "Percent level below wich fresh water tanks will show a warning"
},
"highWasteWaterLevel": {
"title": "Waster Water High Level",
"type": "integer",
"placeholder": 75,
"minimum": 0,
"maximum": 100,
"description": "Percent level above wich waste water tanks will show a warning"
},
"highBlackWaterLevel": {
"title": "Black Water High Level",
"type": "integer",
"placeholder": 75,
"minimum": 0,
"maximum": 100,
"description": "Percent level above wich black water tanks will show a warning"
},
"lowFuelLevel": {
"title": "Fuel Low Level",
"type": "integer",
"placeholder": 50,
"minimum": 0,
"maximum": 100,
"description": "Percent level below wich fuel tanks will show a warning"
},
"lowLubricationLevel": {
"title": "Lubrication Low Level",
"type": "integer",
"placeholder": 50,
"minimum": 0,
"maximum": 100,
"description": "Percent level below wich lubrication tanks will show a warning"
},
"lowLiveWellLevel": {
"title": "Fuel Live Well Level",
"type": "integer",
"placeholder": 50,
"minimum": 0,
"maximum": 100,
"description": "Percent level below wich live well tanks will show a warning"
},
"lowGasLevel": {
"title": "Fuel Gas Level",
"type": "integer",
"placeholder": 50,
"minimum": 0,
"maximum": 100,
"description": "Percent level below wich gas tanks will show a warning"
},
"lowBallastLevel": {
"title": "Fuel Ballast Level",
"type": "integer",
"placeholder": 50,
"minimum": 0,
"maximum": 100,
"description": "Percent level below wich ballast tanks will show a warning"
},
"contactSensors": {
"title": "Contact Sensors",
"type": "array",
"description": "Set up contact sensors which are triggered when a Signal K API key reaches a threshold value.",
"items": {
"type": "object",
"properties": {
"key": {
"title": "API Key",
"type": "string",
"required": true,
"placeholder": "e.g. navigation.speedOverGround",
"description": "Signal K API key for which you want to see a contact sensor device in HomeKit"
},
"name": {
"title": "Name",
"type": "string",
"description": "Name to be shown for this contact sensor device in HomeKit"
},
"operator": {
"title": "Operator",
"type": "string",
"default": ">",
"oneOf": [
{ "title": "Equal to treshold (==)", "enum": ["=="] },
{ "title": "Not equal to treshold (!=)", "enum": ["!="] },
{ "title": "Less than treshold (<)", "enum": ["<"] },
{ "title": "Less than or equal to treshold (<=)", "enum": ["<="] },
{ "title": "Greater than treshold (>)", "enum": [">"] },
{ "title": "Greater than or equal to treshold (>=)", "enum": [">="] }
]
},
"treshold": {
"title": "Treshold",
"type": "string"
}
},
"required": [ "key" ]
}
},
"ignoredPaths": {
"title": "Ignored API Keys",
"type": "array",
"description": "Signal K API keys for which you don't want to see a device in HomeKit. Associated devices will be deleted from HomeKit if already present.",
"items": {
"title": "API Key",
"type": "string",
"placeholder": "tanks.wasteWater.0"
}
}
}
},
"form": null,
"display": null,
"layout": [
{
"items": [
"host",
"ssl",
"accessRequest"
]
},
{
"type": "fieldset",
"title": "Optional Configuration",
"expandable": true,
"items": [
"securityToken",
"removeDevicesNotPresent",
"signalkInitializeDelay",
"autodetectNewAccessoriesInterval",
"accessRequestInterval",
"emptyBatteryVoltage",
"fullBatteryVoltage",
"lowBatteryVoltage",
"chargingBatteryVoltage",
"lowFreshWaterLevel",
"highWasteWaterLevel",
"highBlackWaterLevel",
"lowFuelLevel",
"lowLubricationLevel",
"lowLiveWellLevel",
"lowGasLevel",
"lowBallastLevel"
]
},
{
"key": "contactSensors",
"expandable": true,
"type": "array",
"items": [
{
"type": "div",
"items": [
{
"items": [
"contactSensors[].key",
"contactSensors[].name",
{
"type": "flex",
"flex-flow": "row wrap",
"items": [
{
"type": "flex",
"flex-flow": "column",
"items": [
"contactSensors[].operator"
]
},
{
"type": "flex",
"flex-flow": "column",
"items": [
"contactSensors[].treshold"
]
}
]
}
]
}
]
}
]
},
{
"key": "ignoredPaths",
"expandable": true,
"type": "array",
"items": [
{
"type": "div",
"displayFlex": true,
"flex-direction": "row",
"items": [
{
"key": "ignoredPaths[]"
}
]
}
]
}
]
}