1) Give a description of the problem
Trying to get my first piston to work. Picked something I thought would be pretty simple. I have a device that displays as three separate switches, ‘Switch 8’, ‘Switch 9’, and ‘Switch 10’. They all display fine in AT.
2) What is the expected behaviour?
Basically, this is a home alarm system. The switches represent two armed states and a disarmed state. I created a virtual switch that I want to show on or off based on the states of the existing devices. One device to show armed or disarmed.
Right now, if the system is armed and disarm is run, the switch associated with disarm will turn on and the switch associated with either armed state will turn off. This currently works. The reverse is true. If the system is in a disarmed state, and one of the two armed states is enabled, their associated switches will change correctly.
3) What is happening/not happening?
Although the existing switches work correctly, the piston monitoring their states and changing the state of the virtual switch doesn’t work. It will generally report no state change found.
**4) Post a Green Snapshot of the piston![image|45x37]
5) Attach logs after turning logging level to Full
Here are the trace logs from my latest test. In this test, Switch 8 was initially in an off state and Switch 10 was in an on state. Switch 8 was turned on, which caused switch 10 to turn off. The trace log shows that condition #6 evaluated false even though the switch state should have changed from on to off.
I think it has to do with the “Comparison (enum) off changes_to(string) off = false” line, but I’m not sure what that means.
8/20/2019, 6:13:55 PM +585ms
+1ms ╔Received event [Switch 10].switch = off with a delay of 37ms
+10105ms ║RunTime Analysis CS > 14ms > PS > 10081ms > PE > 10ms > CE
+10106ms ║Piston waited at a semaphore for 10017ms
+10108ms ║Runtime (38540 bytes) successfully initialized in 10081ms (v0.3.10c.20190522) (10106ms)
+10109ms ║╔Execution stage started
+10120ms ║║Condition #2 evaluated false (6ms)
+10121ms ║║Condition group #1 evaluated false (state did not change) (8ms)
+10130ms ║║Condition #10 evaluated false (5ms)
+10131ms ║║Condition group #9 evaluated false (state did not change) (6ms)
+10136ms ║║Comparison (enum) off changes_to (string) off = false (1ms)
+10137ms ║║Condition #6 evaluated false (4ms)
+10139ms ║║Condition group #5 evaluated false (state did not change) (6ms)
+10141ms ║╚Execution stage complete. (32ms)
+10142ms ╚Event processed successfully (10142ms)
8/20/2019, 6:13:55 PM +578ms
+0ms ╔Received event [Switch 8].switch = on with a delay of 46ms
+98ms ║RunTime Analysis CS > 16ms > PS > 72ms > PE > 11ms > CE
+101ms ║Runtime (38460 bytes) successfully initialized in 72ms (v0.3.10c.20190522) (100ms)
+102ms ║╔Execution stage started
+114ms ║║Condition #2 evaluated false (5ms)
+115ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+119ms ║║Comparison (enum) on changes_to (string) off = false (0ms)
+122ms ║║Condition #10 evaluated false (4ms)
+124ms ║║Condition group #9 evaluated false (state did not change) (6ms)
+132ms ║║Condition #6 evaluated false (6ms)
+133ms ║║Condition group #5 evaluated false (state did not change) (7ms)
+135ms ║╚Execution stage complete. (34ms)
+136ms ╚Event processed successfully (137ms)