Skip to content

Trigger: Button (button_trigger)

This trigger starts an automation when a physical button connected to the system is pressed or released. It allows monitoring one or several buttons at the same time and distinguishing between a short press and a sustained press using a minimum duration time. It is ideal for panic buttons, confirmation buttons, and manual controls in facilities.

When to use it?

  • When you have a panic button or emergency button and want pressing it to trigger an alarm, notify the control center, or activate a siren.
  • When you need a confirmation button for a guard or operator to manually confirm they completed a round or checked a checkpoint.
  • When you want to implement a remote opening action for a barrier or door using a physical button.
  • When you need to detect that someone held a button for a specific amount of time to distinguish it from an accidental press.
  • When you want to log every time an operator activates or deactivates a physical control on the floor.

If you need to react to state changes of an object in general (not a physical button), use Trigger: State Change.
If you need a scheduled or system event trigger, use Trigger: Schedule or Trigger: Event.


How to configure it

Step 0) Open the parameters

  • In the automations canvas, double-click the Button node.
  • A modal opens with two tabs: Form and JSON Editor. Stay on Form.

Step 1) Select the buttons to monitor

The Select objects field shows an object tree filtered by type button. Select one or more physical buttons for this trigger to monitor.

  • Expand the tree to find the button by name or domain.
  • Click on the object to select it. You can select more than one.
  • Selected objects appear as tags below the tree. You can remove them by clicking the "X" on each tag.

Examples: - Panic-Button-Reception - Confirm-Round-Button-Sector-A - Gate-Open-Button-North

This field is required. The node will not work without at least one button selected.


Step 2) Choose the state that fires the trigger

The Pressed field determines at which moment of the button cycle the automation is triggered.

State Behavior Typical use case
Pressed (enabled, default) Fires when the button is pressed Emergency button, access button
Released (disabled) Fires when the button is released Confirms the press ended, press duration control
  • Click the toggle to alternate between Pressed and Released.
  • The default value is Pressed.

Step 3) (Optional) Configure the minimum press duration

The For field lets you define how long the button must remain in the configured state before the automation fires. The format is HH:MM:SS.

Value Behavior
Empty or 00:00:00 Fires immediately upon detecting the state (pressed or released)
00:00:03 Fires only if the button was in that state for 3 seconds without changing
00:00:10 Fires only if the button was in that state for 10 seconds
00:01:00 Fires only if the button was in that state for 1 minute

Usage examples: - Empty: emergency button that responds immediately on the first touch. - 00:00:05: panic button that requires 5 sustained seconds to avoid false alarms. - 00:00:03: round confirmation that requires holding the button for 3 seconds.

The field accepts only the format HH:MM:SS with valid values: hours 00-23, minutes 00-59, seconds 00-59.


Best practices

  • Use "For" to avoid false alarms: if the button can be accidentally pressed, a minimum time of 3 to 5 seconds reduces unwanted triggers.
  • "Released" mode to confirm end of press: if the flow should run after the operator finished pressing (not while pressing), use Released.
  • Select multiple buttons only if they should have the same behavior: if two buttons need to fire different flows, create a separate Button node for each.
  • Document which button does what: if the system has many push buttons, use descriptive names in the objects so the selection tree is clear.
  • Combine with time conditions: if the push button should only work during business hours, add a Condition: Date/Time node afterwards to filter outside hours.

Troubleshooting (common issues)

  • The trigger doesn't fire even though the button is pressed
  • Verify that the button object is correctly registered in the system and sending events.
  • Confirm that the object selected in the tree is the correct one (same name as the physical device).
  • Check that the chosen state (Pressed or Released) matches the event you expect.
  • If "For" is configured, verify the button is being held long enough.

  • The trigger fires multiple times with a single press

  • This may be due to physical button bounce or the device sending multiple events. Configure a value in the For field (e.g. 00:00:01) to filter very short presses.

  • I can't find the button in the object tree

  • Verify the object exists in the system and its type is button.
  • Expand all tree nodes (by domain or group).
  • Confirm the user has permissions to view that object type.

  • The "For" field shows a validation error

  • The required format is exactly HH:MM:SS with two digits in each part: 00:00:05, not 0:0:5.
  • Valid values are: hours 00-23, minutes 00-59, seconds 00-59.

  • I removed a button from the selector but it still appears

  • Click the "X" on the button's tag to remove it correctly. If the tree still shows it as selected, refresh the page and reopen the node.

