@@ -523,6 +523,49 @@ play_node_soc_switch_on_off_()
523523}
524524
525525
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+
526569play_node_s2v2_ ()
527570{
528571 local task=" s2v2"
@@ -585,6 +628,7 @@ play_nodes_()
585628{
586629 local nodes=(
587630 soc_switch_on_off
631+ soc_multilevel_sensor
588632 )
589633 for node in ${nodes[@]} ; do
590634 node_cli_ $node h
@@ -682,6 +726,10 @@ split -v
682726focus right
683727screen -t "soc_switch_on_off" "2" $0 run_app_ soc_switch_on_off
684728
729+ split -v
730+ focus right
731+ screen -t "soc_multilevel_sensor" "3" $0 run_app_ soc_multilevel_sensor
732+
685733focus down
686734screen -t "zpc" "0" $0 run_ zpc
687735
0 commit comments