Hey folks,
I ran into some unexpected lost time and frustration with the upgrade and custom alarm email messages. I didn’t see anything about it in the upgrade guides, so I wanted to share it here in case anyone else runs into the issue.
Basic Custom Message Formatting
The gist of it is that custom alarm messages are not required to be bound as expressions in 7.x, but 8.x requires it. With this comes a change in formatting, and these changes are not automatically resolved by the upgrade.
Details
I worked with IA tech support and briefly touched on the issue here. For anyone that referenced the 7.7-7.9 IU Alarming video “Custom Email, SMS, and Voice Scripts”, you may have followed the tutorial and written your custom message directly into the “custom message” box as follows:
At {eventTime|hh:mm:ss}, alarm "{name}" at "{displayPath}" transitioned to {eventState}.
In 8.x, the way Ignition is evaluating this message and passing it to the alarm pipeline has changed, and the message must now be an expression binding rather than typed straight into the box, and it must be formatted as a string and wrapped in quotes:
'At '+"{eventTime|hh:mm:ss}"+', alarm '+"{name}"+' at '+"{displayPath}"+' transitioned to '+"{eventState}"+'. '
Solution:
- Copy the custom messages and reformat / wrap them with quotes as needed into an expression binding.
Associated Data named “value.”
Today I found that having associated data on an alarm named “value” will resolve initially but break in time, thereby breaking the custom message. Again, something developed in 7.x that does not work in 8.x
When adding associated data (say you wanted to show analog data related to the alarm), if you name that associated data “value,” you can bind it to a tag and it will evaluate. However, after cycling the tag provider (or presumably power), those bindings are broken and so are the custom messages they are associated with.
Details
Value: {[~]Well/Level/Domestic_Level}
Custom Message:'At '+"{eventTime|hh:mm:ss}"+', alarm '+"{name}"+' at '+"{displayPath}"+' transitioned to '+"{eventState}"+': '+"{Value}"+" in."
Evaluates as: (Ignition Alarm Notification) At 03:38:10, alarm Domestic Water Low at Well transitioned to Active: 43 in.
After cycling the tag provider, the Value tag binding will become the following:
Value: [{ "bindType": "Tag", "value": "[~]Well/Level/Domestic_Level" }, Good, Wed Aug 25 16:22:19 PDT 2021 (1629933739159)]
Though in the case of the gateway I was troubleshooting, all the bindings looked like this:
[, Good, Wed Aug 25 16:22:19 PDT 2021 (1629933739159)]
The custom message now evaluates as:
(Ignition Alarm Notification) At {eventTime|hh:mm:ss}, alarm {name} at {displayPath} transitioned to {eventState}:{Value} in.
Removing the quotes from around {Value}
will evaluate as:
(Ignition Alarm Notification) At 03:38:10, alarm Domestic Water Low at Well transitioned to Active: true in
Which suggests to me that the value binding may looking at the value of the alarm, not the “Value” associated data.
Solution:
- Manually changing the name of the “Value” associated data to something else (data, level, analog) and updating each binding seems to resolve the issue. With a large system, it can take quite a bit of time to get these functioning again.
If anyone has any insight or can add to this, I welcome the feedback.