![](https://img.zohostatic.com/zde/static/images/info.png)
In this article we will describe how to interpret the serial data from a Tyco MX4000 panel in evalink talos and how to extract the useful information for further actions.
The panel we have is a Tyco MX4000 which provides serial data to evalink talos. The particularities here are:
- the panel is sending an initial message with an ID and then the next three messages include more alarm details
- each message is one line (one CR LF at the end)
- different events with the relevant information are not separated with four CR LF characters, as usual in other panels
- information messages arrive as different messages during some seconds (in a form of different alarms)
What we need to do, is to identify the initial message and then read the following alarms to extract the useful information.
Triggering the Workflow
As a first step, we need to trigger a Workflow to handle the incoming data. The alarm-code used is "DATA". Since the panel is sending serial data quite often, we need to filter the incoming alarms and handle only those that contain the information useful to us.
For this, we use the Alarm Expression Syntax. More specifically, as an "Incoming Alarm" condition in our Workflow we use Expression with value "DATA { payload = *Message-ID* }"
- DATA : the alarm code we use
- payload = *Message-ID* : the alarm's payload should contain the message "Message-ID"
Retrieving Alarms
After the workflow is triggered, we need to wait some seconds and then retrieve similar "DATA" alarms in order to access their payload.
The placeholder {{ alarm.alarmStoredTimestamp }} contains the timestamp of the initial alarm. In order to wait two more seconds, we need to add 2 times of 1000 milliseconds.
The result is {{ alarm.alarmStoredTimestamp + 2 * 1000 }} .
Next step is to Check Condition of the alarms retrieved. We use a Regular Expression for that:
- retrieveAlarms.alarms | get("$[0:4]") | get("$[?(@.payload =~ /.*(FIRE|ERROR|FIRE PRESSURE|NO RESPONSE|ERRORTO|ERRORTHREE|ERRORFIVE).*/s)]") | length > 0
Expanded:
- retrieveAlarms.alarms
- | get("$[0:4]")
- | get("$[?(@.payload =~ /.*(FIRE|ERROR|FIRE PRESSURE|NO RESPONSE|ERRORTWO|ERRORTHREE|ERRORFIVE).*/s)]")
- | length > 0
line 1: from the retrieved data, keep the alarms
line 2: get only the first 5 alarms (from 0 to 4)
line 3: if the payload matches any of the words FIRE, ERROR, FIRE PRESSURE, NO RESPONSE, ERRORTWO, ERRORTHREE, ERRORFIVE
line 4: keep those alarms
Notifying the customer
The SMS will contain the information extracted from the previous steps (from the DATA alarms).
The SMS test is the following:
- Signal received from
- {{ address }}
- {% for i in [2, 3] %}
- {{ retrieveAlarms.alarms[i].payload | trim }}
- {% endfor %}
- evalink talos
line 1: intro message "Signal received from"
line 2: {{ address }} is the customer's Site address (as configured in evalink talos)
line 3: starting a for loop through the messages in received in line 2 & line 3 (line 1 has the ID and line 4 the message category)
line 4: write the alarm's payload message
line 5: closing the for loop
line 6: signature "evalink talos"