@@ -523,6 +523,49 @@ play_node_soc_switch_on_off_()
523
523
}
524
524
525
525
526
+ play_node_soc_multilevel_sensor_ ()
527
+ {
528
+ local node=" soc_multilevel_sensor"
529
+ node_cli_ " $node " n
530
+ log_ " $node : Play on $nodeid " # ~T738437 ~T738442
531
+
532
+ log_ " $node : Initial state reported after inclusion"
533
+
534
+ ep=" ep0/Basic/Attributes/PowerSource/Reported"
535
+ sub=" ucl/by-unid/${nodeunid} /$ep "
536
+ key=" value" ; key=' "' $key ' "' # JSON string
537
+ value=' Battery' ; value=' "' $value ' "'
538
+ json=' {' $key ' :' $value ' }'
539
+ expect=" $sub $json "
540
+ sub_ " $sub " " $expect "
541
+
542
+ ep=' ep0/TemperatureMeasurement/Attributes/MeasuredValue/Reported'
543
+ sub=" ucl/by-unid/${nodeunid} /$ep "
544
+ value=322
545
+ json=' {' $key ' :' $value ' }'
546
+ expect=" $sub $json "
547
+ sub_ " $sub " " $expect "
548
+
549
+ ep=' ep0/RelativityHumidity/Attributes/MeasuredValue/Reported'
550
+ sub=" ucl/by-unid/${nodeunid} /$ep "
551
+ value=8
552
+ json=' {' $key ' :' $value ' }'
553
+ expect=" $sub $json "
554
+ sub_ " $sub " " $expect "
555
+
556
+ ep=" ep0/PowerConfiguration/Attributes/BatteryPercentageRemaining/Reported"
557
+ sub=" ucl/by-unid/${nodeunid} /$ep "
558
+ value=100
559
+ json=' {' $key ' :' $value ' }'
560
+ expect=" $sub $json "
561
+ sub_ " $sub " " $expect "
562
+
563
+ log_ " $type : Events from device $nodeunid : $node "
564
+ node_cli_ " $node " 1
565
+ sub_ " $sub " " $expect "
566
+ }
567
+
568
+
526
569
play_node_s2v2_ ()
527
570
{
528
571
local task=" s2v2"
@@ -585,6 +628,7 @@ play_nodes_()
585
628
{
586
629
local nodes=(
587
630
soc_switch_on_off
631
+ soc_multilevel_sensor
588
632
)
589
633
for node in ${nodes[@]} ; do
590
634
node_cli_ $node h
@@ -682,6 +726,10 @@ split -v
682
726
focus right
683
727
screen -t "soc_switch_on_off" "2" $0 run_app_ soc_switch_on_off
684
728
729
+ split -v
730
+ focus right
731
+ screen -t "soc_multilevel_sensor" "3" $0 run_app_ soc_multilevel_sensor
732
+
685
733
focus down
686
734
screen -t "zpc" "0" $0 run_ zpc
687
735
0 commit comments