1) Give a description of the problem
Piston executes when I don’t want it to.
2) What is the expected behaviour?
My piston is designed to be called by a Raspberry Pi app via its external URL. The piston has two things to do: 1) toggle a virtual switch, and 2) speak text as long as it’s not between midnight and 9:30am. I want the piston to only execute if called by my app.
3) What is happening/not happening?
It works when it’s called BUT it keeps also executing at 9:30am and midnight every day. I only want it to execute when called via url by my app. Apparently because I have an IF statement based on time, webcore wants to schedule it to run again at 9:30. How do I suppress this behavior?
Additional comments:
-
I know I could probably fix this by separating it into two separate pistons: one to toggle the virutal switch, and the second to be triggered by the virtual switch, but I have need several of these pistons for different cases, and I’d prefer to keep the logic all in one piston if I can.
-
Webcore seems to want to self schedule the piston for later because it sees an IF based on a time range. Is there some advanced config thing I can set to stop this? Or is there a different way I need to arrange the logic?
**4) Post a Green Snapshot of the piston!
5) Attach logs after turning logging level to Full
7/4/2019, 9:29:59 AM +73ms
+0ms ╔Received event [The Austin’s Home].time = 1562250600000 with a delay of -927ms
+85ms ║RunTime Analysis CS > 17ms > PS > 39ms > PE > 29ms > CE
+88ms ║Runtime (37035 bytes) successfully initialized in 39ms (v0.3.10c.20190522) (87ms)
+89ms ║╔Execution stage started
+94ms ║║Cancelling statement #1’s schedules…
+131ms ║║Executed physical command [StreetCamSwitch].off() (31ms)
+132ms ║║Executed virtual command [StreetCamSwitch].toggle (35ms)
+145ms ║║Comparison (time) 34199208 is_not_between (time) 0 … (time) 34200000 = true (8ms)
+148ms ║║Time restriction check passed
+149ms ║║Cancelling condition #4’s schedules…
+150ms ║║Condition #4 evaluated true (15ms)
+151ms ║║Cancelling statement #4’s schedules…
+156ms ║║Requesting time schedule wake up at Fri, Jul 5 2019 @ 12:00:00 AM CDT
+159ms ║║Cancelling condition #3’s schedules…
+159ms ║║Condition group #3 evaluated true (state changed) (24ms)
+162ms ║║Cancelling statement #5’s schedules…
+530ms ║║Executed physical command [Watson Announcer].playText([There is motion at the street, 85]) (362ms)
+531ms ║║Executed [Watson Announcer].playText (364ms)
+534ms ║╚Execution stage complete. (445ms)
+535ms ║Setting up scheduled job for Fri, Jul 5 2019 @ 12:00:00 AM CDT (in 52200.393s)
+544ms ╚Event processed successfully (543ms)
7/4/2019, 8:01:06 AM +687ms
+1ms ╔Received event [The Austin’s Home].execute = 96.8.203.182 with a delay of 42ms
+66ms ║RunTime Analysis CS > 15ms > PS > 35ms > PE > 16ms > CE
+68ms ║Runtime (37035 bytes) successfully initialized in 35ms (v0.3.10c.20190522) (67ms)
+69ms ║╔Execution stage started
+73ms ║║Cancelling statement #1’s schedules…
+108ms ║║Executed physical command [StreetCamSwitch].on() (28ms)
+109ms ║║Executed virtual command [StreetCamSwitch].toggle (34ms)
+120ms ║║Comparison (time) 28866799 is_not_between (time) 0 … (time) 34200000 = false (7ms)
+122ms ║║Condition #4 evaluated false (11ms)
+123ms ║║Cancelling statement #4’s schedules…
+127ms ║║Requesting time schedule wake up at Thu, Jul 4 2019 @ 9:30:00 AM CDT
+130ms ║║Condition group #3 evaluated false (state did not change) (19ms)
+132ms ║╚Execution stage complete. (63ms)
+133ms ║Setting up scheduled job for Thu, Jul 4 2019 @ 9:30:00 AM CDT (in 5333.18s)
+145ms ╚Event processed successfully (145ms)