Hi all,
I’m working with some alarms that I got with system.alarm.queryJournal()
The docs say that this returns a list of AlarmEvent objects. Are there any docs on this object? I found a blurb about some of the access functions on the queryJournal page, but a search of the docs yields no more information. In any case, I managed to figure out most of what I needed with the information on that page, with the exception of getting any data from the events that are part of the alarms.
From the alarms I can get EventData objects, which should contain some sort of ‘eventTime’ attribute. How do I access this? And where is there documentation on these objects? Searches of the docs and forums yielded disappointing results.
With ignition I’ve been able to figure the not-so-awesomely-documented parts with trial and error, but this time I haven’t been able to get to the results. Here are a few of the things I’ve tried:
activeData[‘eventTime’] <- EventObject is not subscriptable
activeData.getEventTime(), .getTime() <- No attribute
activeData.get(‘eventTime’) <- can’t coerce to property
alarm.getActiveEventTime() <- No attribute
As an aside - how do alerts and alarms fit together? I’ve poured over the user manual extensively and cannot figure out how they are different or how they are related. I haven’t been able to get anything with alerts to work - it just keeps saying that the journal doesn’t exist, but the journal works for the alarms…
Finally - it looks like queryJournal returns a semi-unique alarm for each event, where semi-unique means that it is a new object, but the alarm UUID is the same. Is there a way to ‘squash’ all alarms with the same UUID into the same alarm object? What I’d like to be able to do is get the cleared and active times from a single alarm object, instead of going through a list and pulling all the ones with the same UUID out and then merging it all manually.
Looking forwards to great success,
Charles