Hey guys, I am trying to have my porch light and living room lights turn on when someone arrives home after dark. However, if someone is watching TV in the living room, only the porch lights will turn on. All lights should turn off 5 minutes after turning on. I had it working in regular Core, but can’t get anything besides the porch light working in WebCore. Appreciate any suggestions you can provide.
Second Half of Piston Not Firing - Solved
Waits combined with triggers can get tricky. The way your piston is written, this is what happens:
One of your presence sensors arrives (changes to present), so your condition evaluates true.
Your piston has a wait for 5 minutes, so it sets a wake-up time for itself 5 minutes in the future.
After 5 minutes, your piston wakes up and executes from the top. Since your presence sensor has been present for some time, the “changes to present” no longer evaluates true and your piston skips completing the remaining “then” actions.
To get around this, try clicking on your WITH statements, click on the gear cog, and then change your Task Cancellation Policy" to “Never Cancel Tasks”. If that doesn’t fix it, there are a couple other ways to approach a fix that we’ll throw at it.
Another 'Wait' issue
Mailbox piston, Need another set of eyes to help me
Piston will not resume from paused state after set time
Okay, so that worked, but not as I intended. The living room lights turned on 5 minutes after the porch light. I want them to turn on at the same time.
Ah, right. Click on each WITH statement again and change from Synchronous to Asynchronous. That should do it!
Thanks for the help! I would have never figured that out. Both lights are now turning on. However, the living room lights turn on when my TV is on as well and they shouldn’t be. The restrictions are set on my Harmony remote activities being on, if they are, the living room lights should not turn on, but they are. Getting close at least! Lol.
For what it’s worth, none of my pistons are at Revision 1… or anything close to it! lol
Are your living room lights “White bulb 4” in your posted example?
Yup, that would be them and the switch restrictions above it are my TV, Xbox, PS4, etc Harmony activities.
Change that statement to ALL of instead of ANY. Currently it only takes one of those switches to be off for it to turn an your living room lights.
Click on the IF statement, then there should be an orange box you can change from ANY to ALL, and you’re all set.
Bingo! Works great and now I understand how the pistons work a little better. Thanks for all the help!
Okay, so this piston randomly decided to stop working. It looks like all the conditions were met in the logs, but the switches were never triggered?
9/25/2018, 8:00:52 PM +513ms
+2ms ╔Received event [Mary's Arrival Sensor].presence = present with a delay of 805ms
+197ms ║RunTime Analysis CS > 44ms > PS > 100ms > PE > 54ms > CE
+200ms ║Runtime (41655 bytes) successfully initialized in 100ms (v0.3.108.20180906) (197ms)
+201ms ║╔Execution stage started
+212ms ║║Comparison (string) :544a9b992c238a89c379073fefaa7fe1: is_not (string) :d9ffb4c971fcdbf37488d71ae133699a: = true (3ms)
+215ms ║║Condition #11 evaluated true (7ms)
+217ms ║║Condition group #null evaluated true (state did not change) (11ms)
+320ms ║║Comparison (datetime) 1537920052736 is_between (datetime) 1537915800000 .. (datetime) 1537872420000 = true (5ms)
+322ms ║║Time restriction check passed
+325ms ║║Cancelling condition #23's schedules...
+326ms ║║Condition #23 evaluated true (104ms)
+327ms ║║Cancelling condition #12's schedules...
+329ms ║║Condition group #12 evaluated true (state changed) (107ms)
+341ms ║║Comparison (enum) present changes_to (string) present = false (1ms)
+343ms ║║Cancelling condition #22's schedules...
+345ms ║║Condition #22 evaluated false (14ms)
+346ms ║║Cancelling condition #12's schedules...
+348ms ║║Condition group #12 evaluated false (state changed) (17ms)
+351ms ║╚Execution stage complete. (150ms)
+352ms ╚Event processed successfully (352ms)