generated from homebridge/homebridge-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.schema.json
99 lines (99 loc) · 5.06 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
{
"pluginAlias": "HomebridgeShortcutsButtons",
"pluginType": "platform",
"singular": true,
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the platform bridge.",
"default": "Homebridge Shortcuts Buttons"
},
"accessoryName": {
"type": "string",
"description": "Display name of the accessory.",
"default": "Shortcuts"
},
"serviceType": {
"type": "string",
"title": "Display buttons as",
"enum": ["Outlet", "Switch"],
"description": "Display the buttons services as outlets or as switches.",
"default": "Outlet"
},
"services": {
"type": "array",
"title": "Buttons",
"description": "List of buttons configuration objects.",
"uniqueItems": true,
"minItems": 1,
"items": {
"type": "object",
"properties": {
"serviceName": {
"type": "string",
"title": "Button name",
"description": "A name to display for this button."
},
"shortcutName": {
"type": "string",
"title": "Shortcut name",
"description": "Name of the Apple Shortcut to trigger, as displayed in the Shortcuts app. The machine running Homebridge must have access to it (i.e. be logged to the correct iCloud account)."
}
},
"required": ["serviceName", "shortcutName"]
}
},
"callbackServerEnabled": {
"type": "boolean",
"title": "Enable Callback Command",
"description": "Whether the plugin should execute a command once a shortcut run completes. This determines whether to run an internal x-callback-url http server in the background.<br>\nAll fields below depend on this one: any value inserted in the following fields will be ignored if this one value is set to false.",
"default": true
},
"callbackCommandType": {
"type": "string",
"enum": ["Default (display notification)", "Custom unix command", "Shortcut name"],
"description": "With the default option, after the shortcut completion, a notification with the outcome of the shortcut run is displayed on the host running Homebrige.<br>\nIf you choose to customize the callback behaviour, you have two choices: use any unix command that your host is able to execute, or just use another shortcut to handle the callback if you like. Depending on which choice you make, you'll have to fill in the next field accordingly.<br>\nPlease consult the dedicated documentation for more detail: <a href=\"https://github.com/duddu/homebridge-shortcuts-buttons/blob/latest/README.md#callback-command\">Callback command</a>.",
"default": "Default (display notification)"
},
"callbackCustomCommand": {
"type": "string",
"description": "Either a unix command or the name of a shortcut to run, depending on the value selected in the previous field. In the former case, all the content of the field will be treated as a command and executed: in the latter, this field expects just the plain name of the shortcut as displayed in the Shortcuts app. If you left the previous field on the default value, any text inserted here will be ignored.<br>\nPlease consult the dedicated documentation for more details also regarding the runtime variables available during your command/shortcut execution: <a href=\"https://github.com/duddu/homebridge-shortcuts-buttons/blob/latest/README.md#callback-command\">Callback command</a>."
},
"callbackCommandTimeout": {
"type": "number",
"description": "The time in milliseconds that the x-callback-url server should wait for the callback command execution to complete before timing out. Note: this matters only in case of custom callback command; if you chose a shortcut, the actual command executed is only the launch of it, the run itself is indipendent from the plugin.",
"default": 5000
},
"callbackServerHostname": {
"type": "string",
"description": "IPv4 address or hostname to expose the internal x-callback-url http server (must be accessible from a browser on the machine running Homebridge).",
"default": "127.0.0.1"
},
"callbackServerPort": {
"type": "number",
"description": "A free port number to be used by the internal x-callback-url http server.",
"default": 63963
},
"callbackServerProtocol": {
"type": "string",
"enum": ["http", "https"],
"description": "If you access other Homebridge services (e.g. UI) behind a reverse proxy with TLS certificate installed, you may want to access the x-callback-url server via https as well.",
"default": "http"
}
},
"required": [
"name",
"accessoryName",
"serviceType",
"services",
"callbackServerEnabled",
"callbackCommandType",
"callbackCommandTimeout",
"callbackServerHostname",
"callbackServerPort",
"callbackServerProtocol"
]
}
}