isy-nodejs 0.5.0-beta.55 → 0.5.0-beta.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/lib/ISY.d.ts +1 -0
  2. package/lib/ISY.js +16 -1
  3. package/package.json +9 -1
  4. package/.babelrc +0 -12
  5. package/.travis.yml +0 -8
  6. package/ISYNodesDump.json +0 -1368
  7. package/isySampleOutput/config.json +0 -1825
  8. package/scratch.js +0 -95
  9. package/src/Categories.ts +0 -19
  10. package/src/Devices/DeviceFactory.ts +0 -20
  11. package/src/Devices/Elk/ElkAlarmPanelDevice.ts +0 -190
  12. package/src/Devices/Elk/ElkAlarmSensorDevice.ts +0 -104
  13. package/src/Devices/ISYDevice.ts +0 -282
  14. package/src/Devices/Insteon/InsteonBallastDimmerDevice.ts +0 -6
  15. package/src/Devices/Insteon/InsteonBaseDevice.ts +0 -43
  16. package/src/Devices/Insteon/InsteonCOSensorDevice.ts +0 -12
  17. package/src/Devices/Insteon/InsteonDeviceFactory.ts +0 -823
  18. package/src/Devices/Insteon/InsteonDimmableDevice.ts +0 -16
  19. package/src/Devices/Insteon/InsteonDimmerOutletDevice.ts +0 -7
  20. package/src/Devices/Insteon/InsteonDimmerSwitchDevice.ts +0 -8
  21. package/src/Devices/Insteon/InsteonDoorWindowSensorDevice.ts +0 -12
  22. package/src/Devices/Insteon/InsteonFanDevice.ts +0 -73
  23. package/src/Devices/Insteon/InsteonKeypadDevice.ts +0 -9
  24. package/src/Devices/Insteon/InsteonKeypadDimmerDevice.ts +0 -10
  25. package/src/Devices/Insteon/InsteonKeypadRelayDevice.ts +0 -7
  26. package/src/Devices/Insteon/InsteonLeakSensorDevice.ts +0 -12
  27. package/src/Devices/Insteon/InsteonLockDevice.ts +0 -42
  28. package/src/Devices/Insteon/InsteonMotionSensorDevice.ts +0 -43
  29. package/src/Devices/Insteon/InsteonOnOffOutletDevice.ts +0 -22
  30. package/src/Devices/Insteon/InsteonRelayDevice.ts +0 -21
  31. package/src/Devices/Insteon/InsteonRelaySwitchDevice.ts +0 -8
  32. package/src/Devices/Insteon/InsteonSmokeSensorDevice.ts +0 -12
  33. package/src/Devices/Insteon/InsteonThermostatDevice.ts +0 -39
  34. package/src/Devices/Insteon/insteondevice.ts +0 -41
  35. package/src/Events/EventType.ts +0 -27
  36. package/src/Events/ISYEvent.ts +0 -9
  37. package/src/Events/NodeEvent.ts +0 -9
  38. package/src/Events/PropertyChangedEvent.ts +0 -11
  39. package/src/Families.ts +0 -30
  40. package/src/ISY.ts +0 -768
  41. package/src/ISYConstants.ts +0 -182
  42. package/src/ISYNode.ts +0 -195
  43. package/src/ISYScene.ts +0 -120
  44. package/src/ISYVariable.ts +0 -49
  45. package/src/isyproductinfo.json +0 -378
  46. package/src/utils.ts +0 -108
  47. package/test/testsuite.js +0 -607
  48. package/tsconfig.json +0 -27
  49. package/tslint.json +0 -28
