1) Give a description of the problem
While loop not working as expected when using Smart Home Monitor Status as the condition.
2) What is the expected behavior?
The While loop has an announcement that plays through Echo devices that I want to repeat every few seconds as long as the Smart Home Monitor status is still Armed/Stay.
3) What is happening/not happening?
In the current configuration snapshot shown. The announcement plays once but never repeats. But if I use a physical switch for the condition of the While statement, it works as expected. I can see that the $shmStatus variable is still Armed/Stay and the ST Classic app also shows that it is still in Armed/Stay mode. I have also tried using the state of $shmTripped for the While condition and it didn’t work either. I read in some other threads that the While statement might not be the best to use, but it works when a physical switch state is used for the condition, which I find confusing.
4) Post a Green Snapshot of the piston
5) Attach any logs (From ST IDE and by turning logging level to Full)
1/25/2019, 11:29:02 AM +63ms
+1ms ╔Received event [Home].time = 1548437343303 with a delay of -1240ms
+183ms ║RunTime Analysis CS > 20ms > PS > 143ms > PE > 20ms > CE
+186ms ║Runtime (40783 bytes) successfully initialized in 143ms (v0.3.109.20181207) (184ms)
+187ms ║╔Execution stage started
+189ms ║╚Execution stage complete. (1ms)
+191ms ╚Event processed successfully (190ms)
1/25/2019, 11:28:33 AM +727ms
+1ms ╔Received event [Kitchen Slider].contact = closed with a delay of 86ms
+108ms ║RunTime Analysis CS > 12ms > PS > 80ms > PE > 16ms > CE
+111ms ║Runtime (40777 bytes) successfully initialized in 80ms (v0.3.109.20181207) (109ms)
+112ms ║╔Execution stage started
+141ms ║║Comparison (enum) closed changes_to (string) open = false (1ms)
+144ms ║║Cancelling condition #20’s schedules…
+145ms ║║Condition #20 evaluated false (27ms)
+146ms ║║Cancelling condition #19’s schedules…
+148ms ║║Condition group #19 evaluated false (state changed) (29ms)
+151ms ║╚Execution stage complete. (39ms)
+152ms ╚Event processed successfully (152ms)
1/25/2019, 11:28:31 AM +316ms
+1ms ╔Received event [Kitchen Slider].contact = open with a delay of 91ms
+151ms ║RunTime Analysis CS > 15ms > PS > 101ms > PE > 35ms > CE
+154ms ║Runtime (40781 bytes) successfully initialized in 101ms (v0.3.109.20181207) (151ms)
+155ms ║╔Execution stage started
+186ms ║║Comparison (enum) open changes_to (string) open = true (1ms)
+190ms ║║Cancelling condition #20’s schedules…
+191ms ║║Condition #20 evaluated true (29ms)
+200ms ║║Comparison (string) stay is (string) stay = true (2ms)
+202ms ║║Condition #28 evaluated true (9ms)
+203ms ║║Cancelling condition #19’s schedules…
+204ms ║║Condition group #19 evaluated true (state changed) (43ms)
+207ms ║║Cancelling statement #22’s schedules…
+218ms ║║Calculating (string) Intrusion Alert. + (string) Kitchen Slider >> (string) Intrusion Alert. Kitchen Slider
+222ms ║║Calculating (string) Intrusion Alert. Kitchen Slider , (string) has opened. >> (string) Intrusion Alert. Kitchen Slider has opened.
+227ms ║║Executed virtual command setVariable (2ms)
+239ms ║║Comparison (string) stay is (string) stay = true (2ms)
+241ms ║║Condition #25 evaluated true (9ms)
+242ms ║║Condition group #24 evaluated true (state did not change) (11ms)
+245ms ║║Cancelling statement #18’s schedules…
+1974ms ║║Executed physical command [Echo - Bruce’s Echo Dot].playAnnouncementAll([Intrusion Alert. Kitchen Slider has opened.]) (1722ms)
+1975ms ║║Executed [Echo - Bruce’s Echo Dot].playAnnouncementAll (1724ms)
+1979ms ║║Cancelling statement #26’s schedules…
+1984ms ║║Executed virtual command wait (1ms)
+1986ms ║║Requesting a wake up for Fri, Jan 25 2019 @ 11:29:03 AM CST (in 30.0s)
+1993ms ║╚Execution stage complete. (1837ms)
+1995ms ║Setting up scheduled job for Fri, Jan 25 2019 @ 11:29:03 AM CST (in 29.993s)
+2004ms ╚Event processed successfully (2004ms)