Detecting active alarms via DB

I’m trying to detect the active alarms looking in the DB.

I have the Alarm Status component showing 3 alarms.

In the DB i have joined the alarm_events and alarm_event_data tables, so i have these columns:


Querying this table and filtering the active ones i get many alarms, not only the 3 ones…
I managed to have the activated and then cleared ones filtered, but i still have more than 3 alarms.
What’s the way to do this?
Thank you!

still seems a die hard design issue 8)

The alarm tables in the database are historical events (active, clear, ack, etc…) and not meant to keep track of current status. It’s much easier to use the system.alarm.queryStatus() function to get the details you want. More info about this function in the user manual.