@@ -1,378 +0,0 @@
1
- [
2
-
3
-
4
-
5
- {
6
- "type": "1.0.51.0",
7
- "address": "",
8
- "manufacturer": "Insteon",
9
- "name": "(2456D3) LampLinc v.33",
10
- "deviceType": "DimmableLight",
11
- "connectionType": "Insteon Wired",
12
- "batteryOperated": false
13
- }, {
14
- "type": "1.0.55.0",
15
- "address": "",
16
- "name": "(2456D3) LampLinc v.37",
17
- "deviceType": "DimmableLight",
18
- "connectionType": "Insteon Wired",
19
- "batteryOperated": false
20
- }, {
21
- "type": "1.0.56.0",
22
- "address": "",
23
- "name": "(2456D3) LampLinc v.38",
24
- "deviceType": "DimmableLight",
25
- "connectionType": "Insteon Wired",
26
- "batteryOperated": false
27
- }, {
28
- "type": "1.14.58.0",
29
- "address": "",
30
- "name": "(B2457D2) LampLinc BiPhy v.3A",
31
- "deviceType": "DimmableLight",
32
- "connectionType": "Insteon Wireless",
33
- "batteryOperated": false
34
- }, {
35
- "type": "1.14.65.0",
36
- "address": "",
37
- "name": "(B2457D2) Dual Band LampLinc Dimmer v.41",
38
- "deviceType": "DimmableLight",
39
- "connectionType": "Insteon Wireless",
40
- "batteryOperated": false
41
- }, {
42
- "type": "1.14.67.0",
43
- "address": "",
44
- "name": "(B2457D2) Dual Band LampLinc Dimmer v.43",
45
- "deviceType": "DimmableLight",
46
- "connectionType": "Insteon Wireless",
47
- "batteryOperated": false
48
- }, {
49
- "type": "1.1.39.0",
50
- "address": "",
51
- "name": "(2476D) SwitchLinc Dimmer v.27",
52
- "deviceType": "DimmableLight",
53
- "connectionType": "Insteon Wired",
54
- "batteryOperated": false
55
- }, {
56
- "type": "1.1.55.0",
57
- "address": "",
58
- "name": "(2476D) SwitchLinc Dimmer v.37",
59
- "deviceType": "DimmableLight",
60
- "connectionType": "Insteon Wired",
61
- "batteryOperated": false
62
- }, {
63
- "type": "1.1.56.0",
64
- "address": "",
65
- "name": "(2476D) SwitchLinc Dimmer v.38",
66
- "deviceType": "DimmableLight",
67
- "connectionType": "Insteon Wired",
68
- "batteryOperated": false
69
- }, {
70
- "type": "1.25.56.0",
71
- "address": "",
72
- "name": "(2476D) SwitchLinc Dimmer W/Beeper v.38",
73
- "deviceType": "DimmableLight",
74
- "connectionType": "Insteon Wired",
75
- "batteryOperated": false
76
- }, {
77
- "type": "1.9.41.0",
78
- "address": "",
79
- "name": "(2486D) KeypadLinc Dimmer v.29",
80
- "deviceType": "DimmableLight",
81
- "connectionType": "Insteon Wired",
82
- "batteryOperated": false
83
- }, {
84
- "type": "1.12.45.0",
85
- "address": "",
86
- "name": "(2486DWH8) KeypadLinc Dimmer 8 Buttons v.2D",
87
- "deviceType": "DimmableLight",
88
- "connectionType": "Insteon Wired",
89
- "batteryOperated": false
90
- }, {
91
- "type": "1.27.54.0",
92
- "address": "",
93
- "name": "(2486D) KeypadLinc Dimmer 6 Buttons v.36",
94
- "deviceType": "DimmableLight",
95
- "connectionType": "Insteon Wired",
96
- "batteryOperated": false
97
- }, {
98
- "type": "1.27.65.0",
99
- "address": "",
100
- "name": "(2486D) KeypadLinc Dimmer 6 Buttons v.41",
101
- "deviceType": "DimmableLight",
102
- "connectionType": "Insteon Wired",
103
- "batteryOperated": false
104
- }, {
105
- "type": "1.28.54.0",
106
- "address": "",
107
- "name": "(2486D) KeypadLinc Dimmer 8 Buttons v.36",
108
- "deviceType": "DimmableLight",
109
- "connectionType": "Insteon Wired",
110
- "batteryOperated": false
111
- }, {
112
- "type": "1.28.65.0",
113
- "address": "",
114
- "name": "(2486D) KeypadLinc Dimmer 8 Buttons v.41",
115
- "deviceType": "DimmableLight",
116
- "connectionType": "Insteon Wired",
117
- "batteryOperated": false
118
- }, {
119
- "type": "1.32.64.0",
120
- "address": "",
121
- "name": "(2477D) Dual Band SwitchLinc Dimmer v.40",
122
- "deviceType": "DimmableLight",
123
- "connectionType": "Insteon Wireless",
124
- "batteryOperated": true
125
- }, {
126
- "type": "1.32.65.0",
127
- "address": "",
128
- "name": "(2477D) Dual Band SwitchLinc Dimmer v.41",
129
- "deviceType": "DimmableLight",
130
- "connectionType": "Insteon Wireless",
131
- "batteryOperated": false
132
- }, {
133
- "type": "1.32.68.0",
134
- "address": "",
135
- "name": "(2477D) Dual Band SwitchLinc Dimmer v.44",
136
- "deviceType": "DimmableLight",
137
- "connectionType": "Insteon Wireless",
138
- "batteryOperated": false
139
- }, {
140
- "type": "1.32.69.0",
141
- "address": "",
142
- "name": "(2477D) Dual Band SwitchLinc Dimmer v.45",
143
- "deviceType": "DimmableLight",
144
- "connectionType": "Insteon Wireless",
145
- "batteryOperated": false
146
- }, {
147
- "type": "1.33.65.0",
148
- "address": "",
149
- "name": "(2472dwh) Insteon OutletLinc Dimmer",
150
- "deviceType": "DimmableLight",
151
- "connectionType": "Insteon Wireless",
152
- "batteryOperated": false
153
- }, {
154
- "type": "1.46.65.0",
155
- "address": "1",
156
- "name": "(2475F) FanLinc v.41",
157
- "deviceType": "DimmableLight",
158
- "connectionType": "Insteon Wired",
159
- "batteryOperated": false
160
- }, {
161
- "type": "1.46.65.0",
162
- "address": "2",
163
- "name": "(2475F) FanLinc v.41",
164
- "deviceType": "Fan",
165
- "connectionType": "Insteon Wired",
166
- "batteryOperated": false
167
- }, {
168
- "type": "1.65.67.0",
169
- "address": "",
170
- "name": "(2334-2) KeypadLinc Dimmer 8 Buttons v.43",
171
- "deviceType": "DimmableLight",
172
- "connectionType": "Insteon Wired",
173
- "batteryOperated": false
174
- }, {
175
- "type": "1.66.67.0",
176
- "address": "",
177
- "name": "(2334-2) KeypadLinc Dimmer 5 Buttons v.43",
178
- "deviceType": "DimmableLight",
179
- "connectionType": "Insteon Wired",
180
- "batteryOperated": false
181
- }, {
182
- "type": "1.65.69.0",
183
- "address": "",
184
- "name": "(2334-222) KeypadLinc Dimmer 8 Buttons",
185
- "deviceType": "DimmableLight",
186
- "connectionType": "Insteon Wireless",
187
- "batteryOperated": false
188
- }, {
189
- "type": "2.9.66.0",
190
- "address": "",
191
- "name": "(2456S3) ApplianceLinc v.42",
192
- "deviceType": "Outlet",
193
- "connectionType": "Insteon Wired",
194
- "batteryOperated": false
195
- }, {
196
- "type": "2.13.53.0",
197
- "address": "",
198
- "name": "(2466S) ToggleLinc",
199
- "deviceType": "Light",
200
- "connectionType": "Insteon Wired",
201
- "batteryOperated": false
202
- }, {
203
- "type": "2.15.54.0",
204
- "address": "",
205
- "name": "(2486S/WH6) KeypadLinc Relay v.36",
206
- "deviceType": "Light",
207
- "connectionType": "Insteon Wired",
208
- "batteryOperated": false
209
- }, {
210
- "type": "2.15.54.157",
211
- "address": "",
212
- "name": "(2486S/WH6) KeypadLinc Relay v.36",
213
- "deviceType": "Light",
214
- "connectionType": "Insteon Wired",
215
- "batteryOperated": false
216
- }, {
217
- "type": "2.20.56.0",
218
- "address": "",
219
- "name": "(B2475S) In-LineLinc Relay W/ Sense v.38",
220
- "deviceType": "Light",
221
- "connectionType": "Insteon Wired",
222
- "batteryOperated": false
223
- }, {
224
- "type": "2.20.56.157",
225
- "address": "",
226
- "name": "(B2475S) In-LineLinc Relay W/ Sense v.38",
227
- "deviceType": "Light",
228
- "connectionType": "Insteon Wired",
229
- "batteryOperated": false
230
- }, {
231
- "type": "2.22.57.0",
232
- "address": "",
233
- "name": "(28763B) Icon Relay Switch v.39",
234
- "deviceType": "Fan",
235
- "connectionType": "Insteon Wired",
236
- "batteryOperated": false
237
- }, {
238
- "type": "2.26.65.0",
239
- "address": "",
240
- "name": "(2466S) ToggleLinc Relay v.41",
241
- "deviceType": "Light",
242
- "connectionType": "Insteon Wired",
243
- "batteryOperated": false
244
- }, {
245
- "type": "2.28.58.0",
246
- "address": "",
247
- "name": "(2476S) SwitchLinc Relay - Remote Control On/Off Switch v.3A",
248
- "deviceType": "Light",
249
- "connectionType": "Insteon Wired",
250
- "batteryOperated": false
251
- }, {
252
- "type": "2.42.67.0",
253
- "address": "",
254
- "name": "(2477S) Dual Band SwitchLinc On/Off Switch v.43",
255
- "deviceType": "Light",
256
- "connectionType": "Insteon Wireless",
257
- "batteryOperated": false
258
- }, {
259
- "type": "2.55.70.0",
260
- "address": "",
261
- "name": "(2635-222) Insteon On/Off Module",
262
- "deviceType": "Outlet",
263
- "connectionType": "Insteon Wireless",
264
- "batteryOperated": false
265
- }, {
266
- "type": "2.55.72.0",
267
- "address": "",
268
- "name": "(2635-222) On/Off Module v.48",
269
- "deviceType": "Outlet",
270
- "connectionType": "Insteon Wired",
271
- "batteryOperated": false
272
- }, {
273
- "type": "2.57.68.0",
274
- "address": "1",
275
- "name": "(2663-222) Insteon Dual On/Off Top",
276
- "deviceType": "Outlet",
277
- "connectionType": "Insteon Wireless",
278
- "batteryOperated": false
279
- }, {
280
- "type": "2.57.68.0",
281
- "address": "2",
282
- "name": "(2663-222) Insteon Dual On/Off Outlet Bottom",
283
- "deviceType": "Outlet",
284
- "connectionType": "Insteon Wireless",
285
- "batteryOperated": false
286
- }, {
287
- "type": "2.44.65.0",
288
- "address": "",
289
- "name": "(2487S) Dual Band KeypadLinc Relay v.41",
290
- "deviceType": "Light",
291
- "connectionType": "Insteon Wireless",
292
- "batteryOperated": false
293
- }, {
294
- "type": "4.16.1.0",
295
- "address": "",
296
- "name": "ZW002_1 - On/Off Power Switch",
297
- "deviceType": "Light",
298
- "connectionType": "ZWave",
299
- "batteryOperated": false
300
- }, {
301
- "type": "4.64.3.0",
302
- "address": "",
303
- "name": "Yale Door Lock",
304
- "deviceType": "SecureLock",
305
- "connectionType": "ZWave",
306
- "batteryOperated": true
307
- }, {
308
- "type": "7.0.54.0",
309
- "address": "1",
310
- "name": "(2450) IOLinc v.36",
311
- "deviceType": "DoorWindowSensor",
312
- "connectionType": "Insteon Wired",
313
- "batteryOperated": false
314
- }, {
315
- "type": "7.0.65.0",
316
- "address": "1",
317
- "name": "(2450) IOLinc v.41",
318
- "deviceType": "DoorWindowSensor",
319
- "connectionType": "Insteon Wired",
320
- "batteryOperated": false
321
- }, {
322
- "type": "15.6.66.0",
323
- "address": "1",
324
- "name": "MorningLinc v.42",
325
- "deviceType": "DoorLock",
326
- "connectionType": "Insteon MorningLinc",
327
- "batteryOperated": false
328
- }, {
329
- "type": "16.1.0.0",
330
- "address": "1",
331
- "name": "(2842-2) Insteon Motion Sensor",
332
- "deviceType": "MotionSensor",
333
- "connectionType": "Insteon Wireless",
334
- "batteryOperated": true
335
- }, {
336
- "type": "16.1.36.0",
337
- "address": "1",
338
- "name": "(2842-222) Insteon Motion Sensor v.24",
339
- "deviceType": "MotionSensor",
340
- "connectionType": "Insteon Wireless",
341
- "batteryOperated": true
342
- }, {
343
- "type": "16.1.38.0",
344
- "address": "1",
345
- "name": "(2842-222) Insteon Motion Sensor v.24",
346
- "deviceType": "MotionSensor",
347
- "connectionType": "Insteon Wireless",
348
- "batteryOperated": true
349
- }, {
350
- "type": "16.1.65.0",
351
- "address": "1",
352
- "name": "(2842-222) Insteon Motion Sensor",
353
- "deviceType": "MotionSensor",
354
- "connectionType": "Insteon Wireless",
355
- "batteryOperated": true
356
- }, {
357
- "type": "16.2.0.0",
358
- "address": "",
359
- "name": "(2421) TriggerLinc v.00",
360
- "deviceType": "DoorWindowSensor",
361
- "connectionType": "Insteon Wireless",
362
- "batteryOperated": true
363
- }, {
364
- "type": "16.2.40.0",
365
- "address": "",
366
- "name": "(2421) TriggerLinc v.28",
367
- "deviceType": "DoorWindowSensor",
368
- "connectionType": "Insteon Wireless",
369
- "batteryOperated": true
370
- }, {
371
- "type": "5.3.149.0",
372
- "address": "1",
373
- "name": "(2441V) Insteon Thermostat Adapter v.95",
374
- "deviceType": "Thermostat",
375
- "connectionType": "Insteon Wireless",
376
- "batteryOperated": false
377
- }
378
- ]
package/src/utils.ts DELETED
@@ -1,108 +0,0 @@
1
- import { get } from 'restler-base';
2
-
3
- import * as log4js from '@log4js-node/log4js-api';
4
-
5
- import { Categories } from './Categories';
6
- import { EventEmitter } from 'events';
7
-
8
-
9
-
10
- //import { get } from 'http';
11
-
12
- export function byteToPct(value) {
13
- return Math.round((value * 100) / 255);
14
- }
15
-
16
- export function pctToByte(value) {
17
- return Math.round((value * 255) / 100);
18
- }
19
-
20
- export function byteToDegree(value) {
21
- return Math.fround(value / 2);
22
- }
23
-
24
- let lastrequest = Promise.resolve();
25
-
26
- export async function getAsync(url: string, options: any): Promise<any> {
27
- const p = new Promise<any>((resolve, reject) => {
28
- console.log('Calling: ' + url);
29
-
30
- get(url, options)
31
- .on('complete', (result: any) => {
32
- resolve(result);
33
- })
34
- .on('error', (err, response) => {
35
-
36
- reject(err);
37
- })
38
- .on('fail', (data, response) => {
39
-
40
- reject(data);
41
- })
42
- .on('abort', () => {
43
- reject();
44
- })
45
- .on('timeout', (ms) => {
46
- reject(ms);
47
- });
48
- });
49
-
50
- try
51
- {
52
- await lastrequest;
53
- }
54
- finally
55
- {
56
- return p;
57
- }
58
- }
59
-
60
- export enum Family {
61
- Insteon = 1,
62
- UPB = 7
63
- }
64
-
65
- export interface LoggerLike extends Partial<log4js.Logger> {
66
- prefix?: string;
67
- (msg: any): void;
68
- default(msg: any): void;
69
-
70
- }
71
-
72
- export interface PropertyChangedEventEmitter extends EventEmitter
73
- {
74
- on(event:'PropertyChanged', listener: (propertyName : string, newValue: any, oldValue: any, formattedValue: string) => void) : this;
75
-
76
- }
77
-
78
-
79
-
80
- export function parseTypeCode(typeCode: string) : {category: Categories, deviceCode: number, firmwareVersion: number, minorVersion: number }
81
- {
82
- try {
83
- const s = typeCode.split('.');
84
-
85
- let output = { category: Number(s[0]), deviceCode: Number(s[1]), firmwareVersion: Number(Number(s[2]).toString(16)), minorVersion: Number(Number(s[3]).toString(16)) };
86
-
87
- return output;
88
- } catch (err) {
89
- return null;
90
- }
91
- }
92
-
93
- export function getCategory(device: { type: string; }) {
94
- try {
95
- const s = device.type.split('.');
96
- return Number(s[0]);
97
- } catch (err) {
98
- return Categories.Unknown;
99
- }
100
- }
101
- export function getSubcategory(device: { type: string; }) {
102
- try {
103
- const s = device.type.split('.');
104
- return Number(s[1]);
105
- } catch (err) {
106
- return Categories.Unknown;
107
- }
108
- }