Using Delays & Smart Delays
Overview
Commands in a Flow sometimes need time before moving on to the next step. That’s the exact purpose of the Delay step. This article covers Delays, including the important logic for how the optional setting “Smart Delay” works.
Key Takeaways
- Smart Delays execute only when one of the input switching devices in a Flow is not already powered on.
- Never remove the Smart Delay step from an auto-generated Flow.
- Altering the Smart Delay duration in an auto-generated Flow can result in missed commands.
Need-to-Know Info
A “Delay” is a type of Step in a Flow that makes AVA OS wait before executing any next steps. Delays can be added to either the Launch or the Power Off part of a Flow.
You can also use Delay steps in your own custom-built Flows. When you do, it’s important to understand when to enable the “Smart” Delay feature.
Auto-generated Flows Need a Delay
Devices like AV receivers, projectors, and TVs typically require a delay after they receive a power on command before any subsequent input switching commands. The amount of time varies depending on each device.
The Wiring process automatically inserts a Delay when you first launch the Flow for any Source. AVA OS sets the duration of this Delay according to whichever input-switching device has the longest startup startup time. Do not make changes to the length of this Delay without thorough testing. A command sent to a device before it is ready won’t get applied, and the flow will not work as needed.
Smart Delays
The Smart Delay option is “smart” because it takes effect only when necessary. This ensures that a Flow launches immediately when its switching devices are already powered on.
Here is how it works. AVA OS tracks the On/Off state of every device in a project. When all the switching devices in a Flow’s Launch are already known to be powered on, the “Smart Delay” setting tells AVA OS that it can skip the Delay step. But if any of the the switching devices in the Flow’s Launch are powered off, AVA OS applies the Delay to ensure that all devices will be ready for subsequent commands.
In a generated Flow, the Delay step has “Smart Delay” enabled by default.
How Wiring Sets the Delay Length
Here is an examples with some common devices:
- Apple TV (IP driver, no delay required)
- Anthem AVR (IP driver, requires 6-second Delay)
- Sony TV (IP driver, requires 3-second Delay)
During Wiring, AVA OS sets the Delay in the Flow’s Launch to the longest delay required by any of the input-switching devices. In this case, 6 seconds for the Anthem AVR.
When to Be Smart
Using the previous example, if all devices are off and you start the Flow for Apple TV, clearly the Smart Delay of 6 seconds must be applied before any switching commands. But what happens when some devices are already on and you launch the Flow for Apple TV? This can happen if you have other sources besides the Apple TV.
Cable Box
If the Flow for a cable box attached to the Anthem AVR were active, the system state would be:
- Cable Box - on
- Apple TV - off
- Anthem AVR - on
- Sony TV - on
Starting the Flow for Apple TV would result in no delay. Since the two switching devices are is already on, the Smart Delay option applies and AVA OS skips the Delay.
Turntable
If the Flow for a turntable attached to the Anthem AVR were active, the system state would be:
- Turntable - on
- Apple TV - off
- Anthem AVR - on
- Sony TV - off
Starting the Flow for Apple TV would result in a 6 second delay. Even though the AVR is already on and the Sony TV only needs 3 seconds startup time, the Smart Delay is for 6 seconds.