1) Give a description of the problem
I have a piston that monitors a global variable, and set piston state to false when the global variable changes to “false” (string value), but it only detects changes to true, not changes to false.
Note that originally the global variable was set as boolean, when I saw out not working for the same reason I changed it to string for the value comparison.
2) What is the expected behavior?
When global variable changes from “true” to “false”, it can detect the change and set piston state to false.
3) What is happening/not happening?
Global variable changes from “false” to “true” not detected, log data shows it’s regarding the “changes to” trigger as false. (“Comparison (string) “false” changes_to (string) “false” = false (1ms)” on below log)
When changes from “false” to “true” though, it’s working as expected. (“Comparison (string) “true” changes_to (string) “true” = true (1ms)” on below log)
**4) Post a Green Snapshot of the piston!
**5) Attach any logs **
Working log:
10/23/2018, 10:18:24 PM +847ms
+0ms ╔Received event [Home].:892b416409f20adf038cd1ba2cd3cd89: = @AllPresent with a delay of 54ms
+102ms ║RunTime Analysis CS > 18ms > PS > 58ms > PE > 26ms > CE
+104ms ║Runtime (41771 bytes) successfully initialized in 58ms (v0.3.108.20180906) (103ms)
+105ms ║╔Execution stage started
+116ms ║║Comparison (string) "true" changes_to (string) "true" = true (1ms)
+118ms ║║Cancelling condition #3's schedules...
+119ms ║║Condition #3 evaluated true (7ms)
+120ms ║║Cancelling condition #1's schedules...
+121ms ║║Condition group #1 evaluated true (state changed) (10ms)
+124ms ║║Cancelling statement #8's schedules...
+129ms ║║Executed virtual command setState (1ms)
+137ms ║║AllPresent has changed to true
+138ms ║║Executed virtual command log (2ms)
+142ms ║╚Execution stage complete. (36ms)
+143ms ╚Event processed successfully (144ms)
Non-working log:
10/24/2018, 8:16:27 AM +343ms
+0ms ╔Received event [Home].:892b416409f20adf038cd1ba2cd3cd89: = @AllPresent with a delay of 64ms
+109ms ║RunTime Analysis CS > 19ms > PS > 63ms > PE > 27ms > CE
+111ms ║Runtime (41769 bytes) successfully initialized in 63ms (v0.3.108.20180906) (110ms)
+113ms ║╔Execution stage started
+123ms ║║Comparison (string) "false" changes_to (string) "true" = false (1ms)
+125ms ║║Cancelling condition #3's schedules...
+127ms ║║Condition #3 evaluated false (7ms)
+128ms ║║Cancelling condition #1's schedules...
+129ms ║║Condition group #1 evaluated false (state changed) (10ms)
+134ms ║║Comparison (string) "false" changes_to (string) "false" = false (1ms)
+136ms ║║Condition #4 evaluated false (5ms)
+138ms ║║Condition group #2 evaluated false (state did not change) (7ms)
+140ms ║╚Execution stage complete. (28ms)
+142ms ╚Event processed successfully (143ms)
Thanks in advance for the help!