-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.schema.json
199 lines (199 loc) · 5.91 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
{
"pluginAlias": "MercedesPlatform",
"pluginType": "platform",
"singular": true,
"customUi": true,
"footerDisplay": "For documentation please see [GitHub repository](https://github.com/SeydX/homebridge-mercedesme)",
"schema": {
"name": {
"title": "Name",
"type": "string",
"default": "MercedesPlatform",
"description": "Name for the log."
},
"debug": {
"title": "Debug",
"type": "boolean",
"description": "Enables additional output in the log."
},
"cars": {
"title": "Cars",
"required": true,
"type": "array",
"items": {
"name": "Car Config",
"type": "object",
"properties": {
"name": {
"title": "Name",
"description": "The name of your car in HomeKit",
"type": "string",
"required": true
},
"clientID": {
"title": "Client ID",
"description": "Client ID from https://developer.mercedes-benz.com/",
"type": "string",
"required": true
},
"clientSecret": {
"title": "Client Secret",
"description": "Client Secret from https://developer.mercedes-benz.com/",
"type": "string",
"required": true
},
"vin": {
"title": "Vehicle Identification Number (VIN)",
"description": "VIN of the car",
"type": "string",
"required": true
},
"manufacturer": {
"name": "Manufacturer",
"type": "string",
"description": "Set the manufacturer name for display in the Home app."
},
"model": {
"title": "Model",
"description": "Car model",
"type": "string",
"required": false
},
"maxRange": {
"title": "Max Range",
"description": "Maximum distance after full tank load",
"type": "integer",
"required": false
},
"electricVehicle": {
"title": "Electric Vehicle",
"type": "boolean",
"description": "Check if your car is an electric vehicle."
},
"hybridVehicle": {
"title": "Hybrid Vehicle",
"type": "boolean",
"description": "Check if your car is a hybrid vehicle."
},
"tankBatteryType": {
"title": "Tank load/Battery Accessory Type",
"type": "string",
"description": "You can choose between several accessory types for your tank load and/or electric vehicle battery. If 'none' is choosen, only the tank load (for non electric vehicle) or battery level (electric vehicle) will be shown as a battery service within the accessory.",
"oneOf": [
{
"title": "Humidity Sensor",
"enum": [
"HUMIDITY"
]
},
{
"title": "Lighhtbulb",
"enum": [
"LIGHTBULB"
]
}
]
},
"polling": {
"title": "Polling",
"description": "Mercedes Me API Polling in seconds",
"type": "integer",
"required": false,
"placeholder": 60,
"minimum": 60
},
"token": {
"titel": "Token",
"type": "object",
"properties": {
"access_token": {
"title": "Access Token",
"type": "string",
"required": true
},
"refresh_token": {
"title": "Refresh Token",
"type": "string",
"required": true
},
"token_type": {
"title": "Token Type",
"type": "string",
"required": false
},
"expires_in": {
"title": "Expires in",
"type": "integer",
"required": false
},
"expires_at": {
"title": "Expires at",
"type": "string",
"required": false
}
}
}
}
}
}
},
"layout": [
"name",
"debug",
{
"key": "cars",
"type": "array",
"orderable": false,
"buttonText": "Add new car",
"items": [
"cars[].name",
"cars[].clientID",
"cars[].clientSecret",
"cars[].vin",
"cars[].electricVehicle",
"cars[].hybridVehicle",
"cars[].tankBatteryType",
{
"key": "cars[]",
"type": "section",
"title": "Branding",
"expandable": true,
"expanded": true,
"orderable": false,
"items": [
"cars[].manufacturer",
"cars[].model"
]
},
{
"key": "cars[]",
"type": "section",
"title": "Extras",
"expandable": true,
"expanded": true,
"orderable": false,
"items": [
"cars[].maxRange",
"cars[].polling"
]
},
{
"key": "cars[].token",
"type": "section",
"title": "Autherization",
"description": "Generated credentials. Do not modify!",
"expandable": true,
"expanded": false,
"orderable": false,
"items": [
"cars[].token.access_token",
"cars[].token.refresh_token",
"cars[].token.token_type",
"cars[].token.expires_in",
"cars[].token.expires_at"
]
}
]
}
]
}