Skip to main content
Share:
Link is copied

Working with Pebble Language in evalink talos

Pebble Language Basics

Pebble is a templating language originally developed by Mitchell Borke. It is inspired by Twig (PHP), Jinja2 (Python), and Liquid (Ruby).

It’s written in Java, lightweight, fast, and designed for server-side rendering of dynamic content such as emails, messages, notifications, or configuration templates.

Pebble lets you insert logic into static text, for example, a message template that dynamically pulls in user, DeviceID, or event data from evalink talos.

The system renders the template at runtime, replacing placeholders with actual values from the event or workflow context.

In evalink talos Pebble expressions can be used in:

  • Webhook payloads

  • Notification bodies

  • Check Condition steps

  • Advanced settings of workflow steps

Pebble processes templates that combine:

  • Static text (HTML, plain text, JSON, etc.)

  • Dynamic expressions enclosed in {{ ... }} — for inserting variables.

  • Logic statements enclosed in {% ... %} — for loops, conditions, and includes.

The result is a fully rendered string that can be sent, displayed, or stored in evalink talos.

You can use Pebble for the following scenarios in evalink talos:

  1. Customize Notifications and Messages

Allow administrators to define templates for alerts, emails, or system messages that include variables from the system context (e.g., device names, event timestamps, user data).

Example in evalink talos:

Alarm triggered at {{ device.name }} on {{ alarm.timestamp | date("yyyy-MM-dd HH:mm") }}

  1. Generate Dynamic Configurations

In automation workflows or integration scripts, Pebble expressions can dynamically fill fields or API payloads with contextual values:

  "device_id": "{{ device.id }}",
"status": "{{ alarm.alarmStatus }}"
}
  1. Conditional Logic in Templates

Pebble supports control structures — so templates can adapt based on logic:

  🚨 Critical alert: {{ alarmCode }}
{% else %}
ℹ️ Notification: {{ alarmCode }}
{% endif %}
  1. Reusable and Modular Templates

Pebble in evalink talos supports includes, letting users reuse parts of templates:

{% include 'footer.peb' %}

Pebble language has a set list of elements which you can use. For more details, see page

Pebble Templates — Basic Usage

For user convenience, evalink talos extends the standard Pebble templating language with several custom functions and operators.

The table below lists common and custom Pebble filters used in evalink talos.

FilterDescriptionExample
jsonSerializes an object to JSON.{{ alarm | json }}
dateFormats timestamps into a readable date/time string.{{ alarm.timestamp | date("dd.MM.yyyy HH:mm", timeZone="Europe/Zurich") }}
toTimeCreates a timestamp for a specific time of day, with optional day offset.{{ now | toTime("13:00", 1, "UTC") }}
bytesConverts a number into a byte-size string.{{ 2048 | bytes }}
toStringConverts a value to a string.{{ alarm.alarmCode | toString }}
toIntConverts a value to an integer.{{ "42" | toInt }}
toLongConverts a value to a long.{{ "1694085805" | toLong }}
toFloatConverts a value to a float.{{ "3.14" | toFloat }}
hexEncodes binary data as a hex string.{{ files()[0].data | hex }}
decodeHexDecodes a hex string to binary.{{ hexString | decodeHex }}
base64Encodes binary data as Base64 (primarily used for file content).{{ files()[0].data | base64 }}
decodeBase64Decodes a Base64 string.{{ payload | decodeBase64 }}
getSafe getter for maps or JSON-like objects.{{ device.attributes | get("color") }}
distinctRemoves duplicate items from a list.{{ peopleList | distinct }}
shuffleRandomizes the order of list items.{{ responders | shuffle }}
extractTextExtracts text using regex groups.{{ text | extractText('Zone ([0-9]+)', 1) }}
urlEncodeURL-encodes a value for safe use in URLs (query parameters or paths). Must be used with the pipe syntax.{{ address | urlEncode }}

The table below lists Pebble functions used in evalink talos:

FunctionDescriptionExample
toJson()Converts an object into a JSON string.{{ toJson(alarm) }}
fromJson()Parses a JSON string into a Pebble object.{{ fromJson(alarm.payload).SomeField }}
dump()Alias of toJson() — outputs the object as JSON.{{ dump(device) }}
random()Returns a random number (integer).{{ random(100,200) }}
encodeURL(value)Returns a URL-encoded version of characters like +, ?, &, etc.{{ encodeURL(step.zone_name) }}
defaultSpecifies a fallback value if the input is empty.{{ device.customerCompany | default("No Company") }}

Pebble templates in evalink talos have access to a rich dictionary of built-in variables, functions, and placeholders. These values come from the alarm event, the device, the workflow context, or system metadata.

You can reference them directly inside templates using the standard Pebble syntax:

{{ variableName }}
{{ object.property }}
{{ functionName() }}

The tables below list all available placeholders grouped by category, with descriptions and usage examples.

Alarm Hints

NameDescriptionExample Usage
alarmMessage()Preformatted alarm summary text.{{ alarmMessage() }}
alarmText()Additional textual description of the alarm.{{ alarmText() }}
addressFull site address.{{ address }}
alarmCodeAlarm code (e.g., BA, FI).{{ alarmCode }}
alarmZoneZone where the alarm occurred.{{ alarmZone }}
alarmPartitionPartition number/name.{{ alarmPartition }}

Alarm Details

