-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhandlers.js
2165 lines (2116 loc) · 77.3 KB
/
handlers.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
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
function ZWayCTTAutoTestQA(helpers) {
with(helpers) {
return qa = [
// Generic questions about the device
// Fill it according to your DUT!
{
question: ["Does the DUT implement an UI which allows the end user to establish association between nodes?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT empower the consumer or end user to lock or unlock the Anti-Theft feature of a controlled node?", "»YES-NO:SHOW«"],
answer: no
},
{
question: ["Does the DUT provide a QR Code scanning capability?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT's UI allow to set a Dimming Duration for Start Level Change?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT's UI allow to set a Start Level for Start Level Change?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT support S0 security level?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT use the identify command for any other purpose than a node identification application?", "»YES-NO:SHOW«"],
answer: no
},
{
question: ["Does the product support the frequency US_LR?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Has the DUT an integrated Z-Wave ASIC/Module?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Include the CTT Slave into the DUT network ...", "»OK:SHOW«"],
answer: ok
},
{
question: ["Is the DUT mains-powered?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["the DUT can be reset to factory settings?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Please navigate to the visualisation of the emulated device on the DUT's UI. Is there any possibility to see the status", "or control the device using the Basic Command Class?", "»YES-NO:SHOW«"],
answer: no
},
{
question: ["Does the DUT empower the consumer or end user to lock or unlock the Anti-Theft feature of a controlled node?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Will the product be available in USA?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is the DUT capable to display the last known state of the emulated end node?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is the DUT able to display the last known state of the emulated end node?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Product Name:", "####", "Is this correct?", "»YES-NO:SHOW«"],
// change #### with the name
// don't check the real name right now as it is only in the Cert form and Z-Way does not know it
answer: yes
},
{
question: ["Does the DUT's UI allow to set a dimming 'Duration' for 'Setting the Level'?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is the DUT capable to display the last known state of the emulated end node?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT's UI allow to set a dimming 'Duration' for 'Start Level Change'?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT's UI allow to set a 'Start Level' for 'Start Level Change'?", "»YES-NO:SHOW«"],
answer: yes
},
{
// Always say we pass. Check it manually!
question: ["Make sure the DUT actually contols the Command Class and does not violate any requirment! In particular consider the", "Command Classes specifications!", "Is #### actually controlled?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control any further Command Classes which are not listed / identified in the Form?", "»YES-NO:SHOW«"],
answer: no
},
{
question: ["Before continuing this Test Case it is recommended to already make sure that the DUT actually contols the Command", "Classes and does not violate any requirement! In particular consider the Command Classes specifications!", "Do you want to continue?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Are all of them correctly documented as controlled?", "»YES-NO:SHOW«"],
answer: yes
},
// Controled CCs (automate in future?)
{
question: ["Does the DUT control the Command Class", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_ASSOCIATION' at least in Version 2?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_ASSOCIATION_GRP_INFO' at least in Version 3?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_BASIC' at least in Version 2?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_CENTRAL_SCENE' at least in Version 3?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_CRC_16_ENCAP' at least in Version 1?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_FIRMWARE_UPDATE_MD' at least in Version 5?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_INDICATOR' at least in Version 3?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_METER' at least in Version 5?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_MULTI_CHANNEL' at least in Version 4?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION' at least in Version 3?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_SENSOR_MULTILEVEL' at least in Version 11?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_NOTIFICATION' at least in Version 8?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_SECURITY' at least in Version 1?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_SECURITY_2' at least in Version 1?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_VERSION' at least in Version 2?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT control the Command Class 'COMMAND_CLASS_WAKE_UP' at least in Version 2?", "»YES-NO:SHOW«"],
answer: yes
},
// List of controlled CCs
{
question: ["Is COMMAND_CLASS_ANTITHEFT_V3 controlled?", "»YES-NO:SHOW«"],
answer: no
},
{
question: ["Is COMMAND_CLASS_APPLICATION_STATUS controlled?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is COMMAND_CLASS_ASSOCIATION_GRP_INFO_V3 controlled?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is COMMAND_CLASS_ASSOCIATION_V3 controlled?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is COMMAND_CLASS_BARRIER_OPERATOR controlled?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is COMMAND_CLASS_BASIC_V2 controlled?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is COMMAND_CLASS_CENTRAL_SCENE_V3 controlled?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is COMMAND_CLASS_CLOCK controlled?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is COMMAND_CLASS_CONFIGURATION_V4 controlled?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is COMMAND_CLASS_CONTROLLER_REPLICATION controlled?", "»YES-NO:SHOW«"],
answer: yes
},
// Common questions
{
question: ["Activate the Add mode in the UI of the DUT and click 'OK' to start Inclusion by the DUT!", "»OK:SHOW«"],
action: startInclusion,
answer: ok
},
{
question: ["Activate the Add Mode in the UI of the DUT. Click 'OK' when the Add Mode is active.", "»OK-CANCEL:SHOW«"],
action: startInclusion,
answer: ok
},
{
question: ["Set DUT into Add Mode!", "(Cancel to skip the step. However, this would fail the Test Case result.)", "»OK-CANCEL:SHOW«"],
action: startInclusion,
answer: ok
},
{
question: ["Set DUT into Add Mode!", "»OK:SHOW«"],
action: startInclusion,
answer: ok
},
{
question: ["Set DUT into Add Mode and click 'OK'", "»OK:SHOW«"],
action: startInclusion,
answer: ok
},
{
question: ["Set DUT into Add Mode and click 'OK'", "(Cancel to skip the step. However, this would fail the Test Case result.)", "»OK-CANCEL:SHOW«"],
action: startInclusion,
answer: ok
},
{
question: ["Activate the Remove mode in the UI of the DUT and click 'OK' to start Exclusion by the DUT!", "»OK:SHOW«"],
action: startExclusion,
answer: ok
},
{
question: ["Click 'Ok' as soon as the Inclusion process has finished on the DUT side!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: [" Click 'OK' as soon as the inclusion and interview process has been finished on the DUT side", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Click ok to start test sequence!", "»OK:SHOW«"],
answer: ok
},
{
question: ["Click 'OK' to start test sequence!", "»OK:SHOW«"],
answer: ok
},
{
question: ["Ready for Inclusion of CTT Controller ####?", "»OK:SHOW«"],
answer: ok
},
{
question: ["Ready to start inclusion?", "»OK:SHOW«"],
answer: ok
},
{
question: ["#### within timeout! Retry?", "»YES-NO:SHOW«"],
answer: alert
},
{
question: ["Spot-check test of a user triggered complete comissioning interview failed! Retry?", "»YES-NO:SHOW«"],
answer: alert
},
{
question: ["Has the DUT removed this node (ID = ####) from its Z-Wave nodes list? (see Requirement Number CL:005A.01.52.01.1)", "»YES-NO:SHOW«"],
action: isDevicePresent(1),
answer: yesNo
},
{
question: ["Inclusion and interview passed, click 'OK' to continue with testing minimum user and additional control requirements.", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Inclusion and interview passed, click OK to continue with testing minimum user and additional control requirements.", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Inclusion and interview passed, click OK to continue with testing minimum user requirements.", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please wait for Interview to be finished and proceed with clicking 'OK'!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please wait for the Inclusion to be finished and continue by clicking 'OK'!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please wait for the interview to be finished and click 'OK' to proceed!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please wait for the interview to be finished and visit the #### visualisation for node #### in the DUT's", "UI!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please wait for the interview to be finished and continue with clicking 'OK'!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Inclusion and interview passed, click 'OK' to continue with testing minimum user requirements.", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Inclusion and interview passed, click 'OK' to continue with testing node properties.", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please make sure that the current state of the emulated #### device is visible on the DUT's UI and confirm to", "start the test sequence!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please make sure that the current state of the emulated #### device is visible on the DUT's UI and confirm to start", "the test sequence!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please wait that the Inclusion has finished and proceed by clicking 'OK'.", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please wait for the interview to be finished before clicking 'OK'!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Please wait for the interview to be finished and visit the Basic Command Class visualisation for node #### in the DUT's UI!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Click 'OK' as soon as the Inclusion process has been finished on the DUT side.", "»OK:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["Please wait until the DUT is ready and click 'OK'", "»OK:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["Wait until DUT is ready and click 'OK'.", "»OK:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["Click 'OK' to start the Command Class response tests or Cancel to skip to the next test cycle!", "Note: Skipping test cycles will fail this Test Case!", "»OK-CANCEL:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["Click 'OK' to continue with #### as the highest security class", "or click 'Cancel' to skip to the next lower security class!", "Note: Skipping Inclusions will fail this Test Case!", "»OK-CANCEL:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["Click 'OK' to continue with ####", "or click 'Cancel' to skip to the next lower security class!", "Note: Skipping Inclusions will fail this Test Case!", "»OK-CANCEL:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["Click 'OK' to continue with #### as the highest security class", "or click 'Cancel' to end the Test Case!", "Note: Skipping Inclusions will fail this Test Case!", "»OK-CANCEL:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["Ready for Inclusion?", "»OK:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["In DUT (SIS) UI accept all security schemes and type the DSK PIN when the input dialog is prompted! Ready for Inclusion?", "»OK:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["Click 'OK' as soon as the Exclusion process has finished on the DUT side!", "»OK:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["Click 'OK' as soon as the Inclusion process has finished on the DUT side!", "»OK:SHOW«"],
action: waitInterviewDone, // or we are secondary?
answer: ok
},
{
question: ["Wait until the DUT is ready!", "»OK:SHOW«"],
action: waitInterviewDoneOrIdle,
answer: ok
},
{
question: ["Wait until the Inclusion process has finished or abort it on DUT side!", "»OK:SHOW«"],
action: waitInterviewDoneOrIdle,
answer: ok
},
{
question: ["Click 'OK' as soon as the Inclusion process has finished on the DUT side!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Wait until Inclusion process is done!", "»OK:SHOW«"],
action: waitInterviewDone,
answer: ok
},
{
question: ["Set the DUT into Add Mode and click 'OK'", "»OK:SHOW«"],
action: startInclusion,
answer: ok
},
{
question: ["Stop Add Mode on DUT and click 'OK'", "»OK:SHOW«"],
action: stopInclusion,
answer: ok
},
{
question: ["Has the End Device #### been included sucessfully and is there NO request to start an exclusion of that End Device?", "»YES-NO:SHOW«"],
action: isDevicePresent(1),
answer: yesNo
},
{
question: ["Has the End Device #### been placed in a special section?", "»YES-NO:SHOW«"],
answer: no
},
{
question: ["DUT UI Verification", "Is the CTT End Device removed from DUT's device list?", "»YES-NO:SHOW«"],
action: !isDevicePresent(),
answer: yesNo
},
{
question: ["Please reset the DUT and confirm or start Exclusion of the DUT!", "Removing node..."],
action: startLearnMode
},
{
question: ["Wait for activating Learn Mode on DUT..."],
action: startLearnMode
},
{
question: ["Click 'OK' to start inclusion of the DUT!", "»OK:SHOW«"],
action: startLearnMode,
answer: ok
},
{
question: ["Set DUT into Learn Mode!", "(Cancel to skip the step. However, this would fail the Test Case result.)", "»OK-CANCEL:SHOW«"],
action: startLearnMode,
answer: ok
},
{
question: ["Set DUT into Learn Mode!", "»OK:SHOW«"],
action: startLearnMode,
answer: ok
},
{
question: ["Set DUT in learn mode and click 'OK' to continue", "»OK:SHOW«"],
action: startLearnMode,
answer: ok
},
{
question: ["Set DUT in learn mode and click 'OK' to continue", "»OK:SHOW«"],
action: startLearnMode,
answer: ok
},
{
question: ["Set DUT into Learn Mode and click 'OK'", "»OK:SHOW«"],
action: startLearnMode,
answer: ok
},
{
question: ["Set DUT into Learn Mode and click 'OK'", "(Cancel to skip the step. However, this would fail the Test Case result.)", "»OK-CANCEL:SHOW«"],
action: startLearnMode,
answer: ok
},
{
question: ["Click 'OK' to start Exclusion of the DUT!", "»OK:SHOW«"],
action: startLearnMode,
answer: ok
},
{
question: ["Please reset the DUT, start Add Mode and confirm these steps..."],
action: resetAndStartInclusion
},
{
question: ["Please reset the DUT, start Add Mode and confirm these steps!"],
action: resetAndStartInclusion
},
{
question: ["Please reset the DUT.", "»OK:SHOW«"],
action: reset,
answer: ok
},
{
question: ["Reset DUT!", "»OK:SHOW«"],
action: reset,
answer: ok
},
{
question: ["Please reset the DUT and click 'OK'.", "»OK:SHOW«"],
action: reset,
answer: ok
},
{
question: ["Is the Learn Mode accessible in the DUT's UI?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Reset the DUT!", "»OK:SHOW«"],
action: reset,
answer: ok
},
{
question: ["Does the DUT support Learn Mode?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Please reset the DUT and confirm with clicking 'OK' when ready!", "»OK:SHOW«"],
action: reset,
answer: ok
},
{
question: ["Do you want to exclude the DUT? If 'No' is clicked, reset the DUT before the following steps!", "»YES-NO:SHOW«"],
action: reset,
answer: no
},
{
question: ["Refer to the DUT's documentation and perform a factory reset as stated! Click 'OK' after the factory reset has been", "completed!", "»OK:SHOW«"],
action: reset,
answer: ok
},
{
question: ["Make sure the DUT has been reset before continuing!", "»OK:SHOW«"],
action: reset,
answer: ok
},
{
question: ["Please click 'OK' and trigger a capability discovery for node #### using the DUT's UI!", "»OK:SHOW«"],
action: forceInterview,
answer: ok
},
{
question: ["Include the CTT End Device into the DUT network ...", "»OK:SHOW«"],
answer: ok
},
{
question: ["Include the #### Device #### of #### into the DUT network ...", "»OK:SHOW«"],
answer: ok
},
{
question: ["Inclusion and interview passed, click 'OK' to continue with testing additional control requirements.", "»OK:SHOW«"],
answer: ok
},
{
question: ["Ready for inclusion of CTT Controller by the DUT?", "»OK:SHOW«"],
action: waitIdle,
answer: ok
},
{
question: ["PIN Code: ####"],
action: function() {
prepareS2(decParam(1))
}
},
// DSK requirements
{
question: ["When a SmartStart including controller has received the DSK of a node for inclusion, it shall keep NWI Mode enabled for", "at least 'nwkMinNWIModeSmartStartDuration' minutes if the node does not get included.", "nwkMinNWIModeSmartStartDuration = 60 (minutes): Minimum duration in which NWI mode shall stay enabled after a", "controller node has received a SmartStart DSK to include.", "Requirement numbers: NWK:01B7.1, NWK:0177.1", "This test takes at least 65 minutes.", "Click 'OK' to continue or 'Cancel' to skip the test!", "»OK-CANCEL:SHOW«"],
answer: cancel
},
{
question: ["Please add #### DSK to the DUT's Node Provisioning List:", "####", "»OK:SHOW«"],
action: function() {
zway.controller.data.smartStart.dskProvisioningList = zway.controller.data.smartStart.dskProvisioningList.value.concat([getParam(2)]);
},
answer: ok
},
{
question: ["Please add #### DSK to the DUT's Node Provisioning List and click 'OK'!", "####", "»OK:SHOW«"],
action: function() {
zway.controller.data.smartStart.dskProvisioningList = zway.controller.data.smartStart.dskProvisioningList.value.concat([getParam(2)]);
},
answer: ok
},
{
question: ["Please remove both entries from the Node Provisioning List and click 'OK'.", "»OK:SHOW«"],
action: function() {
zway.controller.data.smartStart.dskProvisioningList = [];
},
answer: ok
},
{
question: ["Please remove the DSK of the CTT End Device from the DUT's Node Provisioning List and click 'OK'.", "»OK:SHOW«"],
action: function() {
zway.controller.data.smartStart.dskProvisioningList = [];
},
answer: ok
},
{
question: ["Please remove the Switch On/Off from the Node Provisioning List and click 'OK'.", "»OK:SHOW«"],
action: function() {
zway.controller.data.smartStart.dskProvisioningList = [];
},
answer: ok
},
// CCR_BarrierOperatorCC_Rev01
{
question: ["BARRIER_OPERATOR_SET with target value='0x####' (initiate ####)"],
action: function() { lastDevice().BarrierOperator.Set(byteParam(1)) }
},
{
question: ["BARRIER_OPERATOR_SIGNAL_SET with target value='0x####' (####) for Subsytem 'AudibleNotification'"],
action: function() { lastDevice().BarrierOperator.SignalSet(1, byteParam(1)) }
},
{
question: ["BARRIER_OPERATOR_SIGNAL_SET with target value='0x####' (####) for Subsytem 'VisualNotification'"],
action: function() { lastDevice().BarrierOperator.SignalSet(2, byteParam(1)) }
},
{
question: ["Optional: Is the DUT capable to activate and deactivate the 'Audible Notification' subsystem of supporting end nodes?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Optional: Is the DUT capable to activate and deactivate the 'Visual Notification' subsystem of supporting end nodes?", "»YES-NO:SHOW«"],
answer: yes
},
// CCR_DoorLockCC_Rev01 & Rev02
{
question: ["Set Door Lock Operation Mode UnsecuredWithTimeout"],
action: function() { lastDevice().DoorLock.Set(1) }
},
{
question: ["Set Door Lock Operation Mode Unsecured"],
action: function() { lastDevice().DoorLock.Set(0) }
},
{
question: ["Set Door Lock Operation Mode Secured"],
action: function() { lastDevice().DoorLock.Set(255) }
},
{
question: [
"Set Door Lock Configuration:",
"Operation Type: '####'",
"Inside Handle 1: '####'",
"Inside Handle 2: '####'",
"Inside Handle 3: '####'",
"Inside Handle 4: '####'",
"Outside Handle 1: '####'",
"Outside Handle 2: '####'",
"Outside Handle 3: '####'",
"Outside Handle 4: '####'",
"Lock Timeout: #### seconds",
"Auto-relock Time: #### seconds",
"Hold&Release Time: #### seconds",
"Block to Block: '####'",
"Twist Assist: '####'",
"*******************************************************************" // to distinguish V1 from newer
],
action: function() { lastDevice().DoorLock.ConfigurationSet(
getParam(1) == "TimedOperation" ? 2 : 1, // mode
(getParam(6) == 'enabled' ? 1 : 0) + (getParam(7) == 'enabled' ? 1 : 0) * 2 + (getParam(8) == 'enabled' ? 1 : 0) * 4 + (getParam(9) == 'enabled' ? 1 : 0) * 8, // outer handle
(getParam(2) == 'enabled' ? 1 : 0) + (getParam(3) == 'enabled' ? 1 : 0) * 2 + (getParam(4) == 'enabled' ? 1 : 0) * 4 + (getParam(5) == 'enabled' ? 1 : 0) * 8, // inner handle
decParam(10), // Lock time
decParam(11), // AR time
decParam(12), // H&R time
getParam(14) == 'enabled' ? true : false, // TA
getParam(13) == 'enabled' ? true : false // BtB
)
}
},
{
question: [
"Set Door Lock Configuration:",
"Operation Type: '####'",
"Inside Handle 1: '####'",
"Inside Handle 2: '####'",
"Inside Handle 3: '####'",
"Inside Handle 4: '####'",
"Outside Handle 1: '####'",
"Outside Handle 2: '####'",
"Outside Handle 3: '####'",
"Outside Handle 4: '####'",
"Lock Timeout: #### seconds",
"*******************************************************************" // to distinguish V1 from newer
],
action: function() { lastDevice().DoorLock.ConfigurationSet(
getParam(1) == "TimedOperation" ? 2 : 1, // mode
(getParam(6) == 'enabled' ? 1 : 0) + (getParam(7) == 'enabled' ? 1 : 0) * 2 + (getParam(8) == 'enabled' ? 1 : 0) * 4 + (getParam(9) == 'enabled' ? 1 : 0) * 8, // outer handle
(getParam(2) == 'enabled' ? 1 : 0) + (getParam(3) == 'enabled' ? 1 : 0) * 2 + (getParam(4) == 'enabled' ? 1 : 0) * 4 + (getParam(5) == 'enabled' ? 1 : 0) * 8, // inner handle
decParam(10), // Lock time
0, // AR time
0, // H&R time
false, // TA
false // BtB
)
}
},
{
question: ["Please check if current mode is set to '####'. Is####mode displayed correctly?", "»YES-NO:SHOW«"],
action: checkMappedParam("dev", "DoorLock.data.mode", function(v) {
switch(v) {
case 0: return "Unsecured";
case 1: return "UnsecuredWithTimeout";
case 255: return "Secured";
}
}, 1),
answer: yesNo
},
{
question: ["Does the DUT allow the user to configure the door handles of a v4 supporting end node?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Does the DUT allow the user to configure the door handles of a v1 supporting end node?", "»YES-NO:SHOW«"],
answer: yes
},
// CCR_MeterCC_Rev01
{
question: [
"Please compare the DUTs UI to following values - are they displayed correctly?",
"Requirement Number CL:0032.01.41.01.1",
"'####' ####",
"'####' ####",
"'####' ####",
"'####' ####",
"»YES-NO:SHOW«"
],
action: function() {
for (var i = 1; i <= getParamsCount(); i += 2) {
if (!exec(checkScale("Meter", "scaleString", i + 1, i))) return false;
}
return true;
},
answer: yesNo
},
{
question: ["Timeout for Test sequence is 5 min, waiting for following events:", "METER_RESET"],
action: function() { lastDevice().Meter.Reset() }
},
{
question: ["Wait a moment and confirm if all meter scales has been reset on DUTs UI!", "»YES-NO:SHOW«"],
action: waitAndExecute(5, checkAllScalesZero("Meter")), // wait for unsolicited reports
answer: yesNo
},
{
question: ["Confirm that '####' scale is set to #### in the DUTs UI!", "»YES-NO:SHOW«"],
action: checkScale("Meter", "scaleString", 1, 2),
answer: yesNo
},
{
question: ["Please make sure that the current state of the emulated Meter device (scale = '####') is visible on the DUT's UI and", "confirm to start the test sequence!", "»OK:SHOW«"],
answer: ok
},
{
question: [
"Please compare the DUTs UI to following values - are they displayed correctly?",
"Requirement Number CL:0032.01.41.01.1",
"'####' ####", // '1.23' kWh
"»YES-NO:SHOW«"
],
action: checkScale("Meter", "scaleString", 2, 1),
answer: yesNo
},
// CCR_MultilevelSwitchCC_Rev01 & Rev02
{
question: ["* SWITCH_MULTILEVEL_SET to value = '####%' (0x####) with duration 'factory default (0x####)'."],
action: function() { lastDevice().SwitchMultilevel.Set(byteParam(2)) }
},
{
question: ["* SWITCH_MULTILEVEL_SET to Z-Wave value = '####' (0x####), i.e. hardware level = '####%', with duration 'factory default", "(0x####)'"],
action: function() { lastDevice().SwitchMultilevel.Set(byteParam(2)) }
},
{
question: ["* SWITCH_MULTILEVEL_START_LEVEL_CHANGE with increasing brightness", "* SWITCH_MULTILEVEL_STOP_LEVEL_CHANGE" ],
action: function() { lastDevice().SwitchMultilevel.StartLevelChange(false, 20, false, 5); wait(1); lastDevice().SwitchMultilevel.StopLevelChange() }
// TODO the question will be improved in future to host duration and start level
},
{
question: ["* SWITCH_MULTILEVEL_SET:", "* Z-Wave Value = #### (0x####), i. e. hardware level = ####", "* Duration = #### seconds"],
action: function() { lastDevice().SwitchMultilevel.Set(byteParam(2), decParam(4)) }
},
{
question: ["* SWITCH_MULTILEVEL_SET:", "* Z-Wave Value = #### (0x####), i. e. hardware level = ####", "* Duration = #### minutes"],
action: function() { lastDevice().SwitchMultilevel.Set(byteParam(2), decParam(4) - 1 + 128) }
},
{
question: ["* SWITCH_MULTILEVEL_SET:", "* Z-Wave Value = #### (0x####), i. e. hardware level = ####", "* Duration = #### (0x####)"],
action: function() { lastDevice().SwitchMultilevel.Set(byteParam(2), byteParam(5)) }
},
{
question: ["* SWITCH_MULTILEVEL_SET:", "* Z-Wave Value = #### (0x####), i. e. hardware level = ####", "****"],
action: function() { lastDevice().SwitchMultilevel.Set(byteParam(2)) }
},
{
question: [
"Testing optional level change:",
"* Direction = ####",
"* Start Level = #### (0x####), i. e. hardware level = ####%",
"* Duration = #### seconds",
"1. Click 'OK' to start test sequence!",
"2. Start level change ####(with #### brightness) and wait a little moment.", // TODO: space included in #### due to a non-printable char in CTT. Fix it once CTT is fixed
"3. Stop level change.",
"»OK:SHOW«"
],
action: function() {
send(ok)
wait(1)
lastDevice().SwitchMultilevel.StartLevelChange(getParam(1) == "up" ? 0 : 1, decParam(5), false, byteParam(3))
wait(1)
lastDevice().SwitchMultilevel.StopLevelChange()
}
},
{
question: [
"Testing optional level change:",
"* Direction = ####",
"* Start Level = ignore",
"* Duration = #### (0x####)",
"1. Click 'OK' to start test sequence!",
"2. Start level change ####(with #### brightness) and wait a little moment.", // TODO: space included in #### due to a non-printable char in CTT. Fix it once CTT is fixed
"3. Stop level change.",
"»OK:SHOW«"
],
action: function() {
send(ok)
wait(1)
lastDevice().SwitchMultilevel.StartLevelChange(getParam(1) == "up" ? 0 : 1, byteParam(3))
wait(1)
lastDevice().SwitchMultilevel.StopLevelChange()
}
},
{
question: [
"Testing optional level change:",
"* Direction = ####",
"* Start Level = #### (0x####), i. e. hardware level = ####%",
"1. Click 'OK' to start test sequence!",
"2. Start level change ####(with #### brightness) and wait a little moment.", // TODO: space included in #### due to a non-printable char in CTT. Fix it once CTT is fixed
"3. Stop level change.",
"»OK:SHOW«"
],
action: function() {
send(ok)
wait(1)
lastDevice().SwitchMultilevel.StartLevelChange(getParam(1) == "up" ? 0 : 1, 0xFF, false, byteParam(3))
wait(1)
lastDevice().SwitchMultilevel.StopLevelChange()
}
},
{
question: [
"Testing optional level change:",
"* Direction = ####",
"* Start Level = ignore",
"1. Click 'OK' to start test sequence!",
"2. Start level change ####(with #### brightness) and wait a little moment.", // TODO: space included in #### due to a non-printable char in CTT. Fix it once CTT is fixed
"3. Stop level change.",
"»OK:SHOW«"
],
action: function() {
send(ok)
wait(1)
lastDevice().SwitchMultilevel.StartLevelChange(getParam(1) == "up" ? 0 : 1)
wait(1)
lastDevice().SwitchMultilevel.StopLevelChange()
},
answer: ok
},
{
question: [
"Testing optional level change:",
"* Direction = ####",
"* Start Level = ignore",
"* Duration = #### seconds",
"1. Click 'OK' to start test sequence!",
"2. Start level change #### (with #### brightness) and wait a little moment.",
"3. Stop level change.",
"»OK:SHOW«"
],
action: function() {
send(ok)
wait(1)
lastDevice().SwitchMultilevel.StartLevelChange(getParam(1) == "up" ? 0 : 1, decParam(2))
wait(1)
lastDevice().SwitchMultilevel.StopLevelChange()
},
answer: ok
},
{
question: ["Please make sure that the current state of the emulated Multilevel Switch device is visible on the DUT's UI and confirm", "to start the test sequence!", "»OK:SHOW«"],
answer: ok
},
{
question: ["Is the current level set to ####% in DUT's UI?", "»YES-NO:SHOW«"],
action: checkDecParam("dev", "SwitchMultilevel.data.level", 1),
answer: yesNo
},
{
question: ["Is the current level set to Z-Wave value = #### (0x####), i. e. hardware level = ####%, in the DUT's UI?", "»YES-NO:SHOW«"],
action: checkDecParam("dev", "SwitchMultilevel.data.level", 1),
answer: yesNo
},
{
question: ["Please confirm that last known state of Multilevel Switch is Z-Wave value = #### (0x####), i. e. hardware level = ####%!", "»YES-NO:SHOW«"],
action: checkByteParam("dev", "SwitchMultilevel.data.level", 2),
answer: yesNo
},
{
question: ["Please confirm that last known state of Multilevel Switch is Z-Wave value = '####' (0x####), i.e. hardware level = '####%'!", "»YES-NO:SHOW«"],
action: checkByteParam("dev", "SwitchMultilevel.data.level", 2),
answer: yesNo
},
{
question: ["Is the DUT able to send a Start/Stop Level Change to the emulated end node?", "»YES-NO:SHOW«"],
answer: yes
},
{
question: ["Is the current level set to ####% in DUT's UI?", "»YES-NO:SHOW«"],
action: checkDecParam("dev", "SwitchMultilevel.data.level", 1),
answer: yes
},
{
question: ["Please make sure that the current state of the emulated Multilevel Switch device is visible on the DUT's UI and confirm", "to start the test sequence!", "»OK:SHOW«"],
answer: ok
},
{
question: ["The following sequence verifies the minimum end user functionalities according to Requirement Number: CL:0026.01.31.01.1", "Does the DUT's UI allow to set a dimming 'Duration' for 'Setting the Level'?", "»YES-NO:SHOW«"],
answer: yes
},
// CCR_BinarySwitchCC_Rev01
{
question: ["* SWITCH_BINARY_SET with value='0x####' (####)"],
action: function() { lastDevice().SwitchBinary.Set(byteParam(1)) }
},
{
question: ["Please confirm if that last known state of Binary Switch is '####' (0x####)!", "»YES-NO:SHOW«"],
action: checkMappedParam("dev", "SwitchBinary.data.level", function(v) { return v ? 'FF' : '00' }, 2),
answer: yesNo
},
{
question: ["Wait a moment and confirm that the state is visualized on DUTs UI according to Requirement Number CL:0025.01.51.01.1!", "»YES-NO:SHOW«"],
answer: yes
// TODO MK-Logic - strange question... Just approve we have a UI or should we check the last value ? It was already tested
},
// CCR_MultilevelSensorCC_Rev01
{
question: ["'####' #### (CL:0031.01.41.01.1)", "»YES-NO:SHOW«"],
action: checkScale("SensorMultilevel", "scaleString", 2, 1),
answer: yes
},