Solutions
...
Litmus Companion Solutions for...
Litmus Production Record Exter...
Basic JSON structure of the event configuration
6min
the json file created with the solution litmus production record external event configurator, will include the json configuration for one or more events this allows, that more than one event can be monitored for example by the flow from the solution litmus production record event processing flow each individual event consist of a unique event name of three sub sections sub section eventtrigger the first sub section will hold the configuration for the trigger and is setup using the sheet event and trigger definition it consists of the a series of key value pairs json key what is defined example triggertagname the devicehub tag name of the tag used as trigger tag note the devicehub device is not defined this allows the flow using this configuration to monitor the same event for multiple devices if they all have the same tag programname triggercondition the condition used to monitor the tag value against onvaluechangenotincluded triggermonitorsource if the triggercondition does require a value to check against, this key holds what the source of that value is constantvalue triggermonitorvalue if the triggercondition does require a value to check against, this key holds that value o9 triggersecondmonitorsource if the triggercondition does require a second value to check against, this key holds what the source of that value is fromflowvariable triggersecondmonitorvalue if the triggercondition does require a second value to check against, this key holds that value ismasterpart triggermsgcount the number of data model items updated through this trigger 5 eventusertopic the message broker topic prefix used to publish the data for the items updated through the trigger mssqldata each event has only one trigger condition sub section identifier the second sub section will hold the configuration for the identifiers and is setup using the sheet event identifier definition to learn more about identifiers, please review the chapter how are data recorded in litmus production record database docid\ ulfmhqnmwb91rkntbaqqn the sub section identifier consist of 1 5 sub keys called identifiertagrelation how many of these sub keys exist is based on how many identifiers had been setup for the data model each sub key identifiertagrelation consists of a key value pair and a json sub structure called identifiercollection json key what is defined example tagname the devicehub tag name of the tag used to to update the value of one or more identifier(s) note the devicehub device is not defined this allows the flow using this configuration to monitor the same event for multiple devices if they all have the same tag serialnumber identifiercollection this json substructure consist of 1 5 sub keys called id this allows to use the same devicehub tag to update more than one identifier item, if they for example use both the value of the tag and the timestamp note if a sub key identifiercollection has 5 id substructures, no additional identifiercollection sub keys can exist, as only a maximum of 5 identifiers can exist per data model each substructure called id consists of a series of key value pairs json key what is defined example typeofdatasource this defines where the value for the identifier is read from the devicehub tags message object fromtag identifierevent if the value for the identifier is read from a different event, this hold the unique event name status tracking asset identifierdevice if the value for the identifier is read from a different event and different devicehub device, this can be used to specify the devicehub device line plc identifiervalue this is used to either provide a fixed value or specify the devicehub message object json key value identifiername this is a data model item which has been set as identifier for this data model asset name each event is required to have at least one and up to 5 identifiertagrelation sub keys each of these sub keys has at least one and up to 5 id substructures note if one sub key identifiercollection has 5 id substructures, no additional identifiercollection sub keys can exist, as only a maximum of 5 identifiers can exist per data model sub section items the third sub section will hold the configuration for the identifiers and is setup using the sheet event item definition to learn more about data models used to store event data in litmus production record database, please review the chapter core concept behind recording production record data via data model docid\ ffsctesqgb9gj7wy5kymo the sub section items consist of 1 n sub keys called itemtagrelation how many of these sub keys exist is based on how many items are to be updated by the event each sub key itemtagrelation consists of a key value pair and a json sub structure called itemcollection json key what is defined example tagname the devicehub tag name of the tag used to update the value of one or more item(s) note the devicehub device is not defined this allows the flow using this configuration to monitor the same event for multiple devices if they all have the same tag serialnumber itemcollection this json substructure consist of 1 n sub keys called item this allows to use the same devicehub tag to update more than one item, if they for example use both the value of the tag and the timestamp or are a constant value each substructure called item consists of a series of key value pairs json key what is defined example itemname the name of the data model item serialno nodenamesource the source where the flow reads the data model name from constantvalue nodename the value or source of the data model name geometry levelname a pipe symbol "|" separated string of the hierarchy level names under which the item resides in the data model gauge|actual isidentifier is the item an identifier? yes sendatstartend if the trigger does execute, is the value written to the new event or to the previous event? newevent valuesource defines the source of the value for the item fromtag value this is used to either provide a fixed value or specify the devicehub message object json key each event is required to have at least one itemtagrelation sub keys each of these sub keys has at least one item substructure