Add Alarms records in alarms History

I’m looking for a way to add alarms records in alarms History.
No script function or SDK entry point in alarm manager ? :scratch:

If you are looking for a way to manually enter alarms you should be able to do this with an insert query to the alarm_events and alarm_events_data tables. The only part that may be an issue is coming up with a uuid for the event you are entering. So theoretically I don’t see why you couldn’t add alarm records.

How to generate the uuid ?

You could use Python and the uuid.py library (included in your install). Should look like

import uuid print uuid.uuid4()

You could also use Java.

:stuck_out_tongue: I did not dare to insert directly into alarms history table. I really like this solution, I will give it a try as soon as possible !

Hi @greg.simpson ,
what are the possible value for the eventflag and eventtype columns of the alarm_events table ?

These columns are described in the user manual here: https://docs.inductiveautomation.com/display/DOC79/Journal+Properties+and+Tables

1 Like

Thanks a lot @PGriffith !

@mazeyrat Can you share an exemple of you code ?