Hi,
I need to get the alarm history of the last 60 seconds in a protocol/automation. I found some answers on how to do this in an automation script, but these solutions are not recommended. I'm trying to use this one, but what is the FetchRepository code I need to use?
//FetchRepository code here
var alarmRepository = repositoryRegistry.Get<IAlarmRepository>();
alarmsFromDb = alarmRepository.Read(alarmFilter, startTime, endTime, squashed)
.Cast<AlarmEventMessage>()
.ToList();
Hi Maximiliano,
Perhaps you want to check this other question with a complete explanation of using an alarm repository to retrieve history alarms.

Hi Gelber, Thank you!