Retrieve acknowledgement notes

I’ll use

system.alarm.acknowledge

to acknowledge alarms with notes.
but I’ll use

system.alarm.queryStatus

to retrieve alarm status
but, I don’t find any acknowledgement notes.

How should I correctly retrieve the acknowledgement notes?

System.alarm.queryStatus will return a list of AlarmEvent objects

You can call getNotes on those AlarmEvent objects:

https://docs.inductiveautomation.com/display/DOC79/Alarm+Event+Properties+Reference#AlarmEventPropertiesReference-TheAlarmEventObject

2 Likes

thank you, ethomason!!

Hi;

I used getNotes() in the following code but it returns blank. But, when I check the Ignition Alarm Status Table created in a GUI, it shows the notes.

alarms = system.alarm.queryStatus(State=["ActiveUnacked","ActiveAcked","ClearAcked","ClearUnacked"], includeShelved="false")

logger.info(str(type(alarms[0])))
# <type 'com.inductiveautomation.ignition.common.alarming.BasicAlarmEvent'>

logger.info(str(type(alarms[0].getNotes())))
# <type 'unicode'>

logger.info(str(len(str(alarms[0].getNotes()))))
# len: 0

What could be wrong?

You are only looking at one alarm event. What happens when you loop through the entire dataset?

There was only one alarm in the set. And, it comes from an Inductive Automation server that I have set up for development. It only has one tag. And, then I put it into alarm. I actually had a loop that would iterate through the alarms object in general. But, I took it out to make the troubleshooting easier. What do you think I should do?

I should add that I compared the UUID of the alarm from queryStatus with the UUID of the alarm that appears in the Alarm Status Table created using designer. The UUID was the same for both of them.

Can you remote into the machine to help me out?

Hi Adolfo, if you need immediate assistance I recommend getting in contact with support.

2 Likes