Unfortunately, this script isn’t easily converted to v8 The function
system.tag.getAlarmStates was deprecated.
I assume that we now need to use
system.tag.getConfiguration, however this only returns non-default values… so if the priority for example is set to Low, then you won’t be able to read this. I guess you could assume it’s Low if the key isn’t in the dictionary? This would require knowing the defaults of all properties though, assuming you wanted to bring back other property values as well. Also, getConfiguration eats up all available memory and subsequently kills the script for large numbers of tags…
I really don’t know the best way to approach this anymore… I can think of really dumb ways that will probably take hours to run (for a lot of tags). E.g. using
system.tag.browse to find the tags, then
system.tag.getConfiguration to get the configuration for each tag individually, check if it has an alarm, get the alarm names, then use
system.tag.readBlocking to read the values of the alarm properties (of course I would collate a list of all tags and all properties to read, and then bulk read them)… very cumbersome to write the code and very dumb and inefficient in terms of structure… Who knows how long that will take for 350k tags. A rough estimate based on a quick simulation is >9hrs