Advanced configuration (JSON Editor) — expert users only

The JSON Editor tab lets you view and directly edit the internal structure of the node.

input structure

{
  "ruleSet": {
    "objects_id": ["button-uuid"],
    "pressed": true,
    "for": "00:00:00"
  },
  "config": {}
}

Field table

Field Type Required Default Description
ruleSet.objects_id string[] Yes [] List of button object IDs to monitor
ruleSet.pressed boolean No true true = fire on press; false = fire on release
ruleSet.for string (HH:MM:SS) No "" Minimum duration in the required state before firing. Empty = immediate
config {} No {} Always empty (reserved for future use)

JSON examples by use case

Emergency button — immediate trigger on press

{
  "ruleSet": {
    "objects_id": ["panic-button-reception-uuid"],
    "pressed": true,
    "for": ""
  },
  "config": {}
}

Confirmation button — requires 5 sustained seconds

{
  "ruleSet": {
    "objects_id": ["confirm-round-sector-a-uuid"],
    "pressed": true,
    "for": "00:00:05"
  },
  "config": {}
}

Fire on button release — no minimum time

{
  "ruleSet": {
    "objects_id": ["gate-open-button-north-uuid"],
    "pressed": false,
    "for": ""
  },
  "config": {}
}

Monitor multiple emergency buttons

{
  "ruleSet": {
    "objects_id": [
      "panic-button-reception-uuid",
      "panic-button-server-room-uuid",
      "panic-button-warehouse-uuid"
    ],
    "pressed": true,
    "for": ""
  },
  "config": {}
}

Quick guides (recipes)

Recipe A — "Panic button at reception → notify security center"

  • Buttons: Panic-Button-Reception
  • Pressed: Enabled (on press)
  • For: empty (immediate response)
  • Action: Send Telegram to security group + activate siren

Recipe B — "Round button with sustained confirmation"

  • Buttons: Round-Point-Button-01, Round-Point-Button-02
  • Pressed: Enabled (on press)
  • For: 00:00:03 (hold 3 seconds)
  • Action: Log round entry with timestamp and current guard

Recipe C — "Gate open button — fires on release"

  • Buttons: Vehicle-Gate-Button
  • Pressed: Disabled (on release)
  • For: empty
  • Action: Send HTTP action to open barrier / log access event

Recipe D — "Silent alert button in server room"

  • Buttons: Alert-Button-Server-Room
  • Pressed: Enabled
  • For: 00:00:02 (2 seconds to avoid false alarms)
  • Action: Notify IT team + shift manager via Telegram

Recipe E — "Loading zone enable button — requires long press"

  • Buttons: Loading-Zone-Enable-Button
  • Pressed: Enabled
  • For: 00:00:10 (10 sustained seconds)
  • Action: Change loading-zone object state to enabled + notification

Recipe F — "Multi-control: any floor 2 emergency button"

  • Buttons: all floor 2 buttons (Panic-F2-Hallway, Panic-F2-Office, Panic-F2-Bathroom)
  • Pressed: Enabled
  • For: empty
  • Action: Activate floor 2 emergency protocol + notify response team

Internal references (to locate it in the editor)

  • Node key: button_trigger
  • Class: trigger
  • Required fields: objects_id (at least one object selected)
  • Optional fields: pressed (default: true), for (default: empty = immediate)
  • Supported object types: objects of type button
  • "For" field format: HH:MM:SS (e.g. 00:00:05 for 5 seconds)