Your underlying OSC setup will run 30 seconds on, 30 seconds off starting at midnight. But because you added the “if/then” times, it will ONLY do its “30 on, 30 off” between 10:00 and 10:02, 13:00 and 13:02, and 16:00 and 16:02.
Because the way you set up your OSC code, during those “on” windows the OSC code will still only do 30 sec on, 30 sec off.
So at 1000, it will turn on for 30 seconds, off for 30 seconds, on for 30 seconds, then off again.
I assume you’re wanting it to run for the entire 2 minutes, not just in 30 second intervals within those two minute windows?
If that’s the case you’d want this:
Fallback OFF
OSC 060:00/002:00/178:00 Then ON
If Time 00:00 to 10:00 Then OFF
If Time 10:02 to 13:00 Then OFF
If Time 13:02 to 16:00 Then OFF
If Time 16:02 to 00:00 Then OFF
If FeedD 000 Then ON
“The first line — Fallback OFF — instructs the Apex to turn off this output if the Apex ever gets disconnected from the Energy Bar where the [Plank] is plugged in. This could also apply if the Apex locks up and becomes unresponsive (which rarely happens). This just basically means don’t run the program if the Apex unit isn’t in control of the situation.“ (from
@SuncrestReef Apex tutorial). Maybe not super important to include this line in this case. It’s up to you.
The second line instructs the Plank to run for 2 minutes, followed by 178 minutes of “off” time, starting at 0100 (the initial 060:00 pushes the start time back an hour from midnight). 178 minutes + 2 minutes =180 minutes (3 hour cycles)
So the OSC command on its own would run the Plank at 0100, 0400, 0700, 1000, 1300, 1600, 1900, 2200.
By adding the “if/then” statements you added, the only times it will actually run are 1000, 1300, 1600.
Now for your FeedD command…
I’m not entirely clear on is your last line about FeedD. My understanding is that the Apex reads from the top to the bottom, but stops as soon as an “OFF” command is satisfied (ignoring whatever comes after). My understanding of this could be a little off so don’t take this paragraph as gospel :) If your FeedD command is LAST in line, it wouldn’t trigger if any of the above statements are true. In other words, if the current time is in one of your “off” windows, the Apex wouldn’t honor your FeedD request because an OFF command is already satisfied. If my understanding of that is correct, I would think you would need to put that line BEFORE the OFF commands. But again, my understanding of how the Apex reads through these lines of code isn’t clear. So maybe somebody else can clarify that.
Personally I would drop the FeedD part. If you want to fed manually, either do it by hand or slide the Fusion slider from “auto” to “on”
***DO NOT FORGET TO TURN IT BACK TO AUTO OR YOUR PLANK WILL RUN THE HOPPER DRY***