My first piston, controlling outdoor lights PDH


#1

1) Give a description of the problem
I have a piston working fine based on motion and time of day.

At the end of the code I want it to shutoff the light after sunrise or 6am. Based on TraceLog the code doesn’t fire to evaluate the if 6am statement. If I walk outside causing the motion to trigger and it’s after 6am the code trigger and the if 6am passes and the light is turned off.

2) What is the expected behavior?
My question is there something I need to do to cause the code to run periodically so the if 6am is tested without requiring me to walk outside.

3) What is happening/not happening?
The trigger based motion conditionals are working fine. My simple if conditional based on VirtualTime is not triggering.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: info ╔ Event processed successfully (248ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Comparison (time) 37209326 is_after (time) 1542848040000 = false (11ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Condition group #20 evaluated false (state did not change) (19ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Condition #17 evaluated false (16ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Cancelling condition #16’s schedules…

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Condition #16 evaluated true (12ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Comparison (enum) inactive changes_to (string) inactive = true (1ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Condition group #10 evaluated false (state did not change) (16ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Cancelling condition #11’s schedules…

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Condition #11 evaluated false (13ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Skipped execution of physical command [Exterior Sconces].off([]) because it would make no change to the device. (4ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Condition #29 evaluated true (37ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Time restriction check passed

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Comparison (time) 37209214 is_before (time) 1542848040000 = true (11ms)

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: debug ║║ Time restriction check passed

825924a0-213b-4f20-b513-8c97ef573780 10:20:09 AM: trace ║╚ Execution stage started

REMOVE BELOW AFTER READING


#2

I suggest changing line 18 to everyday at 6:00 AM, then drop the time is before sunset condition.

then…


Light Piston loops