PlaceholderDescriptionExample
alarm.IdUnique long ID of the alarm.{{ alarm.alarmId }}
alarm.shortIdShort-form alarm ID.{{ alarm.shortId }}
alarm.timestampTimestamp (Unix) in milliseconds.{{ alarm.timestamp }}
alarm.timestamp | dateDefault formatted date.{{ alarm.timestamp | date }}
alarm.timestamp | date(...)Custom formatted date.{{ alarm.timestamp | date("dd.MM.yyyy HH:mm", timeZone="Europe/Zurich") }}
alarm.dateDate object.{{ alarm.date }}
alarm.testMessageWhether alarm is test-only.{{ alarm.testMessage }}
alarm.alarmStoredDateWhen alarm was stored (in human-readable format).{{ alarm.alarmStoredDate }}
alarm.alarmStoredTimestampStored timestamp.{{ alarm.alarmStoredTimestamp }}
alarm.alarmValueAlarm value (varies by type).{{ alarm.alarmValue }}
alarm.alarmCodeAlarm code.{{ alarm.alarmCode }}
alarm.alarmTypeAlarm type (e.g., BURGLARY).{{ alarm.alarmType }}
alarm.alarmMsgRaw alarm message text.{{ alarm.alarmMsg }}
alarm.alarmZoneZone number.{{ alarm.alarmZone }}
alarm.alarmZoneNameHuman-readable zone name.{{ alarm.alarmZoneName }}
alarm.partitionPartition number.{{ alarm.partition }}
alarm.partitionNamePartition name.{{ alarm.partitionName }}
alarm.userUser ID or name.{{ alarm.user }}
alarm.userNameUsername text.{{ alarm.userName }}
alarm.technicalWhether alarm is technical.{{ alarm.technical }}
alarm.severitySeverity value.{{ alarm.severity }}
alarm.deviceIdDevice ID that produced the alarm.{{ alarm.deviceId }}
alarm.alarmStatusCurrent status (e.g., INITIAL).{{ alarm.alarmStatus }}
alarm.deviceGroupIdGroup ID of the site/device.{{ alarm.deviceGroupId }}
alarm.payloadRaw payload (JSON text).{{ alarm.payload }}
alarm.headers['myHeader']Specific alarm header value.{{ alarm.headers['myHeader'] }}
alarm.eventNameEvent name.{{ alarm.eventName }}

Device Details

PlaceholderDescriptionExample
device.idA unique ID of a device (Site in evalink talos).{{ device.id }}
device.companyIdCompany ID.{{ device.companyId }}
device.evalinkDeviceIdDevice (evalink talos Site) Name.{{ device.evalinkDeviceId }}
device.customerCompanyCustomer company name.{{ device.customerCompany }}
device.customerFirstNameCustomer first name.{{ device.customerFirstName }}
device.customerLastNameCustomer last name.{{ device.customerLastName }}
device.customerPhoneCustomer phone.{{ device.customerPhone }}
device.customerEmailCustomer email.{{ device.customerEmail }}
device.customerZipZIP code.{{ device.customerZip }}
device.customerCityCustomer city.{{ device.customerCity }}
device.customerStreetStreet address.{{ device.customerStreet }}
device.customerStateState.{{ device.customerState }}
device.customerCountryCountry.{{ device.customerCountry }}
device.installerCompanyInstaller company.{{ device.installerCompany }}
device.installerFirstNameInstaller first name.{{ device.installerFirstName }}
device.installerLastNameInstaller last name.{{ device.installerLastName }}
device.installerEmailInstaller email.{{ device.installerEmail }}
device.installerPhoneInstaller phone.{{ device.installerPhone }}
device.attributes[...]Value of a Custom field .{{ device.attributes['attribute'] }}
device.tags contains 'X'Check whether a tag exists.{{ device.tags contains 'Test' }}
device.activeWhether device is active.{{ device.active }}
device.testModeDevice is in test mode.{{ device.testMode }}
device.timeZoneDevice time zone.{{ device.timeZone }}

Alarm, System, and Workflow Context

PlaceholderDescriptionExample
workflowIdID of the running workflow.{{ workflowId }}
automatedWhether the workflow is automated.{{ automated }}
nowCurrent timestamp.{{ now }}
alarmName('en')Localized alarm name.{{ alarmName('en') }}
alarmDescription('de')Localized alarm description.{{ alarmDescription('de') }}
alarmShareLink()Shareable link to alarm details. You can include the link in an SMS send upon alarm creation and give the recipient access to alarm details.{{ alarmShareLink() }}

Common comparisons and operators

When using values from the Pebble Dictionary (for example alarm.*, device.*, or step results), you can add logic with standard Pebble operators. These operators are typically used inside {% if %} blocks.

OperatorMeaningExample
==equals{% if alarm.alarmCode == 'E205' %}...{% endif %}
!=not equals{% if alarm.alarmType != 'BURGLARY' %}...{% endif %}
>greater than{% if jump.executionCount > 3 %}Call the police!{% endif %}
<less than{% if alarm.severity < 3 %}Low severity {% endif %}
>=greater than or equal{% if alarm.severity >= 6 %}High severity{% endif %}
<=less than or equal{% if alarm.severity <= 3 %}Low severity{% endif %}
is emptyvalue is missing / blank{% if device.customerCompany is empty %}{{ device.evalinkDeviceId }}{% endif %}
is not emptyvalue is present{% if alarm.headers['myHeader'] is not empty %}{{ alarm.headers['myHeader'] }}{% endif %}
containslist contains a value{% if device.tags contains 'Test' %}Test device{% endif %}
andlogical AND{% if device.active and (device.testMode == false) %}...{% endif %}
orlogical OR{% if alarm.alarmType == 'PANIC' or alarm.alarmType == 'BURGLARY' %}...{% endif %}
notnegation{% if not (device.tags contains 'Test') %}...{% endif %}

Was this page helpful?