-
Notifications
You must be signed in to change notification settings - Fork 92
MQTT JSON Ingress Protocol Version 2.0
In general the data format is {"timestamp": "YYYY-MM-DDThh:mm:ssZ","dataItemId":"value", "dataItemId":{"key1":"value1", ..., "keyn":"valuen}}
NOTE: See the standard for the complete description of the fields for the data item representations below.
A simple set of events and samples will look something like this:
{
"timestamp": "2023-11-06T12:12:44Z", //Time Stamp
"tempId": 22.6, //Temperature
"positionId": 1002.345, //X axis position
"executionId": "ACTIVE" //Execution state
}
A CONDITION
requires the key to be the dataItemId and requires the 6 fields as shown in the example below
{
"timestamp": "2023-11-06T12:12:44Z",
"dataItemId": {
"level": "fault",
"conditionId":"ac324",
"nativeSeverity": "1000",
"qualifier": "HIGH",
"nativeCode": "ABC",
"message": "something went wrong"
}
}
A MESSAGE
requires the key to be the dataItemId and requires the nativeCode field as shown in the example below
{
"timestamp": "2023-11-06T12:12:44Z",
"messsageId": {
"nativeCode": "ABC",
"message": "something went wrong"
}
}
The TimeSeries
REPRESENTATION
requires the key to be the dataItemId and requires 2 fields "count" and "values" and 1 to n comma delimited values.
NOTE: The "frequency" field is optional.
{
"timestamp": "2023-11-06T12:12:44Z",
"timeSeries1": {
"count": 10,
"frequency": 100,
"values": [1,2,3,4,5,6,7,8,9,10]
}
}
The DataSet
REPRESENTATION
requires the the dataItemId as the key and the "values" field. It may also have the optional "resetTriggered" field.
{
{
"timestamp": "2023-11-09T11:20:00Z",
"dataSetId": {
"key1": 123,
"key2": 456,
"key3": 789
}
}
Example with the optional "resetTriggered" filed:
{
"timestamp": "2023-11-09T11:20:00Z",
"cncregisterset1": {
"resetTriggered": "NEW",
"value": {"r1":"v1", "r2":"v2", "r3":"v3" }
}
}
The Table
REPRESENTATION
requires the the dataItemId as the key and the "values" field. It may also have the optional "resetTriggered" field.
{
"timestamp":"2023-11-06T12:12:44Z",
"tableId":{
"row1":{
"cell1":"Some Text",
"cell2":3243
},
"row2": {
"cell1":"Some Other Text",
"cell2":243
}
}
}
Example with the optional resetTriggered field:
{
"timestamp": "2023-11-09T11:20:00Z",
"a1": {
"resetTriggered": "NEW",
"value": {
"r1": {
"k1": 123.45,
"k3": 6789
},
"r2": null
}
}
}