Skip to main content
Version: 8.3

Usage

Alarm Pipeline

Add a Notification Block with a Telegram profile in your Alarm Pipeline.

Notification Block Parameters

ParameterTypeDefaultDescription
MessageExpressionSee belowContent of the message to send for a single alarm
Throttled MessageExpressionSee belowMessage when multiple alarm events are batched
Test ModeBooleanfalseLog messages instead of sending (for debugging)
AcknowledgeBooleanfalseAppend an inline button for alarm acknowledgment (single-alarm notifications only)

Message Templates

Expression Syntax

The Message and Throttled Message fields are expression-source properties. Expressions are resolved by Ignition's alarm property resolver against the alarm event(s), so the message can reference alarm properties as {propertyName}.

Default Message:

At {eventTime|hh:mm:ss}, alarm "{name}" at "{displayPath}" transitioned to {eventState}.

Default Throttled Message:

{alarmEvents.Count} alarm events have occurred.

Available Variables

The variables below appear in the default templates and are commonly available. The module does not define its own variable set — expression resolution is delegated to Ignition's alarm property resolver, so any alarm property the platform exposes can be referenced (for example {priority} or {label} if the platform provides them). These are not guarantees of the module.

VariableDescriptionExample
{name}Alarm nameHigh Temperature
{displayPath}Alarm source pathFurnace/Zone1/TempSensor
{eventTime|format}Event timestamp with format{eventTime|hh:mm:ss}
{eventState}Alarm stateActive, Cleared, Acknowledged
{alarmEvents.Count}Number of batched events (throttled template)5

HTML Formatting

Messages are sent with parse_mode=HTML, so Telegram renders a set of HTML tags. The supported tag set is defined by Telegram (not by this module):

<b>ALARM:</b> {name}
<i>Path:</i> {displayPath}
<code>State: {eventState}</code>

Telegram's supported tags: <b>, <i>, <u>, <s>, <code>, <pre>, <a href="...">

Message Examples

Simple notification:

ALARM: {name} is {eventState} at {eventTime|HH:mm}

Formatted notification:

<b>[{priority}]</b> {name}
<i>{displayPath}</i>
State: <code>{eventState}</code>
Time: {eventTime|yyyy-MM-dd HH:mm:ss}

Interactive Acknowledgment

When Acknowledge is enabled, a single-button inline keyboard labelled ✓ Acknowledge Alarm is appended to notifications for a single alarm.

How It Works

  1. The user receives a Telegram message with a ✓ Acknowledge Alarm button
  2. The user taps the button
  3. The module acknowledges the alarm in Ignition, attributed to the Ignition user who received the notification
  4. A popup confirms the action: ✓ Alarm acknowledged
  5. The button is relabelled ✓ Acknowledged by <telegram-username>

If the button is tapped again after acknowledgment, the popup replies Alarm was already acknowledged.

Acknowledgment Details

  • Only single-alarm (non-throttled) notifications show the acknowledgment button
  • The acknowledging Ignition user is the one who received the notification (recorded as the alarm's ack user)
  • Acknowledgment uses long-polling of Telegram's getUpdates endpoint — no webhook or inbound connectivity is required
  • The poller is created lazily on the first acknowledgment-enabled, non-throttled send, with one poller per distinct bot token, running as a daemon thread
  • Pending acknowledgments are tracked in memory and expire after 24 hours
Group chats

Acknowledgment buttons are delivered as callback_query events and are supported in group chats as well as private chats. Add the bot to the group and use the group's chat id as the contact value — group chat ids are negative.


Throttled Notifications

When multiple alarms trigger in quick succession:

  • Alarms are consolidated into a single message
  • The Throttled Message template is used
  • Acknowledgment buttons are not shown for throttled messages
  • Use {alarmEvents.Count} to show the number of events

Test Mode

Enable Test Mode to validate your configuration without sending actual messages.

Behavior in test mode:

  • Messages are logged to the gateway console
  • No Telegram API calls are made
  • Useful for debugging message templates

Log output example:

THIS PROFILE IS RUNNING IN TEST MODE. The following WOULD have been sent:
Message: ALARM: High Temperature is Active at 14:32:15
With Acknowledgment Button: true

Audit Logging

When an audit profile is configured on the profile, one audit record is written per alarm event per notification.

Logged information:

  • Action: Telegram Message
  • Actor: the Ignition user receiving the notification
  • Actor host: the notification profile name
  • Target: the alarm event path (alarm source extended with the event id)
  • Value: SUCCESS or FAILURE
  • Timestamp and a status code

The Telegram chat id is not stored in the audit record.


Troubleshooting

IssuePossible CauseSolution
Messages not receivedInvalid Chat IDVerify Chat ID in user contact info
Messages not receivedBot not startedUser must send /start to the bot first
Messages not receivedTest mode enabledDisable Test Mode in notification block
Acknowledgment not workingButton expiredButtons expire after 24 hours
Acknowledgment not workingPoller stoppedCheck gateway logs for errors
HTML not renderingInvalid tagsUse only supported HTML tags

Best Practices

  1. Test first - Use Test Mode to validate templates before going live
  2. Start the bot - Ensure all users have started a conversation with the bot
  3. Use groups wisely - For team notifications, create a dedicated Telegram group
  4. Enable auditing - Configure an audit profile for compliance and troubleshooting
  5. Keep messages concise - Telegram has a 4096 character limit per message
  6. Use HTML sparingly - Complex formatting may not render on all clients