Skip to content

Commit 3c27ce8

Browse files
committed
feat(test): Add soc_multilevel_sensor app
Ror the record, I have been running this test during 24+ hours, no issue observed, except a wrong homeid after inclusion (see TODO), This will need to be investigated. Origin: #135 Relate-to: SiliconLabsSoftware/z-wave-engine-application-layer#76 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
1 parent 57424b7 commit 3c27ce8

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

scripts/tests/z-wave-stack-binaries-test.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,49 @@ play_node_soc_switch_on_off_()
528528
}
529529

530530

531+
play_node_soc_multilevel_sensor_()
532+
{
533+
local node="soc_multilevel_sensor"
534+
node_cli_ "$node" n
535+
log_ "$node: Play on $nodeid" # ~T738437 ~T738442
536+
537+
log_ "$node: Initial state reported after inclusion"
538+
539+
local ep="ep0/Basic/Attributes/PowerSource/Reported"
540+
local sub="ucl/by-unid/${nodeunid}/$ep"
541+
local key="value" ; key='"'$key'"' # JSON string
542+
local value='Battery' ; value='"'$value'"'
543+
local json='{'$key':'$value'}'
544+
local expect="$sub $json"
545+
sub_ "$sub" "$expect"
546+
547+
ep='ep0/TemperatureMeasurement/Attributes/MeasuredValue/Reported'
548+
sub="ucl/by-unid/${nodeunid}/$ep"
549+
value=322
550+
json='{'$key':'$value'}'
551+
expect="$sub $json"
552+
sub_ "$sub" "$expect"
553+
554+
ep='ep0/RelativityHumidity/Attributes/MeasuredValue/Reported'
555+
sub="ucl/by-unid/${nodeunid}/$ep"
556+
value=8
557+
json='{'$key':'$value'}'
558+
expect="$sub $json"
559+
sub_ "$sub" "$expect"
560+
561+
ep="ep0/PowerConfiguration/Attributes/BatteryPercentageRemaining/Reported"
562+
sub="ucl/by-unid/${nodeunid}/$ep"
563+
value=100
564+
json='{'$key':'$value'}'
565+
expect="$sub $json"
566+
sub_ "$sub" "$expect"
567+
568+
log_ "$type: Events from device $nodeunid: $node"
569+
node_cli_ "$node" 1
570+
sub_ "$sub" "$expect"
571+
}
572+
573+
531574
play_node_s2v2_()
532575
{
533576
local task="s2v2"
@@ -590,6 +633,7 @@ play_nodes_()
590633
{
591634
local nodes=(
592635
soc_switch_on_off
636+
soc_multilevel_sensor
593637
)
594638
for node in ${nodes[@]} ; do
595639
node_cli_ $node h
@@ -687,6 +731,10 @@ split -v
687731
focus right
688732
screen -t "soc_switch_on_off" "2" $0 run_app_ soc_switch_on_off
689733
734+
split -v
735+
focus right
736+
screen -t "soc_multilevel_sensor" "3" $0 run_app_ soc_multilevel_sensor
737+
690738
focus down
691739
screen -t "zpc" "0" $0 run_ zpc
692740

0 commit comments

Comments
 (0)