Client online / offline
Starts a run when a client goes offline or comes back, and stays that way for a while. The wait keeps a board that reboots or roams between access points from paging you.
trigger:clientPresenceHow it looks
Settings
| Setting | Required | What it does |
|---|---|---|
| This clientclientRef | Yes | The client to watch. |
| Goesstate | No | Offline (the default) or Online. |
| For at leastforSeconds | No | How long it must stay that way before a run starts. 1 minute by default, at most 24 hours. |
| If it fires while a run is still goingconcurrencyPolicy | No | Queue by default. See Runs that overlap below. |
| Correlation keycorrelationKey | No | Which runs count as the same for the setting above. Left empty, the client and state. Set it to share one line with another trigger. |
Ports
| Port | The run leaves by it when |
|---|---|
default | The client has stayed in that state for the time you set. |
What it adds to the run
Later nodes can read these, in a condition or as {{name}} in a text field.
| Value | Holds |
|---|---|
trigger | Which client changed, and to what. |
triggeredAt | When the trigger fired. |
Example
Tell me when the pump controller drops off
- This client pump-01, goes Offline, for at least 5 minutes.
- Connect an Email node: "pump-01 has been offline for 5 minutes".
- Add a second workflow with Goes Online to hear when it's back.
Runs that overlap
What happens when the trigger fires again while a run with the same correlation key is still going.
| Setting | What happens |
|---|---|
| Queuedefault | The new event waits. When the run finishes, the oldest waiting event starts the next one. Events wait up to 24 hours. |
| Allow parallel | Another run starts alongside. |
| Drop if running | The new event is dropped. |
| Cancel existing | The running one is cancelled and a new one starts. |
Problems you might see
| Code | Means |
|---|---|
INVALID_CLIENT_REF | The client isn't one in this workspace. |
INVALID_PRESENCE_DURATION | For at least is negative or over 24 hours. |
Problems found when you publish stop the publish and point at the node. Problems while a run is going fail the node, and its On failure setting decides what happens next. See the error codes for the API's own.
See also
Starts when a client sends a message of a type you pick, optionally only when its values match, or have matched for a while.
Outdefaulttrigger:clientSends an email through an SMTP integration, with values from the run in the subject and body.
Outdefaultaction:emailPushes a notification to your phone through an ntfy topic, with priority and tags.
Outdefaultaction:ntfy