forked from mwittig/pimatic-milight-reloaded
-
Notifications
You must be signed in to change notification settings - Fork 0
/
device-config-schema.coffee
157 lines (157 loc) · 5.53 KB
/
device-config-schema.coffee
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
module.exports = {
title: "Milight device config schemas"
MilightRGBWZone: {
title: "Milight RGBW Zone configuration"
type: "object"
properties:
ip:
description: "The IP address of the Milight bridge"
type: "string"
default: "255.255.255.255"
port:
description: "The port of the Milight bridge (0 = automatically select default port)"
type: "integer"
default: 0
zoneId:
description: "The zone to be controlled, [1-4] and 0 for all zones"
enum: [0, 1, 2, 3, 4]
default: 1
bridgeVersion:
description: "The version of the bridge controller, 'v6' for version 6, and 'legacy' for earlier versions (default)"
enum: ['legacy', 'v6']
default: 'legacy'
commandRepeat:
description: "The number of transmissions sent to the bridge for a command [1-3], default 1"
enum: [1, 2, 3]
default: 1
delayBetweenCommands:
description: "The delay time in ms to wait between transmissions, default 75ms"
type: "integer"
enum: [75, 100, 125, 150]
default: 75
useTwoByteCommands:
description: "Use 2-byte commands if true (default), otherwise use 3-byte commands"
type: "boolean"
default: true
broadcast:
description: "If true use IP broadcast mode, unicast mode is used otherwise"
type: "boolean"
default: false
keepDimlevel:
description: "If true turning on will set the previous dimlevel, otherwise the dimlevel is set to 100"
type: "boolean"
default: false
}
MilightWWCWZone: {
title: "Milight WWCW Zone configuration"
type: "object"
properties:
ip:
description: "The IP address of the Milight bridge"
type: "string"
default: "255.255.255.255"
port:
description: "The port of the Milight bridge (0 = automatically select default port)"
type: "integer"
default: 0
zoneId:
description: "The zone to be controlled, [1-4] and 0 for all zones"
enum: [0, 1, 2, 3, 4]
default: 1
bridgeVersion:
description: "The version of the bridge controller, 'v6' for version 6, and 'legacy' for earlier versions (default)"
enum: ['legacy', 'v6']
default: 'legacy'
commandRepeat:
description: "The number of transmissions sent to the bridge for a command [1-3], default 1"
enum: [1, 2, 3]
default: 1
delayBetweenCommands:
description: "The delay time in ms to wait between transmissions, default 75ms"
type: "integer"
enum: [75, 100, 125, 150]
default: 75
useTwoByteCommands:
description: "Use 2-byte commands if true (default), otherwise use 3-byte commands"
type: "boolean"
default: true
broadcast:
description: "If true use IP broadcast mode, unicast mode is used otherwise"
type: "boolean"
default: false
}
MilightBridgeLight: {
title: "Milight V6 Bridge Light configuration"
type: "object"
properties:
ip:
description: "The IP address of the Milight bridge"
type: "string"
default: "255.255.255.255"
port:
description: "The port of the Milight bridge (0 = automatically select default port)"
type: "integer"
default: 0
delayBetweenCommands:
description: "The delay time in ms to wait between transmissions, default 75ms"
type: "integer"
enum: [75, 100, 125, 150]
default: 75
keepDimlevel:
description: "If true turning on will set the previous dimlevel, otherwise the dimlevel is set to 100"
type: "boolean"
default: false
}
MilightFullColorZone: {
title: "Milight V6 Full Color (RGB WW/CW Light configuration"
type: "object"
properties:
ip:
description: "The IP address of the Milight bridge"
type: "string"
default: "255.255.255.255"
port:
description: "The port of the Milight bridge (0 = automatically select default port)"
type: "integer"
default: 0
zoneId:
description: "The zone to be controlled, [1-4] and 0 for all zones"
enum: [0, 1, 2, 3, 4]
default: 1
delayBetweenCommands:
description: "The delay time in ms to wait between transmissions, default 75ms"
type: "integer"
enum: [75, 100, 125, 150]
default: 75
keepDimlevel:
description: "If true turning on will set the previous dimlevel, otherwise the dimlevel is set to 100"
type: "boolean"
default: false
}
Milight8ChannelFullColorZone: {
title: "Milight V6 Full Color with 8-channel controller configuration"
type: "object"
properties:
ip:
description: "The IP address of the Milight bridge"
type: "string"
default: "255.255.255.255"
port:
description: "The port of the Milight bridge (0 = automatically select default port)"
type: "integer"
default: 0
zoneId:
description: "The zone to be controlled, [1-8] and 0 for all zones"
enum: [0, 1, 2, 3, 4, 5, 6, 7, 8]
default: 1
delayBetweenCommands:
description: "The delay time in ms to wait between transmissions, default 75ms"
type: "integer"
enum: [75, 100, 125, 150]
default: 75
keepDimlevel:
description: "If true turning on will set the previous dimlevel, otherwise the dimlevel is set to 100"
type: "boolean"
default: false
}
}