Help needed to debug piston


#1

1) Give a description of the problem
Piston stuck at ‘wait 60sec’. Timer is still currently running

2) What is the expected behavior?
Send notification when thermostat is idle, wait for 60 sec and send 2nd notification.

3) What is happening/not happening?
Not sending 2nd notification.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
11/7/2017, 1:43:03 PM +754ms +1ms╔Received event [Home].test = 1510083783745 with a delay of 5ms +88ms║RunTime Analysis CS > 22ms > PS > 49ms > PE > 19ms > CE +99ms║Runtime (38328 bytes) successfully initialized in 49ms (v0.2.0fa.20171011) (95ms) +101ms║╔Execution stage started +145ms║║Comparison (enum) idle is (string) idle = true (2ms) +148ms║║Condition #6 evaluated true (30ms) +149ms║║Condition group #1 evaluated true (state did not change) (33ms) +155ms║║Cancelling statement #2's schedules... +170ms║║Executed virtual command [Jesner Pereira's Android].sendPushNotification (4ms) +174ms║║Executed virtual command [Jesner Pereira's Android].wait (2ms) +176ms║║Requesting a wake up for Tue, Nov 7 2017 @ 1:44:03 PM CST (in 60.0s) +188ms║╚Execution stage complete. (89ms) +196ms║Setting up scheduled job for Tue, Nov 7 2017 @ 1:44:03 PM CST (in 59.983s) +211ms╚Event processed successfully (213ms)

REMOVE BELOW AFTER READING


#2

Awful lot of stuff that could come into conflict there.
I would try to find just 1 or 2 statements that will suit your needs.
What you do need to do though is enable Task Cancellation Policy to never.
Click on the WITH.
Then click on the settings cog.
Find Task Cancellation Policy (TCP) and select NEVER.
Because 2 of your IF’s can change, the task can stop.
Try changing to never first and see what happens.


#3

Minor change. If I test it a single execution goes through. I get the 2 notifications and then stop. I would like this piston to keep running. ie. I want the ON and OFF notifications to keep coming. When I figure that out I will add the fan on/off tasks.


#4

The piston ran early morning today. Nothing since then. It seems that there is some issue triggering the piston.


#5

I’m not sure if this is anything to do with it, but your have a NEVER in your IF. Any reason for that?
Remove that first.


#6

I was trying to figure out why the piston wasnt running after a successful test.


#7

So, remove it and try again.


#8

I got it to work. I had to use an WHILE loop. I guess even a REPEAT loop would work.