forked from bitfocus/companion-module-fora-hvs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protocol_hvs2000.js
282 lines (275 loc) · 9.69 KB
/
protocol_hvs2000.js
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
module.exports = {
HVS2000: {
COMMANDS: {
GET_INPUTS: 'GET.SIGNALS_INFO',
GET_STATE: 'GET.PNL_ALLDATA',
//REBOOT: "CMD.020103", // Not supported on HVS2000
// event: 2-digit hex for the selected event
//RECALL_EVENT: "CMD.030502{event}",
// macroInt: which macro to recall
RECALL_MACRO: 'SET.MACRO_PLAY:{macroInt}=0',
// me: which me to transition
TRANS_ME_AUTO: 'SET.M{me}BG_TRANSITION:AUTO',
// me: which me to transition
TRANS_ME_CUT: 'SET.M{me}BG_TRANSITION:CUT',
// me: which me owns the key
// key: which key to transition
TRANS_KEY_AUTO: 'SET.M{me}K{key}_TRANSITION:AUTO',
// me: which me owns the key
// key: which key to transition
TRANS_KEY_CUT: 'SET.M{me}K{key}_TRANSITION:CUT',
// key: which flex key to transition
TRANS_FLEX_KEY_AUTO: 'SET.FLX{key}_TRANSITION:AUTO',
// key: which flex key to transition
TRANS_FLEX_KEY_CUT: 'SET.FLX{key}_TRANSITION:CUT',
// me: which me to set
// layer: which layer to set
// source: id of the selected source
XPT_ME: 'SET.M{me}BG_XPT_{layer}:{source}',
// aux: which aux to set
// source: id of the selected source
XPT_AUX: 'SET.AUX{aux}_XPT:{source}',
// mel: which mel to transition
TRANS_MEL_AUTO: 'SET.MEL{mel}_TRANSITION:AUTO',
// mel: which mel to transition
TRANS_MEL_CUT: 'SET.MEL{mel}_TRANSITION:CUT',
// mel: which mel to set
// layer: which layer to set
// source: id of the selected source
XPT_MEL: 'SET.MEL{mel}BG_XPT_{layer}:{source}',
},
ME_LAYERS: { A: 'PGM', B: 'PST' },
AUXES: [
{ id: 1, label: 'Aux 1' },
{ id: 2, label: 'Aux 2' },
{ id: 3, label: 'Aux 3' },
{ id: 4, label: 'Aux 4' },
{ id: 5, label: 'Aux 5' },
{ id: 6, label: 'Aux 6' },
{ id: 7, label: 'Aux 7' },
{ id: 8, label: 'Aux 8' },
{ id: 9, label: 'Aux 9' },
{ id: 10, label: 'Aux 10' },
{ id: 11, label: 'Aux 11' },
{ id: 12, label: 'Aux 12' },
{ id: 13, label: 'Aux 13' },
{ id: 14, label: 'Aux 14' },
{ id: 15, label: 'Aux 15' },
{ id: 16, label: 'Aux 16' },
{ id: 17, label: 'Aux 17' },
{ id: 18, label: 'Aux 18' },
],
VARIABLES: [
{ label: 'Last global event to be recalled', name: 'global_event_recall' },
{ label: 'Last ME1 event to be recalled', name: 'me_1_event_recall' },
{ label: 'Last ME2 event to be recalled', name: 'me_2_event_recall' },
{ label: 'Last ME3 event to be recalled', name: 'me_3_event_recall' },
{ label: 'ME1 KEY 1 on/off', name: 'me_1_key_1' },
{ label: 'ME1 KEY 2 on/off', name: 'me_1_key_2' },
{ label: 'ME1 KEY 3 on/off', name: 'me_1_key_3' },
{ label: 'ME1 KEY 4 on/off', name: 'me_1_key_4' },
{ label: 'ME2 KEY 1 on/off', name: 'me_2_key_1' },
{ label: 'ME2 KEY 2 on/off', name: 'me_2_key_2' },
{ label: 'ME2 KEY 3 on/off', name: 'me_2_key_3' },
{ label: 'ME2 KEY 4 on/off', name: 'me_2_key_4' },
{ label: 'ME3 KEY 1 on/off', name: 'me_3_key_1' },
{ label: 'ME3 KEY 2 on/off', name: 'me_3_key_2' },
{ label: 'ME3 KEY 3 on/off', name: 'me_3_key_3' },
{ label: 'ME3 KEY 4 on/off', name: 'me_3_key_4' },
{ label: 'FLEX KEY 1 on/off', name: 'flex_key_1' },
{ label: 'FLEX KEY 2 on/off', name: 'flex_key_2' },
{ label: 'FLEX KEY 3 on/off', name: 'flex_key_3' },
{ label: 'FLEX KEY 4 on/off', name: 'flex_key_4' },
],
MES: [
{ id: 1, label: 'ME 1' },
{ id: 2, label: 'ME 2' },
{ id: 3, label: 'ME 3' },
],
MELS: [
{ id: 1, label: 'MELite 1' },
{ id: 2, label: 'MELite 2' },
{ id: 3, label: 'MELite 3' },
{ id: 4, label: 'MELite 4' },
{ id: 5, label: 'MELite 5' },
{ id: 6, label: 'MELite 6' },
],
KEYS: [
{ id: '1,1', label: 'ME1 Key1' },
{ id: '1,2', label: 'ME1 Key2' },
{ id: '1,3', label: 'ME1 Key3' },
{ id: '1,4', label: 'ME1 Key4' },
{ id: '2,1', label: 'ME2 Key1' },
{ id: '2,2', label: 'ME2 Key2' },
{ id: '2,3', label: 'ME2 Key3' },
{ id: '2,4', label: 'ME2 Key4' },
{ id: '3,1', label: 'ME3 Key1' },
{ id: '3,2', label: 'ME3 Key2' },
{ id: '3,3', label: 'ME3 Key3' },
{ id: '3,4', label: 'ME3 Key4' },
],
FLEX_KEYS: [
{ id: 1, label: 'Flex Key1' },
{ id: 2, label: 'Flex Key2' },
{ id: 3, label: 'Flex Key3' },
{ id: 4, label: 'Flex Key4' },
],
get SOURCES_ME() {
let sources = [
// Built-in Inputs
{ id: 1, label: 'Source 1' },
{ id: 2, label: 'Source 2' },
{ id: 3, label: 'Source 3' },
{ id: 4, label: 'Source 4' },
{ id: 5, label: 'Source 5' },
{ id: 6, label: 'Source 6' },
{ id: 7, label: 'Source 7' },
{ id: 8, label: 'Source 8' },
{ id: 9, label: 'Source 9' },
{ id: 10, label: 'Source 10' },
{ id: 11, label: 'Source 11' },
{ id: 12, label: 'Source 12' },
{ id: 13, label: 'Source 13' },
{ id: 14, label: 'Source 14' },
{ id: 15, label: 'Source 15' },
{ id: 16, label: 'Source 16' },
{ id: 17, label: 'Source 17' },
{ id: 18, label: 'Source 18' },
{ id: 19, label: 'Source 19' },
{ id: 20, label: 'Source 20' },
{ id: 21, label: 'Source 21' },
{ id: 22, label: 'Source 22' },
{ id: 23, label: 'Source 23' },
{ id: 24, label: 'Source 24' },
// Optional expansion card inputs
{ id: 25, label: 'Source 25' },
{ id: 26, label: 'Source 26' },
{ id: 27, label: 'Source 27' },
{ id: 28, label: 'Source 28' },
{ id: 29, label: 'Source 29' },
{ id: 30, label: 'Source 30' },
{ id: 31, label: 'Source 31' },
{ id: 32, label: 'Source 32' },
{ id: 33, label: 'Source 33' },
{ id: 34, label: 'Source 34' },
{ id: 35, label: 'Source 35' },
{ id: 36, label: 'Source 36' },
{ id: 37, label: 'Source 37' },
{ id: 38, label: 'Source 38' },
{ id: 39, label: 'Source 39' },
{ id: 40, label: 'Source 40' },
{ id: 41, label: 'Source 41' },
{ id: 42, label: 'Source 42' },
{ id: 43, label: 'Source 43' },
{ id: 44, label: 'Source 44' },
{ id: 45, label: 'Source 45' },
{ id: 46, label: 'Source 46' },
{ id: 47, label: 'Source 47' },
{ id: 48, label: 'Source 48' },
]
let system = [
// System inputs
{ id: 0, label: 'Black' },
{ id: 49, label: 'Still 1' },
{ id: 50, label: 'Still 2' },
{ id: 51, label: 'Still 3' },
{ id: 52, label: 'Still 4' },
{ id: 53, label: 'Still 5' },
{ id: 54, label: 'Still 6' },
{ id: 61, label: 'Color Bars' },
{ id: 62, label: 'White' },
{ id: 63, label: 'Matte 1' },
{ id: 64, label: 'Matte 2' },
{ id: 65, label: 'Grand Matte' },
{ id: 72, label: 'ME1' },
{ id: 73, label: 'ME1 Out 1' },
{ id: 74, label: 'ME1 Out 2' },
{ id: 75, label: 'ME2' },
{ id: 76, label: 'ME2 Out 1' },
{ id: 77, label: 'ME2 Out 2' },
{ id: 80, label: 'MV1 Out A' },
{ id: 81, label: 'MV2 Out A' },
{ id: 84, label: 'ME3' },
{ id: 85, label: 'ME3 Out 1' },
{ id: 86, label: 'ME3 Out 2' },
{ id: 95, label: 'MV3 Out A' },
{ id: 96, label: 'MV4 Out A' },
{ id: 105, label: 'ME1 Out 3' },
{ id: 106, label: 'ME2 Out 3' },
{ id: 107, label: 'ME3 Out 3' },
{ id: 108, label: 'Chroma Key 1 Fill' },
{ id: 109, label: 'Chroma Key 1 Key' },
{ id: 110, label: 'Chroma Key 2 Fill' },
{ id: 111, label: 'Chroma Key 2 Key' },
{ id: 112, label: 'Chroma Key 3 Fill' },
{ id: 113, label: 'Chroma Key 3 Key' },
{ id: 114, label: 'Chroma Key 4 Fill' },
{ id: 115, label: 'Chroma Key 4 Key' },
{ id: 116, label: 'Chroma Key 5 Fill' },
{ id: 117, label: 'Chroma Key 5 Key' },
{ id: 118, label: 'Chroma Key 6 Fill' },
{ id: 119, label: 'Chroma Key 6 Key' },
{ id: 120, label: 'Chroma Key 7 Fill' },
{ id: 121, label: 'Chroma Key 7 Key' },
{ id: 122, label: 'Chroma Key 8 Fill' },
{ id: 123, label: 'Chroma Key 8 Key' },
{ id: 124, label: 'Effect 1' },
{ id: 125, label: 'Effect 2' },
{ id: 126, label: 'Effect 3' },
{ id: 127, label: 'Effect 4' },
{ id: 130, label: 'Color Correct 1' },
{ id: 131, label: 'Color Correct 2' },
{ id: 132, label: 'Color Correct 3' },
{ id: 133, label: 'Color Correct 4' },
{ id: 134, label: 'Color Correct 5' },
{ id: 135, label: 'Color Correct 6' },
{ id: 136, label: 'Color Correct 7' },
{ id: 137, label: 'Color Correct 8' },
{ id: 139, label: 'Aux 1' },
{ id: 140, label: 'Aux 2' },
{ id: 141, label: 'Aux 3' },
{ id: 142, label: 'Aux 4' },
{ id: 143, label: 'Aux 5' },
{ id: 144, label: 'Aux 6' },
{ id: 145, label: 'Aux 7' },
{ id: 146, label: 'Aux 8' },
{ id: 147, label: 'Aux 9' },
{ id: 148, label: 'Aux 10' },
{ id: 149, label: 'Aux 11' },
{ id: 150, label: 'Aux 12' },
{ id: 151, label: 'Aux 13' },
{ id: 152, label: 'Aux 14' },
{ id: 153, label: 'Aux 15' },
{ id: 154, label: 'Aux 16' },
{ id: 155, label: 'Aux 17' },
{ id: 156, label: 'Aux 18' },
{ id: 157, label: 'MELite 1 PGM' },
{ id: 158, label: 'MELite 2 PGM' },
{ id: 159, label: 'MELite 3 PGM' },
{ id: 160, label: 'MELite 4 PGM' },
{ id: 161, label: 'MELite 5 PGM' },
{ id: 162, label: 'MELite 6 PGM' },
{ id: 163, label: 'MELite 1 PVW' },
{ id: 164, label: 'MELite 2 PVW' },
{ id: 165, label: 'MELite 3 PVW' },
{ id: 166, label: 'MELite 4 PVW' },
{ id: 167, label: 'MELite 5 PVW' },
{ id: 168, label: 'MELite 6 PVW' },
{ id: 169, label: 'Still 1 Key' },
{ id: 170, label: 'Still 2 Key' },
{ id: 171, label: 'Still 3 Key' },
{ id: 172, label: 'Still 4 Key' },
{ id: 173, label: 'Still 5 Key' },
{ id: 174, label: 'Still 6 Key' },
{ id: 175, label: 'MV1 Out B' },
{ id: 176, label: 'MV2 Out B' },
{ id: 177, label: 'MV3 Out B' },
{ id: 178, label: 'MV4 Out B' },
]
return sources.concat(system.sort((a, b) => (a.label > b.label ? 1 : -1)))
},
get SOURCES_AUX() {
return this.SOURCES_ME // HVS2000 Has no Aux-only sources
},
},
}