Fade not working, post migration changes


#1

1) Give a description of the problem
I have a piston that did a fade on several lights that is no longer working - level fade does not occur.
2) What is the expected behaviour?
Several of the dimmable lights should fade to off state after some time period. This was the behavior for me with the old app before a few “minor” changes I made to the piston (forced by the migration to new ST app). Had worked for literally years;-). The changes were (a) changed device type of the switch that triggers the piston from a “momentary button tile” to a simulated switch device type, and (b) added statement to piston to clear the switch when after it is set
3) What is happening/not happening?
Lights that are turned off are correctly turned off, but the lights that were subject to the fade remain “stuck” at the initial level specified in the fade statement.
4) Post a Green Snapshot of the pistonimage

5) Attach logs after turning logging level to Full
9/9/2020, 1:50:59 PM +79ms
+0ms ╔Received event [HayekHome].time = 1599684659936 with a delay of -858ms
+87ms ║RunTime Analysis CS > 20ms > PS > 42ms > PE > 25ms > CE
+89ms ║Runtime (38183 bytes) successfully initialized in 42ms (v0.3.110.20191009) (88ms)
+90ms ║╔Execution stage started
+91ms ║╚Execution stage complete. (1ms)
+92ms ╚Event processed successfully (92ms)
9/9/2020, 1:50:55 PM +507ms
+1ms ╔Received event [MR Exit [VS]].switch = off with a delay of 76ms
+103ms ║RunTime Analysis CS > 26ms > PS > 46ms > PE > 31ms > CE
+105ms ║Runtime (38171 bytes) successfully initialized in 46ms (v0.3.110.20191009) (103ms)
+106ms ║╔Execution stage started
+113ms ║║Comparison (enum) off changes_to (string) on = false (1ms)
+114ms ║║Cancelling condition #2’s schedules…
+115ms ║║Condition #2 evaluated false (5ms)
+116ms ║║Cancelling condition #1’s schedules…
+117ms ║║Condition group #1 evaluated false (state changed) (7ms)
+130ms ║╚Execution stage complete. (24ms)
+131ms ╚Event processed successfully (132ms)
9/9/2020, 1:50:54 PM +745ms
+1ms ╔Received event [MR Exit [VS]].switch = on with a delay of 180ms
+100ms ║RunTime Analysis CS > 20ms > PS > 42ms > PE > 39ms > CE
+102ms ║Runtime (38177 bytes) successfully initialized in 42ms (v0.3.110.20191009) (100ms)
+103ms ║╔Execution stage started
+111ms ║║Comparison (enum) on changes_to (string) on = true (1ms)
+113ms ║║Cancelling condition #2’s schedules…
+113ms ║║Condition #2 evaluated true (5ms)
+114ms ║║Cancelling condition #1’s schedules…
+115ms ║║Condition group #1 evaluated true (state changed) (8ms)
+118ms ║║Cancelling statement #5’s schedules…
+184ms ║║Executed physical command [Media Room Ceiling Lights].setLevel([80]) (55ms)
+202ms ║║Executed virtual command [Media Room Ceiling Lights].fadeLevel (75ms)
+216ms ║║Skipped execution of physical command [Media Room Rope Lights].setLevel([80]) because it would make no change to the device. (9ms)
+226ms ║║Executed virtual command [Media Room Rope Lights].fadeLevel (22ms)
+239ms ║║Skipped execution of physical command [Media Room Wall Sconces].setLevel([80]) because it would make no change to the device. (9ms)
+248ms ║║Executed virtual command [Media Room Wall Sconces].fadeLevel (20ms)
+249ms ║║Requesting a wake up for Wed, Sep 9 2020 @ 1:52:25 PM PDT (in 90.1s)
+254ms ║║Cancelling statement #3’s schedules…
+263ms ║║Skipped execution of physical command [Media Room Fan].off([]) because it would make no change to the device. (5ms)
+264ms ║║Executed [Media Room Fan].off (6ms)
+281ms ║║Executed physical command [Media Room Outer Ceiling Lights].off() (14ms)
+282ms ║║Executed [Media Room Outer Ceiling Lights].off (16ms)
+284ms ║║Cancelling statement #7’s schedules…
+296ms ║║Executed physical command [MR Exit [VS]].off() (8ms)
+297ms ║║Executed [MR Exit [VS]].off (10ms)
+330ms ║╚Execution stage complete. (226ms)
+343ms ║Setting up scheduled job for Wed, Sep 9 2020 @ 1:50:59 PM PDT (in 4.849s), with 57 more jobs pending
+349ms ╚Event processed successfully (350ms)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

I think setting the Task Cancellation Policy to Never Cancel on the with that includes the fade may fix it.

Alternatively reverse the order of the first two with actions and lose the async settings. It should just make the lights turn off fractionally before the fade starts instead of fractionally after.

Third option is to replace ‘Momentary Button Tile’ with a handler that behaves and go back to how you used to do it. I did once find that the Momentary Button Tile worked as a custom handler though I haven’t repeated tgat test for a long time.


#3

Yes! Setting the cancellation policy on the fade corrected the problem. I guess adding the switch reset to the piston caused it to stop the execution after the first iteration, something I had not expected.

Thanks