Piston is not repeating... possibly from wait?


#1

1) Give a description of the problem
The piston isn’t “repeating” so I’m not getting a follow up email every one minute

2) What is the expected behaviour?
When a door is open it will send an email to me every 1 minute

3) What is happening/not happening?
I get the initial email but not a follow up

4) Post a Green Snapshot of the pistonimage

10/15/2019, 9:24:37 AM +167ms
+1ms ╔Received event [Conga].time = 1571153078006 with a delay of -839ms
+93ms ║RunTime Analysis CS > 21ms > PS > 48ms > PE > 24ms > CE
+95ms ║Runtime (40950 bytes) successfully initialized in 48ms (v0.3.10f.20190822) (93ms)
+96ms ║╔Execution stage started
+136ms ║║Comparison (enum) closed is (string) closed = true (1ms)
+139ms ║║Condition #14 evaluated true (34ms)
+140ms ║║Condition group #13 evaluated true (state did not change) (35ms)
+142ms ║╚Execution stage complete. (46ms)
+143ms ╚Event processed successfully (143ms)
10/15/2019, 9:23:37 AM +677ms
+1ms ╔Received event [Multipurpose Sensor].contact = open with a delay of 78ms
+60ms ║RunTime Analysis CS > 14ms > PS > 30ms > PE > 16ms > CE
+63ms ║Runtime (40929 bytes) successfully initialized in 30ms (v0.3.10f.20190822) (60ms)
+63ms ║╔Execution stage started
+101ms ║║Comparison (enum) closed is (string) open = false (1ms)
+103ms ║║Comparison (enum) closed is (string) open = false (1ms)
+105ms ║║Comparison (enum) closed is (string) open = false (1ms)
+107ms ║║Comparison (enum) closed is (string) open = false (1ms)
+109ms ║║Comparison (enum) open is (string) open = true (1ms)
+111ms ║║Comparison (enum) closed is (string) open = false (1ms)
+113ms ║║Comparison (enum) closed is (string) open = false (1ms)
+115ms ║║Comparison (enum) closed is (string) open = false (1ms)
+117ms ║║Comparison (enum) closed is (string) open = false (1ms)
+122ms ║║Cancelling condition #12's schedules...
+123ms ║║Condition #12 evaluated true (56ms)
+124ms ║║Cancelling condition #11's schedules...
+125ms ║║Condition group #11 evaluated true (state changed) (58ms)
+128ms ║║Cancelling statement #15's schedules...
+134ms ║║Calculating (string) The + (string) Multipurpose Sensor >> (string) The Multipurpose Sensor
+137ms ║║Calculating (string) The Multipurpose Sensor + (string) is open >> (string) The Multipurpose Sensor is open
+143ms ║║Calculating (string) The + (string) Multipurpose Sensor >> (string) The Multipurpose Sensor
+146ms ║║Calculating (string) The Multipurpose Sensor + (string) is open >> (string) The Multipurpose Sensor is open
+324ms ║║Executed virtual command sendEmail (176ms)
+327ms ║║Executed virtual command wait (0ms)
+328ms ║║Requesting a wake up for Tue, Oct 15 2019 @ 9:24:38 AM MDT (in 60.0s)
+332ms ║╚Execution stage complete. (269ms)
+334ms ║Setting up scheduled job for Tue, Oct 15 2019 @ 9:24:38 AM MDT (in 59.996s)
+362ms ╚Event processed successfully (362ms)

#2

Hi,

I’m not sure how the comparison at line 31 will work with multiple sensors? I’m wondering if its evaluating as an ‘and’ between each sensor, so will evaluate to false unless all sensors are open. I think thats what the log is implying.

I’d also change the first if to ‘changes to open’ this will create a subscription to the event. As your piston stands, in the absence of any other trigger, webcore will treat these as a trigger. (denoted by the lightning bolts in the margin) I don’t think the condition on the while loop should be a trigger, if you make the suggested change, the lightning bolt should disappear from the loop condition on line 31.


#3

Thanks Paul, the change on line 31 made it work!


#4

There is a strict daily limit on emails. Once we cross that threshold, then all the rest of the emails for the day will be lost forever.


#5

Thank you, this is also good info I didn’t know about… I had it set up for 1 minute as a test. But since changed it to 30


#6

If it helps, I usually use the command “Log to console” during testing. It can be very helpful, and there are no restrictions or daily limits on logs. (well, there is a 100KB limit on each piston, but that can easily hold hundreds of lines)