Pattern Matching File Format

The pattern-matching configuration file is located in your site folder, in addons/timeline.json. For a normal installation on Windows, you'll find it in c:\Program Files (x86)\Optrix\ARDI\web\sites\default\addons\timeline.json.

It's a JavaScript Object Notation file that describes a few core settings, plus each of the individual patterns you want to match.

These settings and the pattern-matching format are shown below…

mirrored

This is a list of numbers, giving the property IDs of any properties that should be processed using their absolute value.

An example is the speed or the current for a motor that is bi-directional (ie. can run in reverse). In this case, a move from a negative number to a lower negative number is still considered a rise in value, rather than a drop in value.

This makes the events for the property much easier to read in the Timeline.

ignoreproperties

This is a list of the property IDs of any properties that should be ignored all-together.

Some properties are analytic properties - they simply echo other values. So it's fairly pointless to raise events on them, when there will be other, more meaningful events happening at the same time.

ignorechannels

This is similar to the ignoreproperties option, but used to ignore a specific property on a specific asset. This is useful if there are erratic, malfunctioning, or just plain 'noisy' channels that constantly appear in your Timeline but shouldn't be there.

These values are given as full ARDI data addresses - <asset_id>:<property_id>:<node>.

tzoffset

The timezone offset (in hours) of the current location.

patterns

The patterns to identify.

Each pattern is an object, containing…

OptionValue
NameHuman-readable name of the event
DurationThe length (in seconds) of the event
OnThe asset ID of the object this event is assigned to
EventsA list of events

And each event is made up of the following…

OptionValue
ChannelThe ARDI full data path for the channel
EventThe name of the event Timeline has identified (ie. Drop, Rise etc.)
OptionalSet to '1' if it is optional. Otherwise, do not include it.

Note that each pattern should include at least two non-optional events.

Example

{
    "mirrored": [ 44, 23 ],
    "ignoreproperties": [ 34,84,83,86 ],
    "ignorechannels": [],
    "tzoffset": 8,
    "patterns": [
        {
            "name": "My Random Event",
            "duration": 5,
            "on": 191,
            "events": [
                {
                    "channel": "191:23:measurement",
                    "event": "Rise"
                },
                {
                    "channel": "193:23:measurement",
                    "event": "Drop"
                },
                {
                    "channel": "193:59:measurement",
                    "event": "Control Issue",
                    "optional": 1
                }
            ]
        }]
 }