Help With different Timed lights multiple times a day

conditions
execution

#1

1) Give a description of the problem
Hello All
I have created a piston with help from this community.(thanks to all)
unfortunately the Second (With) statement on second (IF) statements is not executing.

2) What is the expected behaviour?
Expected behaviors id for device (switch two) to come on at assigned time

3) What is happening/not happening?
unfortunately the (switch 2) (with) statement is not running

**4) Post a Green Snapshot of the piston![image|45x37])

5) Attach logs after turning logging level to Full

+0ms â•”Received eventXXXXXXXXXXXtest = 1574300841092 with a delay of 0ms
+58ms â•‘RunTime Analysis CS > 17ms > PS > 22ms > PE > 20ms > CE
+61ms â•‘Runtime (40351 bytes) successfully initialized in 22ms (v0.3.110.20191009) (60ms)
+63ms â•‘â•”Execution stage started
+71ms â•‘â•‘Comparison (time) 71241161 happens_daily_at (time) 18000000 = false (1ms)
+73ms â•‘â•‘Condition #25 evaluated false (4ms)
+74ms ║║Cancelling statement #25’s schedules…
+78ms â•‘â•‘Requesting time schedule wake up at Thu, Nov 21 2019 @ 5:00:00 AM CST
+81ms â•‘â•‘Condition group #19 evaluated false (state did not change) (12ms)
+87ms â•‘â•‘Comparison (time) 71241177 happens_daily_at (time) 55800000 = false (1ms)
+89ms â•‘â•‘Condition #41 evaluated false (5ms)
+90ms ║║Cancelling statement #41’s schedules…
+94ms â•‘â•‘Requesting time schedule wake up at Thu, Nov 21 2019 @ 3:30:00 PM CST
+97ms â•‘â•‘Condition group #26 evaluated false (state did not change) (14ms)
+102ms â•‘â•‘Comparison (time) 71241193 happens_daily_at (time) 23400000 = false (1ms)
+104ms â•‘â•‘Condition #34 evaluated false (5ms)
+106ms ║║Cancelling statement #34’s schedules…
+109ms â•‘â•‘Requesting time schedule wake up at Thu, Nov 21 2019 @ 6:30:00 AM CST
+112ms â•‘â•‘Condition group #27 evaluated false (state did not change) (13ms)
+134ms ║╚Execution stage complete. (72ms)
+137ms â•‘Setting up scheduled job for Thu, Nov 21 2019 @ 5:00:00 AM CST (in 33158.771s), with 2 more jobs pending
+149ms ╚Event processed successfully (148ms)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

Maybe I am just old school, but since you have no conditional logic (other than day and time), why not just make each time slot in it’s own block?

Every day at 5:00am, but only on M-F
    do W
END EVERY

Every day at 7:30am, but only on M-F
    do X
END EVERY

Every day at 3:30pm, but only on M-F
    do Y
END EVERY

Every day at 5:25pm, but only on M-F
    do Z
END EVERY

etc…


#3

Thanks for your prompt response.
Great idea …I will try this out and and revert back.


#4

WCmore…Here is what it looks like
.A bit lengthy but im positive it will run correctly


#5

It looks good!


Pro Tip:

If you decide to add any commands outside of an IF, they will run at each event time. This is because “IF Time happens at X PM” will actually run thru the entire code, top to bottom, and execute any code not blocked by conditions.


#6

*sighs*

I guess I don’t get credit for the pic because I typed the solution instead of giving an import code… I apologize. I have been on a “house-cleaning” kick lately… (I’m trying to reduce my 450 pistons by at least half) This means for the rest of the year, much of my help here will be hand typed…

I guess one good aspect of this is that users will get good practice converting my text into working pistons, LOL


#7

Hello my apologies for not checking the correct solution check box. I meant no disrespect and it was not intentional. (But in my defense on my own stupidity I did give you thanks in the post. :slightly_smiling_face:)

As for you typing the solution versus an import .kindly appreciated. I usually prefer typed as I learn more that way. Also thanks for the Pro tip.


#8

You are most welcome… and thank you for the extra click…