Timing blocks

Six blocks that deal with time: four that delay or stretch a signal, and two that watch the clock on their own.

1.Choosing the right one

They look similar in the menu and behave very differently.

BlockUse it when you wantDriven by
DelayThe same value, later.Its input
TimerSomething to run for a fixed length of time.Its input
Delayed pulseA short pulse, some time after an event.Its input
Delayed on/offSeparate delays for switching on and off — the staircase timer.Its input
Time condition"Is it after sunset?" as a true/false you can gate with.The clock, every minute
ScheduleSomething to happen at a set time or on set days.The clock, every minute

2.Delay

Passes whatever arrives through to the output, later.

Detail
InputOne input, any type of value.
OutputThe same value that arrived — not a true/false. A temperature in, the same temperature out.
ParameterSeconds — how long to wait. Default 5.
  • It reacts to every value, true or false. Unlike the other timing blocks it does not ignore a falsy input.
  • A new value while it is already waiting restarts the countdown and the older value is forgotten — only the latest one is ever delivered.
This makes Delay a de-bounce as well as a delay: feed a chattering sensor through it and only the value that stayed put for the whole delay comes out.

3.Timer

Runs for a set duration when triggered.

Detail
InputOne input. A falsy value is ignored completely — it does not stop a running timer.
OutputTrue / false.
ParametersDuration (s), default 10 · Output when done, default true.

The two shapes

  • Output when done = true. Nothing happens at the trigger; after the duration the output goes true once. Use it as "in ten minutes, do this".
  • Output when done = false. The output goes true immediately and false after the duration. Use it as "be on for ten minutes".
Only a truthy input does anything. Sending false does not cancel a running timer — there is no stop input. A new truthy trigger restarts the full duration from zero.

4.Delayed pulse

Waits, then emits a short pulse.

Detail
InputOne input. A falsy value is ignored.
OutputGoes true for the pulse length, then false.
ParametersDelay (s) before the pulse, default 2 · Pulse (s) how long it stays true, default 0.5 (minimum 0.1).
Re-triggering while the pulse is high does not produce a second pulse. The pending end is cancelled, the delay starts again from the beginning, and the output simply stays true for longer. If you need one pulse per event regardless, put a Delay in front instead.

5.Delayed on/off

Separate delays for switching on and for switching off. This is the staircase timer, and the most used timing block.

PinDirectionDescription
TrInputTrigger. A rising edge starts the on-delay; a falling edge starts the off-delay.
OffInputDominating. While high the output is forced false and every pending delay is cancelled.
OOutputThe resulting on/off state.
ParameterDescriptionDefault
Don (s)How long after Tr rises before the output goes on.1
Doff (s)How long after Tr falls before the output goes off.1
RemKeeps the output and any pending delay across a restart.0

Staircase behaviour

Set Don to 0 and Doff to the time the light should stay on. Each press makes Tr rise and fall; the fall starts the off-delay, and a new press before it expires cancels it and starts the cycle again. That is why repeated presses extend the light instead of switching it off.

Once the on-delay is running it will finish even if Tr drops again — a brief touch still switches the light on after Don. Only Off cancels it. (The off-delay is checked against Off when it fires, so an Off raised during the wait does suppress the switch-on.)

6.Time condition

True or false depending on the time of day — either a clock time or a sun event.

ParameterOptionsDefault
Operatorbefore · after · at · before-or-equal · after-or-equalafter
ReferenceA clock time, or a sun eventtime
TimeThe clock time, as HH:mm18:00
Sun eventsunrise · sunset · dawn · dusk · noonsunset
Offset (min)Minutes added to the sun event; negative for before.0

It works two ways at once

  • On its own, it re-checks the clock every minute and emits only when the answer changes — so a standalone "after sunset" node fires once, at sunset.
  • As a gate, when something arrives on its input it answers immediately with true or false. That is how you put it in front of a Logic AND.
  • On deploy it works out the current answer without firing anything, so re-deploying a flow at nine in the evening does not switch the garden lights on.

The sun events

  • Sunrise / sunset — the sun on the horizon. Dawn / dusk — civil twilight, roughly half an hour either side, which is usually what "it is getting dark" really means for lighting.
  • Noon — the midpoint between that day's sunrise and sunset.
Sun events need the site location, set from Sun location in the Flows toolbar. If it was never set the server falls back to the weather location, and failing that to a built-in default — it will not warn you, it will simply compute sunset for the wrong place. Set it on every project.
After and before are strict, and at matches one single minute. For "from 18:00" inclusive, use after-or-equal.

7.Schedule

A source block with no input: it fires on the calendar.

ModeWhat you setWhat it emits
DailyOne time of day.True only, at that minute, every day. There is no matching false.
WeeklyA start and end time per weekday.True at each start, false at each end.
CustomSpecific calendar dates with time windows.True at each start, false at each end.
Daily mode is a pulse, not a state: it sends true and never sends false. If you need something to switch on and off again, use weekly day-windows, or pair a daily schedule with a Timer or a second schedule for the off time.
Schedules are matched to the exact minute. If the server is restarting or the flow is being deployed at precisely that minute, that day's firing is missed — there is no catch-up. Avoid scheduling anything critical for the same minute as a nightly maintenance task.

8.What survives a restart

Worth knowing before you rely on a long delay.

EventWhat happens to a running delay or timer
Server restartPending timers are saved with their due time and re-armed on boot with whatever time is left.
Server was off past the due timeThe timer fires almost immediately on boot, carrying the value it was holding. There is no "too late, skip it" rule.
Re-deploying the flowPending delays are dropped — a half-finished delay is gone. A Delayed on/off with Rem on keeps its output (the light stays as it was); with Rem off it starts from off.
Delayed on/off with Rem offStarts fresh with the output off, regardless of what it was doing.
The combination to watch is a long delay and a server that was off: an hour delay that came due overnight fires seconds after the server comes back, which can look like a ghost in the system. Where that would be wrong, gate the action with a Time condition so it can only act at a sensible hour.
Back to all function blocks, or see them used in the examples library.