Introduction
The Wait for device online action pauses an automation run until the device is connected to Level. If the device is already online, the run continues right away.
Some actions, such as Create alert, Resolve alert, Send Email, and Set Custom Field, run in Level rather than on the device, so they keep running while the device is offline. Add Wait for device online when a later step should only happen after the device has reconnected.
Wait for Device Online Action
From the automation pipeline in edit mode, click + and select Wait for device online from the Flow category. The action has no settings of its own.
How it works
If the device is online when the run reaches this action, the action succeeds immediately and the run moves to the next step.
If the device is offline, the run waits at this step in the When next online state until the device reconnects, then continues. There is no time limit.
Canceling the run, or removing the device from the automation's queue, ends the wait. See What happens if a device matches a trigger, but is offline?
Example: alert while offline, resolve when back
Create alert raises an alert for the offline device.
Wait for device online holds the run until the device reconnects.
Resolve alert, with Alert source set to the Create alert action from step 1, clears that alert.
💡 TIP: Without the wait, Resolve alert would run straight after Create alert while the device is still offline, because neither action needs the device to be connected.
Conditions
Conditions control whether this action runs. See Action Conditions.
Additional Options
Additional options such as naming the action and failure handling are covered in Actions Overview.
FAQ
How long will it wait? Until the device comes back online or the run is canceled. There is no timeout setting.
Do I need this before script or install actions? No. Actions that run on the device already pause until it's back online. This action is for runs where the next steps don't need the device but should still wait for it.
