forked from homebridge/homebridge-config-ui-x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.schema.json
244 lines (244 loc) · 6.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
{
"pluginAlias": "config",
"pluginType": "platform",
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"default": "Config",
"minLength": 1,
"required": true
},
"port": {
"title": "Port",
"type": "integer",
"default": 8080,
"maximum": 65535,
"required": true
},
"auth": {
"title": "Auth Mode",
"type": "string",
"default": "form",
"oneOf": [
{ "title": "Form", "enum": ["form"] },
{ "title": "Basic Auth", "enum": ["basic"] },
{ "title": "None", "enum": ["none"] }
],
"required": true
},
"theme": {
"title": "UI Theme",
"type": "string",
"default": "red",
"oneOf": [
{ "title": "Red", "enum": ["red"] },
{ "title": "Pink", "enum": ["pink"] },
{ "title": "Purple", "enum": ["purple"] },
{ "title": "Indigo", "enum": ["indigo"] },
{ "title": "Blue", "enum": ["blue"] },
{ "title": "Blue-grey", "enum": ["blue-grey"] },
{ "title": "Green", "enum": ["green"] },
{ "title": "Orange", "enum": ["orange"] }
],
"required": true
},
"restart": {
"title": "Restart Command",
"type": "string"
},
"temp": {
"title": "Path to OS Temp File",
"type": "string"
},
"tempUnits": {
"title": "Temperature Display Units",
"type": "string",
"required": true,
"default": "c",
"oneOf": [
{ "title": "Celsius", "enum": ["c"] },
{ "title": "Fahrenheit", "enum": ["f"] }
]
},
"loginWallpaper": {
"title": "Path to Login Wallpaper Image File",
"type": "string"
},
"sudo": {
"title": "Use Sudo",
"type": "boolean"
},
"noFork": {
"title": "Do not run the Config UI web server in a seperate process/thread",
"type": "boolean"
},
"log": {
"type": "object",
"properties": {
"method": {
"title": "Log Method",
"type": "string",
"oneOf": [
{ "title": "From File", "enum": ["file"] },
{ "title": "Systemd", "enum": ["systemd"] },
{ "title": "Custom Command", "enum": ["custom"] }
]
},
"path": {
"title": "Log File Path",
"type": "string"
},
"service": {
"title": "Systemd Service",
"type": "string"
},
"command": {
"title": "Custom Command",
"type": "string"
},
"tail": {
"type": "string",
"description": "Depreciated"
},
"systemd": {
"type": "string",
"description": "Depreciated"
}
}
},
"ssl": {
"title": "SSL Setup",
"type": "object",
"properties": {
"key": {
"title": "Path To Private Key",
"type": "string"
},
"cert": {
"title": "Path To Certificate",
"type": "string"
},
"pfx": {
"title": "Path To PKCS#12 Certificate",
"type": "string"
},
"passphrase": {
"title": "PKCS#12 Certificate Passphrase",
"type": "string"
}
}
},
"linux": {
"title": "Linux Server Commands",
"type": "object",
"properties": {
"shutdown": {
"title": "Shutdown Command",
"type": "string"
},
"restart": {
"title": "Restart Command",
"type": "string"
}
}
},
"proxyHost": {
"title": "Reverse Proxy Hostname",
"type": "string",
"pattern": "^[^{}/ :\\\\]+(?::\\d+)?$"
},
"homebridgeNpmPkg": {
"title": "Custom NPM package for Homebridge updates",
"type": "string"
},
"fork": {
"title": "Custom fork in <github username>/<repo> format for Homebridge updates",
"type": "string"
}
}
},
"form": [
"name",
"port",
"auth",
"theme",
"sudo",
{
"type": "fieldset",
"expandable": true,
"title": "Log Viewer Setup",
"items": [
"log.method",
{
"key": "log.path",
"description": "Enter the full file path to your log file.",
"required": true,
"condition": {
"functionBody": "return (model.log && model.log.method==='file')"
}
},
{
"key": "log.service",
"description": "Enter the systemd service name. Defaults to 'homebridge'.",
"placeholder": "homebridge",
"required": true,
"condition": {
"functionBody": "return (model.log && model.log.method==='systemd')"
}
},
{
"key": "log.command",
"description": "This command should stream the logs to stdout.",
"required": true,
"condition": {
"functionBody": "return (model.log && model.log.method==='custom')"
}
}
]
},
{
"type": "fieldset",
"expandable": true,
"title": "Advanced",
"items": [
{
"key": "restart",
"description": "If no restart command is set the process will terminate with a non-zero exit code."
},
{
"key": "proxyHost",
"placeholder": "eg. example.com:8443",
"description": "When running behind a reverse proxy you may need to enter the hostname you use to access the UI."
},
{
"key": "loginWallpaper",
"description": "Leave blank to use default wallpaper."
},
{
"key": "temp",
"placeholder": "eg. /sys/class/thermal/thermal_zone0/temp"
},
"tempUnits",
"noFork"
]
},
{
"type": "fieldset",
"expandable": true,
"title": "SSL Setup",
"items": [
{
"type": "help",
"helpvalue": "<em class='primary-text'>Leave these fields blank to disable SSL.</em><br><em class='text-danger'>After enabling SSL you will only be able to access the Config UI using https://</div>"
},
"ssl.key",
"ssl.cert",
"ssl.pfx",
"ssl.passphrase"
]
}
]
}