forked from NodeAlarmProxy/NodeAlarmProxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenvisalink.js
741 lines (740 loc) · 15.2 KB
/
envisalink.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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
exports.applicationcommands = {
'000' : {
'name':'Poll',
'pre':'Polled',
'bytes':0,
'post':'',
'send':'500000',
'action':'forward'
},
'001' : {
'name':'Status Report',
'pre':'Status Report Requested',
'bytes':0,
'post':'',
'send':'500001',
'action':'forward'
},
'008' : {
'name':'Dump Zone Timers',
'pre':'Request Dump of Zone Timers',
'bytes':0,
'post':'',
'send':'500008',
'action':'forward'
},
'005' : {
'name':'Network Login',
'pre':'Checking password...',
'bytes':'1-6',
'post':'',
'send':'500005',
'action':'checkpassword'
},
'010' : {
'name':'Set Time and Date',
'pre':'Setting time and date to:',
'bytes':10,
'post':'',
'send':'500010',
'action':'forward'
},
'020' : {
'name':'Command Output Control',
'pre':'Activating',
'bytes':2,
'post':'Command Output',
'send':'500020',
'action':'forward'
},
'030' : {
'name':'Partition Arm Control',
'pre':'Arming Partition',
'bytes':1,
'post':'',
'send':'500030',
'action':'forward'
},
'031' : {
'name':'Partition Arm Control - Stay Arm',
'pre':'Arming Partition',
'bytes':1,
'post':'to STAY.',
'send':'500031',
'action':'forward'
},
'032' : {
'name':'Partition Arm Control - Zero Entry Delay',
'pre':'Arming Partition',
'bytes':1,
'post':'with ZERO Entry Delay',
'send':'500032',
'action':'forward'
},
'033' : {
'name':'Partition Arm Control - With Code',
'pre':'Arming Parition',
'bytes':7,
'post':'with Code',
'send':'500033',
'action':'forward'
},
'040' : {
'name':'Partition Disarm Control',
'pre':'Disarming Partition',
'bytes':7,
'post':'',
'send':'500040',
'action':'forward'
},
'055' : {
'name':'Time Stamp Control',
'pre':'Time Stamp Control to:',
'bytes':1,
'post':'',
'send':'500055',
'action':'forward'
},
'056' : {
'name':'Time Broadcast Control',
'pre':'Time Broadcast Control to:',
'bytes':1,
'post':'',
'send':'500056',
'action':'forward'
},
'057' : {
'name':'Temperature Broadcast Control',
'pre':'Temperature Broadcast Control to:',
'bytes':1,
'post':'',
'send':'500057',
'action':'forward'
},
'060' : {
'name':'Trigger Panic Alarm',
'pre':'TRIGGERING PANIC ALARM:',
'bytes':1,
'post':'',
'send':'500060',
'action':'forward'
},
'070' : {
'name':'Single Keystroke - Partition 1',
'pre':'Partition 1 keystroke:',
'bytes':1,
'post':'requested.',
'send':'500070',
'action':'forward'
},
'071' : {
'name':'Send Keystroke String',
'pre':'Paritition 1 keystroke string:',
'bytes':'2-7',
'post':'requested',
'send':'500071',
'action':'forward'
},
'072' : {
'name':'Enter User Code Programming (*5)',
'pre':'User Code Programming',
'bytes':1,
'post':'requested.',
'send':'500072',
'action':'forward'
},
'073' : {
'name':'Enter User Programming (*6)',
'pre':'User Programming',
'bytes':1,
'post':'requested.',
'send':'500073',
'action':'forward'
},
'074' : {
'name':'Keep Alive',
'pre':'Keeping Alive Partition',
'bytes':1,
'post':'.',
'send':'500074',
'action':'forward'
},
'200' : {
'name':'Code Send',
'pre':'Send',
'bytes':'4-6',
'post':'Code in Response to Request',
'send':'500200',
'action':'forward'
}
}
exports.tpicommands = {
'500' : {
'name':'Command Acknowledge',
'pre':'Command',
'bytes':3,
'post':'Acknowledged',
'send':'',
'action':''
},
'501' : {
'name':'Command Error',
'pre':'Bad Checksum Received',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'502' : {
'name':'System Error',
'pre':'System Error',
'bytes':3,
'post':'has been detected.',
'send':'',
'action':''
},
'505' : {
'name':'Login Interaction',
'pre':'Login Request Response:',
'bytes':1,
'post':'',
'send':'',
'action':'loginresponse'
},
'510' : {
'name':'Keypad LED State - Partition 1 Only',
'pre':'Keypad LED State:',
'bytes':2,
'post':'',
'send':'',
'action':''
},
'511' : {
'name':'Keypad LED FLASH State - Partition 1 Only',
'pre':'Keypad LED Flash State:',
'bytes':2,
'post':'',
'send':'',
'action':''
},
'550' : {
'name':'Time/Date Broadcast',
'pre':'The Time/Date is:',
'bytes':10,
'post':'',
'send':'',
'action':''
},
'560' : {
'name':'Ring Detected',
'pre':'Panel has detected a ring on phone line.',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'561' : {
'name':'Indoor Temperature Broadcast',
'pre':'Indoor Temperature is:',
'bytes':4,
'post':'',
'send':'',
'action':''
},
'562' : {
'name':'Outdoor Temperature Broadcast',
'pre':'Outdoor Temperature is:',
'bytes':4,
'post':'',
'send':'',
'action':''
},
'601' : {
'name':'Zone Alarm',
'pre':'Zone',
'bytes':4,
'post':'has gone into alarm',
'send':'alarm',
'action':'updatezone'
},
'602' : {
'name':'Zone Alarm Restore',
'pre':'Zone',
'bytes':4,
'post':'has been restored',
'send':'restore',
'action':'updatezone'
},
'603' : {
'name':'Zone Tamper',
'pre':'Zone',
'bytes':4,
'post':'has been tampered with',
'send':'tamper',
'action':'updatezone'
},
'604' : {
'name':'Zone Tamper Restore',
'pre':'Zone',
'bytes':4,
'post':'tamper condition has been restored',
'send':'restore',
'action':'updatezone'
},
'605' : {
'name':'Zone Alarm',
'pre':'Zone',
'bytes':3,
'post':'has a fault condition',
'send':'alarm',
'action':'updatezone'
},
'606' : {
'name':'Zone Alarm Restore',
'pre':'Zone',
'bytes':3,
'post':'fault condition has been restored',
'send':'restore',
'action':'updatezone'
},
'609' : {
'name':'Zone Open',
'pre':'Zone',
'bytes':3,
'post':'is open',
'send':'open',
'action':'updatezone'
},
'610' : {
'name':'Zone Alarm Restore',
'pre':'Zone',
'bytes':4,
'post':'is restored',
'send':'restore',
'action':'updatezone'
},
'615' : {
'name':'Envisalink Zone Timer Dump',
'pre':'Zone Timer Dump:',
'bytes':256,
'post':'',
'send':'',
'action':''
},
'620' : {
'name':'Duress Alarm',
'pre':'Duress Alarm Received:',
'bytes':4,
'post':'',
'send':'duress',
'action':'updatesystem'
},
'621' : {
'name':'Fire Key Alarm',
'pre':'Fire key alarm has been activated',
'bytes':0,
'post':'',
'send':'alarm',
'action':'updatesystem'
},
'622' : {
'name':'Fire Key Restore',
'pre':'Fire key alarm has been restored',
'bytes':0,
'post':'',
'send':'restore',
'action':'updatesystem'
},
'623' : {
'name':'Auxiliary Key Alarm',
'pre':'Auxiliary key alarm has been activated',
'bytes':0,
'post':'',
'send':'alarm',
'action':'updatesystem'
},
'624' : {
'name':'Auxiliary Key Restore',
'pre':'Auxiliary key alarm has been restored',
'bytes':0,
'post':'',
'send':'restore',
'action':'updatesystem'
},
'625' : {
'name':'Panic Key Alarm',
'pre':'Panic key alarm has been activated',
'bytes':0,
'post':'',
'send':'alarm',
'action':'updatesystem'
},
'626' : {
'name':'Panic Key Restore',
'pre':'Panic key alarm has been restored',
'bytes':0,
'post':'',
'send':'restore',
'action':'updatesystem'
},
'631' : {
'name':'2-Wire Smoke/Aux Alarm',
'pre':'2-Wire Smoke/Aux alarm has been activated',
'bytes':0,
'post':'',
'send':'alarm',
'action':'updatesystem'
},
'632' : {
'name':'2-Wire Smoke/Aux Restore',
'pre':'2-Wire Smoke/Aux alarm has been restore',
'bytes':0,
'post':'',
'send':'alarm',
'action':'updatesystem'
},
'650' : {
'name':'Partition Ready',
'pre':'Partition',
'bytes':1,
'post':'Ready',
'send':'ready',
'action':'updatepartition'
},
'651' : {
'name':'Partition Not Ready',
'pre':'Partition',
'bytes':1,
'post':'is NOT Ready',
'send':'notready',
'action':'updatepartition'
},
'652' : {
'name':'Partition Armed',
'pre':'Partition',
'bytes':1,
'post':'is Armed',
'send':'armed',
'action':'updatepartition'
},
'653' : {
'name':'Partition Ready - Force Arming Enabled',
'pre':'Partition',
'bytes':1,
'post':'is Ready and Force Arming is Enabled',
'send':'readyforce',
'action':'updatepartition'
},
'654' : {
'name':'Partition In Alarm',
'pre':'Partition',
'bytes':1,
'post':'IS IN ALARM!',
'send':'alarm',
'action':'updatepartition'
},
'655' : {
'name':'Partition Disarmed',
'pre':'Partition',
'bytes':1,
'post':'has been Disarmed',
'send':'disarmed',
'action':'updatepartition'
},
'656' : {
'name':'Exit Delay in Progress',
'pre':'Exit Delay of Partition',
'bytes':1,
'post':'in Progress',
'send':'exitdelay',
'action':'updatepartition'
},
'657' : {
'name':'Entry Delay in Progress',
'pre':'Entry Delay of Partition',
'bytes':1,
'post':'in Progress',
'send':'entrydelay',
'action':'updatepartition'
},
'658' : {
'name':'Keypad Lock-out',
'pre':'Keypad at Partition',
'bytes':1,
'post':'is locked out due to too many failed user code attempts',
'send':'keypadlock',
'action':'updatepartition'
},
'659' : {
'name':'Partition Failed to Arm',
'pre':'Partition',
'bytes':1,
'post':'FAILED to Arm',
'send':'failedarm',
'action':'updatepartition'
},
'660' : {
'name':'PGM Output is in Progress',
'pre':'PGM Output of Partition',
'bytes':1,
'post':'is in Progress',
'send':'',
'action':''
},
'663' : {
'name':'Chime Enabled',
'pre':'Door Chime on Partition',
'bytes':1,
'post':'is Enabled',
'send':'',
'action':''
},
'664' : {
'name':'Chime Disabled',
'pre':'Door Chime on Partition',
'bytes':1,
'post':'is Disabled',
'send':'',
'action':''
},
'670' : {
'name':'Invalid Access Code',
'pre':'Invalid Access Code on Partition',
'bytes':1,
'post':'',
'send':'invalidcode',
'action':'updatepartition'
},
'671' : {
'name':'Function Not Available',
'pre':'A Function Selected on Partition',
'bytes':1,
'post':'is not Available',
'send':'',
'action':''
},
'672' : {
'name':'Failure to Arm',
'pre':'An Attempt to Arm Partition',
'bytes':1,
'post':'Failed',
'send':'failedarm',
'action':'updatepartition'
},
'673' : {
'name':'Partition is Busy',
'pre':'Partition',
'bytes':1,
'post':'is Busy',
'send':'busy',
'action':'updatepartition'
},
'674' : {
'name':'System Arming in Progress',
'pre':'System is auto-arming and in arm warning delay on Partition',
'bytes':1,
'post':'',
'send':'arming',
'action':'updatepartition'
},
'680' : {
'name':'System in Installers Mode',
'pre':'System is in Installer Mode',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'700' : {
'name':'User Closing',
'pre':'Partition has been armed by user:',
'bytes':5,
'post':'',
'send':'armed',
'action':'updatepartitionuser'
},
'701' : {
'name':'Special Closing',
'pre':'Partition',
'bytes':1,
'post':'has been armed by Quick Arm, Auto Arm, Keyswitch, DLS or Wireless Key',
'send':'armed',
'action':'updatepartition'
},
'702' : {
'name':'Partial Closing',
'pre':'Partition',
'bytes':1,
'post':'is armed with one or more zones bypassed',
'send':'armedbypass',
'action':'updatepartition'
},
'750' : {
'name':'User Opening',
'pre':'Partition Opened by User:',
'bytes':5,
'post':'',
'send':'useropen',
'action':'updatepartitionuser'
},
'751' : {
'name':'Special Opening',
'pre':'Partition',
'bytes':1,
'post':'has been disarmed by Keyswitch, DLS or Wireless Key',
'send':'disarmed',
'action':'updatepartition'
},
'800' : {
'name':'Panel Battery Trouble',
'pre':'The panel has a low battery',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'801' : {
'name':'Panel Battery Trouble Restore',
'pre':'The panel battery has been restored',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'802' : {
'name':'Panel AC Trouble',
'pre':'AC Power to the Panel has been removed',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'803' : {
'name':'Panel AC Restored',
'pre':'AC Power to the panel has been restored',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'806' : {
'name':'System Bell Trouble',
'pre':'An open circuit has been detected across the bell terminals',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'807' : {
'name':'System Bell Trouble Restored',
'pre':'Bell Trouble has been Restored',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'814' : {
'name':'FTC Trouble',
'pre':'Panel has failed to communicate to the monitoring station',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'816' : {
'name':'Buffer Near Full',
'pre':'Event Buffer is 75% full',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'829' : {
'name':'General System Tamper',
'pre':'A tamper has occured with a module',
'bytes':0,
'post':'',
'send':'tamper',
'action':'updatesystem'
},
'830' : {
'name':'General System Tamper Restore',
'pre':'General System Tamper Restored',
'bytes':0,
'post':'',
'send':'tamperrestore',
'action':'updatesystem'
},
'840' : {
'name':'Trouble LED On',
'pre':'Trouble LED of Partition',
'bytes':1,
'post':'is ON',
'send':'',
'action':''
},
'841' : {
'name':'Trouble LED Off',
'pre':'Trouble LED of Partition',
'bytes':1,
'post':'is OFF',
'send':'',
'action':''
},
'842' : {
'name':'Fire Trouble Alarm',
'pre':'Fire Trouble Alarm',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'843' : {
'name':'Fire Trouble Alarm Restored',
'pre':'Fire Trouble Alarm Restored',
'bytes':0,
'post':'',
'send':'',
'action':''
},
'849' : {
'name':'Verbose Trouble Status',
'pre':'Verbose Trouble Status Code:',
'bytes':2,
'post':'',
'send':'',
'action':''
},
'900' : {
'name':'Code Required',
'pre':'Code is Required',
'bytes':0,
'post':'',
'send':'',
'action':'coderequired'
},
'912' : {
'name':'Command Output Pressed',
'pre':'Code is Required',
'bytes':1,
'post':'',
'send':'',
'action':'coderequired'
},
'921' : {
'name':'Master Code Required',
'pre':'Master Code is Required',
'bytes':0,
'post':'',
'send':'',
'action':'coderequired'
},
'922' : {
'name':'Installers Code Required',
'pre':'Installers Code Required',
'bytes':0,
'post':'',
'send':'',
'action':'coderequired'
}
}