The most correct thing to do is to rearchitect whatever you're doing to not rely on sending true alarm events between disparate systems.
If you have to use JSON (and have to serialize entire alarm events), then you can get something "working" by wrapping the output of getProperties() on the PyAlarmEvent and passing that to jsonEncode:
But in the platform, we're not using JSON to encode these objects, we're using Protobuf, which is a completely different serialization format than JSON. In gateway scope, you could theoretically take advantage of that, there's a static getter for the GAN protobuf registry:
But again - the entire endeavour feels misguided. What is the information you need out of the alarm event on the other side, and can you extract and send just that? Or can you rely on built-in platform mechanisms like remote alarm profiles, so that we are in charge of the serialization problem, not you?
Long JSON
[
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": false,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.isInitialEvent.Desc?",
"key": "enums.CommonAlarmProperties.isInitialEvent.Desc",
"params": []
},
"displayName": {
"defaultVal": "¿enums.CommonAlarmProperties.isInitialEvent?",
"key": "enums.CommonAlarmProperties.isInitialEvent",
"params": []
},
"name": "isInitialEvent",
"type": "class java.lang.Boolean"
},
{
"advanced": false,
"bindable": false,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": "",
"description": {
"defaultVal": "Documentation about the alarm.",
"key": "enums.CommonAlarmProperties.notes.Desc",
"params": []
},
"displayName": {
"defaultVal": "Notes",
"key": "enums.CommonAlarmProperties.notes",
"params": []
},
"name": "notes",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": "",
"description": {
"defaultVal": "The path of the item holding the alarm, not including the alarm name.",
"key": "enums.CommonAlarmProperties.itemPath.Desc",
"params": []
},
"displayName": {
"defaultVal": "Item Path",
"key": "enums.CommonAlarmProperties.itemPath",
"params": []
},
"name": "itemPath",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": "",
"description": {
"defaultVal": "The elapsed time between the alarm becoming active and being cleared, as a formatted string. Calculated against the current time if the alarm is still active.",
"key": "enums.CommonAlarmProperties.activeDuration.Desc",
"params": []
},
"displayName": {
"defaultVal": "Active Duration",
"key": "enums.CommonAlarmProperties.activeDuration",
"params": []
},
"name": "activeDuration",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Deadbands and Time Delays",
"key": "enums.CommonAlarmProperties.Categories.Deadbands",
"params": []
},
"categoryKey": "Deadbands",
"defaultValue": 0.0,
"description": {
"defaultVal": "The time, in seconds, before the alarm will be considered truly active after the active condition becomes true. Also known as a \"rising edge time deadband\".",
"key": "enums.CommonAlarmProperties.timeOnDelaySeconds.Desc",
"params": []
},
"displayName": {
"defaultVal": "Active delay (seconds)",
"key": "enums.CommonAlarmProperties.timeOnDelaySeconds",
"params": []
},
"name": "timeOnDelaySeconds",
"type": "class java.lang.Double"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": true,
"description": {
"defaultVal": "Whether or not this alarm can be shelved.",
"key": "enums.CommonAlarmProperties.shelvingAllowed.Desc",
"params": []
},
"displayName": {
"defaultVal": "Shelving Allowed",
"key": "enums.CommonAlarmProperties.shelvingAllowed",
"params": []
},
"name": "shelvingAllowed",
"type": "class java.lang.Boolean"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": false,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.isActive.Desc?",
"key": "enums.CommonAlarmProperties.isActive.Desc",
"params": []
},
"displayName": {
"defaultVal": "Active?",
"key": "enums.CommonAlarmProperties.isActive",
"params": []
},
"name": "isActive",
"type": "class java.lang.Boolean"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": null,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.eventTime.Desc?",
"key": "enums.CommonAlarmProperties.eventTime.Desc",
"params": []
},
"displayName": {
"defaultVal": "Event Time",
"key": "enums.CommonAlarmProperties.eventTime",
"params": []
},
"name": "eventTime",
"type": "class java.util.Date"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": null,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.source.Desc?",
"key": "enums.CommonAlarmProperties.source.Desc",
"params": []
},
"displayName": {
"defaultVal": "Source Path",
"key": "enums.CommonAlarmProperties.source",
"params": []
},
"name": "source",
"type": "class com.inductiveautomation.ignition.common.QualifiedPath"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": "",
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.ackUserName.Desc?",
"key": "enums.CommonAlarmProperties.ackUserName.Desc",
"params": []
},
"displayName": {
"defaultVal": "Ack'ed By (Name)",
"key": "enums.CommonAlarmProperties.ackUserName",
"params": []
},
"name": "ackUserName",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": true,
"description": {
"defaultVal": "Specifies whether or not this alarm is evaluated by the system.",
"key": "enums.CommonAlarmProperties.enabled.Desc",
"params": []
},
"displayName": {
"defaultVal": "Enabled",
"key": "enums.CommonAlarmProperties.enabled",
"params": []
},
"name": "enabled",
"type": "class java.lang.Boolean"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": true,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.isAcked.Desc?",
"key": "enums.CommonAlarmProperties.isAcked.Desc",
"params": []
},
"displayName": {
"defaultVal": "Acked?",
"key": "enums.CommonAlarmProperties.isAcked",
"params": []
},
"name": "isAcked",
"type": "class java.lang.Boolean"
},
{
"advanced": false,
"bindable": false,
"category": {
"defaultVal": "Alarm Mode Settings",
"key": "enums.AlarmModeProperties.Category",
"params": []
},
"defaultValue": {"properties": [{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Alarm Mode Settings",
"key": "enums.AlarmModeProperties.Category",
"params": []
},
"categoryKey": "enums.AlarmModeProperties.Category",
"defaultVal": 0.0,
"defaultValue": 0.0,
"descKey": "AlarmModeProperties.single.setpointA.Desc",
"description": {
"defaultVal": "The value used to initiate an alarm.",
"key": "AlarmModeProperties.single.setpointA.Desc",
"params": []
},
"displayKey": "AlarmModeProperties.single.setpointA",
"displayName": {
"defaultVal": "Setpoint",
"key": "AlarmModeProperties.single.setpointA",
"params": []
},
"name": "setpointA",
"type": "class java.lang.Double"
}]},
"description": null,
"displayName": {
"defaultVal": "Mode",
"key": "AlarmModeProperties.mode",
"params": []
},
"name": "mode",
"type": "class com.inductiveautomation.ignition.common.alarming.config.AlarmMode"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": null,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.ackTime.Desc?",
"key": "enums.CommonAlarmProperties.ackTime.Desc",
"params": []
},
"displayName": {
"defaultVal": "Ack Time",
"key": "enums.CommonAlarmProperties.ackTime",
"params": []
},
"name": "ackTime",
"type": "class java.util.Date"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": null,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.ackUser.Desc?",
"key": "enums.CommonAlarmProperties.ackUser.Desc",
"params": []
},
"displayName": {
"defaultVal": "Ack'ed By",
"key": "enums.CommonAlarmProperties.ackUser",
"params": []
},
"name": "ackUser",
"type": "class com.inductiveautomation.ignition.common.QualifiedPath"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": null,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.clearTime.Desc?",
"key": "enums.CommonAlarmProperties.clearTime.Desc",
"params": []
},
"displayName": {
"defaultVal": "Clear Time",
"key": "enums.CommonAlarmProperties.clearTime",
"params": []
},
"name": "clearTime",
"type": "class java.util.Date"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Deadbands and Time Delays",
"key": "enums.CommonAlarmProperties.Categories.Deadbands",
"params": []
},
"categoryKey": "Deadbands",
"defaultValue": 0.0,
"description": {
"defaultVal": "A numeric deadband for the alarm condition. The interpretation of this value depends on the deadband mode. Note that this deadband is separate from, and evaluated after, the tag's deadband.",
"key": "enums.CommonAlarmProperties.deadband.Desc",
"params": []
},
"displayName": {
"defaultVal": "Deadband",
"key": "enums.CommonAlarmProperties.deadband",
"params": []
},
"name": "deadband",
"type": "class java.lang.Double"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Deadbands and Time Delays",
"key": "enums.CommonAlarmProperties.Categories.Deadbands",
"params": []
},
"categoryKey": "Deadbands",
"defaultValue": 0.0,
"description": {
"defaultVal": "The time, in seconds, before the alarm will be considered truly clear after the clear condition becomes true. Also known as a \"falling edge time deadband\".",
"key": "enums.CommonAlarmProperties.timeOffDelaySeconds.Desc",
"params": []
},
"displayName": {
"defaultVal": "Clear delay (seconds)",
"key": "enums.CommonAlarmProperties.timeOffDelaySeconds",
"params": []
},
"name": "timeOffDelaySeconds",
"type": "class java.lang.Double"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": null,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.state.Desc?",
"key": "enums.CommonAlarmProperties.state.Desc",
"params": []
},
"displayName": {
"defaultVal": "Current State",
"key": "enums.CommonAlarmProperties.state",
"params": []
},
"name": "state",
"type": "class com.inductiveautomation.ignition.common.alarming.AlarmState"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": null,
"description": {
"defaultVal": "An optional path (separated by \"/\") that will be used for display and browsing purposes.",
"key": "enums.CommonAlarmProperties.displayPath.Desc",
"params": []
},
"displayName": {
"defaultVal": "Display Path",
"key": "enums.CommonAlarmProperties.displayPath",
"params": []
},
"name": "displayPath",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": "",
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.displayPathOrSource.Desc?",
"key": "enums.CommonAlarmProperties.displayPathOrSource.Desc",
"params": []
},
"displayName": {
"defaultVal": "Display Path or Source",
"key": "enums.CommonAlarmProperties.displayPathOrSource",
"params": []
},
"name": "displayPathOrSource",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": "",
"description": {
"defaultVal": "The full path of the item holding the alarm, not including the alarm name. An easier to read version of Source Path.",
"key": "enums.CommonAlarmProperties.fullItemPath.Desc",
"params": []
},
"displayName": {
"defaultVal": "Full Item Path",
"key": "enums.CommonAlarmProperties.fullItemPath",
"params": []
},
"name": "fullItemPath",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": "",
"description": {
"defaultVal": "The name of the item holding the alarm.",
"key": "enums.CommonAlarmProperties.itemName.Desc",
"params": []
},
"displayName": {
"defaultVal": "Item Name",
"key": "enums.CommonAlarmProperties.itemName",
"params": []
},
"name": "itemName",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": null,
"description": {
"defaultVal": "An optional name that will be used for display purposes. Provides a dynamic alternative to the static \"name\" identifier. If left blank, the name will be used.",
"key": "enums.CommonAlarmProperties.label.Desc",
"params": []
},
"displayName": {
"defaultVal": "Label",
"key": "enums.CommonAlarmProperties.label",
"params": []
},
"name": "label",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": {"intValue": 1},
"description": {
"defaultVal": "The priority (or \"severity\") of this alarm.",
"key": "enums.CommonAlarmProperties.priority.Desc",
"params": []
},
"displayName": {
"defaultVal": "Priority",
"key": "enums.CommonAlarmProperties.priority",
"params": []
},
"name": "priority",
"type": "class com.inductiveautomation.ignition.common.alarming.AlarmPriority"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": false,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.isJournaled.Desc?",
"key": "enums.CommonAlarmProperties.isJournaled.Desc",
"params": []
},
"displayName": {
"defaultVal": "¿enums.CommonAlarmProperties.isJournaled?",
"key": "enums.CommonAlarmProperties.isJournaled",
"params": []
},
"name": "isJournaled",
"type": "class java.lang.Boolean"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": false,
"description": {
"defaultVal": "Select this option to require operators to provide some explanation when the alarm is acknowledged.",
"key": "enums.CommonAlarmProperties.ackNotesReqd.Desc",
"params": []
},
"displayName": {
"defaultVal": "Ack Notes Required",
"key": "enums.CommonAlarmProperties.ackNotesReqd",
"params": []
},
"name": "ackNotesReqd",
"type": "class java.lang.Boolean"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": {"intValue": 0},
"description": {
"defaultVal": "Dictates whether the timestamp used on the alarm comes from the system or the value.",
"key": "enums.CommonAlarmProperties.timestampSource.Desc",
"params": []
},
"displayName": {
"defaultVal": "Timestamp Source",
"key": "enums.CommonAlarmProperties.timestampSource",
"params": []
},
"name": "timestampSource",
"type": "class com.inductiveautomation.ignition.common.sqltags.model.types.TimestampSource"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": {"intValue": 2},
"description": {
"defaultVal": "How acknowledgement works for the alarm: Auto - Alarm is acknowledged when cleared. Manual - Alarm acknowledged by user. Unused - Alarm is always marked as 'acknowledged'. Note that if 'Acknowledged' is a dropout condition in your Alarm Pipeline then you will not get a notification when Ack Mode is set to 'Unused'.",
"key": "enums.CommonAlarmProperties.ackMode.Desc",
"params": []
},
"displayName": {
"defaultVal": "Ack Mode",
"key": "enums.CommonAlarmProperties.ackMode",
"params": []
},
"name": "ackMode",
"type": "class com.inductiveautomation.ignition.common.sqltags.model.types.AlertAckMode"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": null,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.eventValue.Desc?",
"key": "enums.CommonAlarmProperties.eventValue.Desc",
"params": []
},
"displayName": {
"defaultVal": "Event Value",
"key": "enums.CommonAlarmProperties.eventValue",
"params": []
},
"name": "eventValue",
"type": "interface java.io.Serializable"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": false,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.isShelved.Desc?",
"key": "enums.CommonAlarmProperties.isShelved.Desc",
"params": []
},
"displayName": {
"defaultVal": "Is Shelved?",
"key": "enums.CommonAlarmProperties.isShelved",
"params": []
},
"name": "isShelved",
"type": "class java.lang.Boolean"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": "",
"description": {
"defaultVal": "The elapsed time between the alarm becoming active and being acknowledged, as a formatted string.",
"key": "enums.CommonAlarmProperties.ackDuration.Desc",
"params": []
},
"displayName": {
"defaultVal": "Unacknowledged Duration",
"key": "enums.CommonAlarmProperties.ackDuration",
"params": []
},
"name": "ackDuration",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": null,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.activeTime.Desc?",
"key": "enums.CommonAlarmProperties.activeTime.Desc",
"params": []
},
"displayName": {
"defaultVal": "Active Time",
"key": "enums.CommonAlarmProperties.activeTime",
"params": []
},
"name": "activeTime",
"type": "class java.util.Date"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": true,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.isClear.Desc?",
"key": "enums.CommonAlarmProperties.isClear.Desc",
"params": []
},
"displayName": {
"defaultVal": "Clear?",
"key": "enums.CommonAlarmProperties.isClear",
"params": []
},
"name": "isClear",
"type": "class java.lang.Boolean"
},
{
"advanced": false,
"bindable": true,
"category": {
"defaultVal": "State",
"key": "enums.CommonAlarmProperties.Categories.State",
"params": []
},
"categoryKey": "State",
"defaultValue": null,
"description": {
"defaultVal": "¿enums.CommonAlarmProperties.eventState.Desc?",
"key": "enums.CommonAlarmProperties.eventState.Desc",
"params": []
},
"displayName": {
"defaultVal": "Event State",
"key": "enums.CommonAlarmProperties.eventState",
"params": []
},
"name": "eventState",
"type": "class com.inductiveautomation.ignition.common.alarming.AlarmStateTransition"
},
{
"advanced": false,
"bindable": false,
"category": {
"defaultVal": "Main",
"key": "enums.CommonAlarmProperties.Categories.Main",
"params": []
},
"categoryKey": "Main",
"defaultValue": null,
"description": {
"defaultVal": "The identifier of the alarm. Combined with the location of the alarm, this will be the unique id of the alarm definition. For dynamic values, use Label and/or Display Path.",
"key": "enums.CommonAlarmProperties.name.Desc",
"params": []
},
"displayName": {
"defaultVal": "Name",
"key": "enums.CommonAlarmProperties.name",
"params": []
},
"name": "name",
"type": "class java.lang.String"
},
{
"advanced": false,
"bindable": false,
"category": {
"defaultVal": "Deadbands and Time Delays",
"key": "enums.CommonAlarmProperties.Categories.Deadbands",
"params": []
},
"categoryKey": "Deadbands",
"defaultValue": {"intValue": 0},
"description": {
"defaultVal": "Defines how the deadband value is used. If percent, the value (0-100) will be compared against the Eng. limits defined for the value.",
"key": "enums.CommonAlarmProperties.deadbandMode.Desc",
"params": []
},
"displayName": {
"defaultVal": "Deadband Mode",
"key": "enums.CommonAlarmProperties.deadbandMode",
"params": []
},
"name": "deadbandMode",
"type": "class com.inductiveautomation.ignition.common.sqltags.model.types.DeadbandMode"
}
]