Clearing WAS_ACTIVE notifications in SAM

Notifications in Smarts (aka IONIX) SAM that are flagged as "WAS_ACTIVE" in the EventState attribute appear when the domain that raised them breaks it's connection with SAM. They may hang around in the SAM without being cleared (or at least: being cleared after a significant delay). They become properly "ACTIVE" again when the domain re-establishes contact and the corresponding event is re-notified.

The ASL script below clears all such notifications in SAM..

START { .. eol } do {
        foreach notifName (getInstances("ICS_Notification")) {
                notif = object(notifName);
                changed = FALSE;

                foreach state (notif->EventStateTable) {
                        if (state[1] == "WAS_ACTIVE") {
                                notif->clear("ASL Script", state[0], "Cleared WAS_ACTIVE");
                                changed = TRUE;
                if (changed) { notif->changed(); }
Scroll to Top