-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.schema.json
125 lines (125 loc) · 3.22 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
{
"pluginAlias": "Music",
"pluginType": "platform",
"singular": true,
"headerDisplay": "Homebridge plugin for iTunes with Airplay speakers",
"footerDisplay": "For details on the AppleScript library, look [here](https://github.com/ebaauw/homebridge-music#applescript).",
"schema": {
"type": "object",
"properties": {
"name": {
"description": "Plugin name as displayed in the Homebridge log.",
"type": "string",
"required": true,
"default": "Music"
},
"track": {
"title": "Default Track",
"description": "Name of the track to play, when no track has been selected.",
"type": "string"
},
"resetTrack": {
"title": "Reset Track",
"description": "Reset current track to default track on stop. Default: false.",
"type": "boolean"
},
"script": {
"title": "AppleScript Library",
"description": "Name of the AppleScript library to interact with the player and speakers, see below. Default: 'Music' or 'iTunes' (depending on macOS version).",
"type": "string"
},
"speakername": {
"title": "Speaker Name Filter",
"description": "Regular expression to be used as filter for speaker names. Default: '.*' (all).",
"type": "string"
},
"service": {
"description": "HomeKit service for Player and Speakers.",
"type": "string",
"required": true,
"default": "switch",
"oneOf": [
{
"title": "Switch",
"enum": [
"switch"
]
},
{
"title": "Lightbulb",
"enum": [
"light"
]
},
{
"title": "Speaker",
"enum": [
"speaker"
]
},
{
"title": "Fan",
"enum": [
"fan"
]
}
]
},
"brightness": {
"description": "Expose volume as Brightness.",
"type": "boolean"
},
"heartrate": {
"description": "Heartbeat interval in seconds. Default: 5.",
"type": "integer",
"minimum": 2,
"maximum": 60
},
"timeout": {
"description": "Timeout in seconds for AppleScript command. Default: 5.",
"type": "integer",
"minumum": 5,
"maximum": 30
}
}
},
"form": [
"name",
"track",
"resetTrack",
{
"type": "fieldset",
"expandable": true,
"title": "What",
"description": "Select what to expose to HomeKit.",
"items": [
"script",
"speakername"
]
},
{
"type": "fieldset",
"expandable": true,
"title": "How",
"description": "Select how to expose Player and Speakers to HomeKit.",
"items": [
"service",
{
"key": "brightness",
"condition": {
"functionBody": "return model.service === 'switch' || model.service === 'speaker'"
}
}
]
},
{
"type": "fieldset",
"expandable": true,
"title": "Advanced Settings",
"items": [
"heartrate",
"timeout"
]
}
]
}