-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.schema.json
116 lines (116 loc) · 4.04 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
{
"pluginAlias": "GpioGarageDoor",
"pluginType": "accessory",
"singular": false,
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"required": true,
"placeholder": "Garage door",
"default": "Garage door"
},
"gpioPinOpen": {
"title": "GPIO pin for open signal",
"description": "The GPIO pin the plugin should use to open the garage door.",
"type": "integer",
"required": true,
"placeholder": "e.g. 7 for GPIO 4"
},
"gpioPinClose": {
"title": "GPIO pin for close signal",
"description": "The GPIO pin the plugin should use to close the garage door. This can be the same as the pin for opening.",
"type": "integer",
"required": true,
"placeholder": "e.g. 7 for GPIO 4"
},
"emitTime": {
"title": "Emit time",
"description": "How many milliseconds should the GPIO output be HIGH?",
"type": "number",
"required": true,
"default": 500
},
"executionTime": {
"title": "Execution time",
"description": "How many seconds does the garage door to execute an open or close command?",
"type": "number",
"default": 10
},
"allowCommandOverride": {
"title": "Allow command override",
"description": "Define if sending a new command while the garage door is still executing the previous command should be allowed.",
"type": "boolean",
"default": false
},
"reverseOutput": {
"title": "Negate output",
"description": "If enabled, a open signal will be sent as HIGH-LOW-HIGH, instead of the default behaviour LOW-HIGH-LOW.",
"type": "boolean",
"default": false
},
"gpioStateInputEnabled": {
"title": "Enable GPIO state input",
"description": "If enabled, the plugin will read the state of the garage door from a GPIO pin.",
"type": "boolean",
"default": false
},
"gpioPinState": {
"title": "GPIO pin for state input",
"description": "The GPIO pin the plugin should use to read the state of the garage door. A HIGH signal will indicate an OPEN garage door.",
"type": "integer",
"placeholder": "e.g. 7 for GPIO 4"
},
"gpioStateInputReverse": {
"title": "Reverse GPIO state input",
"description": "If enabled, a GPIO HIGH state will indicate a CLOSED garage door.",
"type": "boolean",
"default": false
},
"webhookEnabled": {
"title": "Enable webhook",
"description": "If enabled, the plugin will expose a webhook to open or close the garage door.",
"type": "boolean",
"default": false
},
"webhookPort": {
"title": "Webhook port",
"description": "The port the webhook should listen on.",
"type": "integer",
"default": 8352,
"condition": {
"functionBody": "return model.webhookEnabled === true;"
}
},
"webhookPath": {
"title": "Webhook path",
"description": "The path the webhook should listen on.",
"type": "string",
"default": "/garage-door",
"condition": {
"functionBody": "return model.webhookEnabled === true;"
}
},
"webhookJsonPath": {
"title": "Webhook JSON path",
"description": "The JSON path to the value of the garage door state. A truthy value indicates an open garage door.",
"type": "string",
"default": "$.value",
"condition": {
"functionBody": "return model.webhookEnabled === true;"
}
},
"webhookJsonValueReverse": {
"title": "Reverse JSON value",
"description": "If enabled, the plugin will reverse the value of the JSON path. E.g. a truthy value will become falsy.",
"type": "boolean",
"default": false,
"condition": {
"functionBody": "return model.webhookEnabled === true;"
}
}
}
}
}