A working Piston just went mad!


#1

1) Give a description of the problem
This piston just went wrong about 4 days back…I didn’t touch it, i swear!
I have a 2nd exact piston which works fine, so to try and fix the problem, I created a copy of the working one, but still it doesn’t work. I even renamed it slightly difference, etc.

2) What is the expected behaviour?
After 19:30pm, the piston should stop turning the lights on.

3) What is happening/not happening?
It turns the lights on all day and night. It first started at midnight and went on through out the night, no one got any sleep until 4am when I had the clever idea of pausing the piston.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full
22/04/2020, 17:18:00 +396ms
+1ms ╔Received event [Landing Light].switch = on with a delay of 52ms
+95ms ║RunTime Analysis CS > 16ms > PS > 40ms > PE > 39ms > CE
+98ms ║Runtime (42508 bytes) successfully initialized in 40ms (v0.3.110.20191009) (96ms)
+99ms ║╔Execution stage started
+107ms ║║Cancelling condition #5’s schedules…
+108ms ║║Condition #5 evaluated false (6ms)
+109ms ║║Cancelling condition #1’s schedules…
+110ms ║║Condition group #1 evaluated false (state changed) (8ms)
+117ms ║║Condition #12 evaluated false (5ms)
+118ms ║║Condition group #8 evaluated false (state did not change) (6ms)
+123ms ║║Comparison (enum) on changes_to (string) on = true (1ms)
+124ms ║║Cancelling condition #18’s schedules…
+125ms ║║Condition #18 evaluated true (5ms)
+126ms ║║Cancelling condition #14’s schedules…
+127ms ║║Condition group #14 evaluated true (state changed) (7ms)
+132ms ║║Comparison (boolean) true is (boolean) true = true (1ms)
+134ms ║║Condition #30 evaluated true (4ms)
+135ms ║║Condition group #27 evaluated true (state did not change) (5ms)
+137ms ║║Cancelling statement #28’s schedules…
+142ms ║║Executed virtual command setVariable (2ms)
+148ms ║║Comparison (enum) on changes_to (string) off = false (0ms)
+149ms ║║Condition #26 evaluated false (4ms)
+150ms ║║Condition group #23 evaluated false (state did not change) (5ms)
+152ms ║╚Execution stage complete. (54ms)
+153ms ╚Event processed successfully (153ms)
22/04/2020, 17:17:58 +794ms
+1ms ╔Received event [Landing Motion Sensor].motion = active with a delay of 79ms
+108ms ║RunTime Analysis CS > 16ms > PS > 49ms > PE > 42ms > CE
+110ms ║Runtime (42524 bytes) successfully initialized in 49ms (v0.3.110.20191009) (108ms)
+111ms ║╔Execution stage started
+119ms ║║Comparison (enum) active changes_to (string) active = true (1ms)
+120ms ║║Cancelling condition #5’s schedules…
+121ms ║║Condition #5 evaluated true (5ms)
+128ms ║║Comparison (enum) off is (string) off = true (1ms)
+130ms ║║Condition #6 evaluated true (8ms)
+163ms ║║Comparison (time) 62278925 is_between (time) 1587582600000 … (time) 70200000 = true (8ms)
+165ms ║║Time restriction check passed
+166ms ║║Condition #32 evaluated true (35ms)
+167ms ║║Cancelling condition #1’s schedules…
+168ms ║║Condition group #1 evaluated true (state changed) (53ms)
+170ms ║║Cancelling statement #2’s schedules…
+270ms ║║Executed physical command [Landing Light].on() (97ms)
+272ms ║║Executed [Landing Light].on (99ms)
+277ms ║║Executed virtual command [Landing Light].setVariable (2ms)
+283ms ║║Comparison (enum) active changes_to (string) inactive = false (0ms)
+284ms ║║Condition #12 evaluated false (4ms)
+285ms ║║Condition group #8 evaluated false (state did not change) (6ms)
+292ms ║║Condition #18 evaluated false (4ms)
+293ms ║║Condition group #14 evaluated false (state did not change) (6ms)
+300ms ║║Condition #26 evaluated false (4ms)
+301ms ║║Condition group #23 evaluated false (state did not change) (6ms)
+303ms ║╚Execution stage complete. (192ms)
+304ms ╚Event processed successfully (304ms)
22/04/2020, 17:17:50 +962ms
+1ms ╔Starting piston… (v0.3.110.20191009)
+607ms ║╔Subscribing to devices…
+652ms ║║Subscribing to Landing Motion Sensor.motion…
+664ms ║║Subscribing to Landing Light.switch…
+847ms ║╚Finished subscribing (244ms)
+871ms ║Cancelling condition #5’s schedules…
+878ms ║Comparison (enum) off is (string) off = true (2ms)
+880ms ║Cancelling condition #6’s schedules…
+974ms ║Comparison (time) 62271895 is_between (time) 1587582600000 … (time) 70200000 = true (10ms)
+976ms ║Time restriction check passed
+990ms ║Comparison (boolean) true is (boolean) true = true (1ms)
+1004ms ║Comparison (boolean) true is (boolean) true = true (1ms)
+1021ms ╚Piston successfully started (1021ms)
21/04/2020, 20:12:26 +110ms
+10134ms ║Piston waited at a semaphore for 10013ms

Any help would be grateful please, as for my life I can’t see logic as to why even a copy of a working piston doesn’t work :frowning:


#2

I need to be on a different device to read the piston code, but here sunset is about 8:10pm. So about four days or so ago ‘30 minutes before sunset’ would switch from being before 19:30 to after 19:30. I am wondering if the code assumes the first time in a ‘between’ must come before the last time and so adjusts one of the times +/- 24 hours accordingly.


#3

oh my god, I think you knocked the nail on the head! The piston looks like its behaving now, i.e. it has stopped turning on.

Now thinking of it, t does make sense, i.e. that the other identical piston was working and this wasn’t - the only difference was the working one was set to 2000hrs and this one was 1930hrs.

I will see how it goes tonight, but otherwise a million thanks :slight_smile: