Trigger nodes

Trigger nodes start a flow. They have no inputs: when their event happens they fire their Triggered pin, and many also output details about the event. A flow only listens for triggers while it is running. See how nodes work for how to read the diagrams below.

Timer

Fires on a fixed interval.

TimerTriggeredTick Count
Outputs
TriggeredFlow
Tick CountNumber
How many times the timer has fired, starting at 1. Resets when the flow restarts.
Properties
Interval (seconds)
Time between triggers, 0.1 to 86400. Default 60.
Start Immediately
Also fire once as soon as the flow starts. Default off.

Startup

Fires once when the flow starts.

StartupTriggered
Outputs
TriggeredFlow
Properties
Delay (seconds)
Wait this long after the flow starts before firing, 0 to 300. Default 0.

Manual Trigger

Fires when you click Fire the trigger once (the lightning button) in the flow editor toolbar while the flow is running.

Manual TriggerTriggered
Outputs
TriggeredFlow
Properties
Button Label
Default Trigger. Not currently shown in the editor.

If a flow has more than one Manual Trigger, the toolbar button fires the first one.

Keybind Pressed

Fires when the recorded key combination is pressed, even while another app is focused.

Keybind PressedTriggeredKeybindKeysPrimary KeyCtrlAltShiftWin
Outputs
TriggeredFlow
KeybindString
The combination as text, for example Ctrl + Shift + F9.
KeysArray
Each key in the combination.
Primary KeyString
The last key that is not a modifier, for example F9.
CtrlBoolean
AltBoolean
ShiftBoolean
WinBoolean
Properties
Keybind
Click the recorder, then hold every key in the combination together. Default F9.

Ctrl, Alt, Shift, and Win are true when that modifier is part of the recorded combination. If the combination cannot be registered, for example because another app already uses it, the trigger reports an error instead of listening.

Shocker Activate

Fires when a PiShock device plugged into this computer receives a command.

Shocker ActivateTriggeredDevice IDShocker IDCommandIntensityDuration (ms)User IDPort
Outputs
TriggeredFlow
Device IDNumber
Shocker IDNumber
CommandString
v, s, b, or e for vibrate, shock, beep, or end.
IntensityNumber
Duration (ms)Number
User IDNumber
PortString
The serial port the device is connected to.
Properties
Device ID (0 = any)
Only fire for this device. Default 0.
Shocker ID (0 = any)
Only fire for this shocker. Default 0.
Command Type
All Commands, Vibrate, Shock, Beep, or End/Stop. Default All Commands.

WebSocket Command Received

Fires when a command for one of your own devices arrives through the PiShock WebSocket, including commands sent through your share codes.

WebSocket Command ReceivedTriggeredDevice IDShocker IDCommandIntensityDuration (ms)User IDUser TypeChannelIs Shared
Outputs
TriggeredFlow
Device IDNumber
Shocker IDNumber
CommandString
v, s, b, or e for vibrate, shock, beep, or end.
IntensityNumber
Duration (ms)Number
User IDNumber
The user who sent the command, or 0 if unknown.
User TypeString
ChannelString
The WebSocket channel the command arrived on.
Is SharedBoolean
True when the command came through a share code.
Properties
Device ID (0 = any)
Only fire for this device. Default 0.
Shocker ID (0 = any)
Only fire for this shocker. Default 0.
Command Type
All Commands, Vibrate, Shock, Beep, or End/Stop. Default All Commands.

Contributors

Thank you to everyone who has helped improve this documentation.