DocumentationAPIs
Contact UsCalAmp StatusLog In
APIs

CTC Message Streaming Integration

Introduction

Message streaming is an almost real-time streaming of device messages to a backend, platform, or cloud. The CTC platform receives device messages, handles exceptions, acknowledges them, transforms them (from a proprietary protocol to a human-readable format), enriches them with other metadata such as account, group, and asset, and makes them available as a stream to a data consumer.

CTC has different channels to provide clients access to their device messages:

  • Data Pump: A real-time stream of messages that clients can pull from. The Data Pump streams are hosted within CTC that the clients poll to fetch messages.
  • Results Services: Enables you to access past messages. You can search through the messages based on different criteria and time frames.
  • Custom Destination Streaming: The PUSH-based solution in which the client hosts the destination to which CTC will push messages. The client can then pull the messages from their hosted destination.

Data Storage
Your telematics data is stored in the CTC database if your subscription package includes the Data Storage feature. If your package doesn’t include that, the data will be deleted from the messaging stream as soon as it is read.

You access your stored data via the set of APIs called Results Services, mentioned above. See the [Results Services] (https://developer.calamp.com/private/reference/results-services-historical-data) API documentation for more information.

The number of days your data is saved is an account-level setting, but this is commonly set for 90 days for telematics messages.

Destination Configuration

Each Account in CTC can be setup with a custom destination to which you can push device messages.

Subscription destination types

For this feature to be enabled for an Account, an appropriate Subscription needs to be assigned to that account. Available pre-defined subscription are Connect Basic Push and Connect Pro Push.

❗️

Changes to subscriptions on accounts can take up to 24 hours to propagate through the system.

Supported destination types

  1. AWS_SQS
    • Only standard queues are currently supported. FIFO queues are not supported.
  2. AWS_KINESIS
    • Amazon Kinesis Client Library (Amazon KCL) should be used to consume and process messages from the Kinesis data stream.
  3. KAFKA_SASL_SCRAM
    • Kafka cluster supporting SASL_SCRAM as authentication mechanism. By default, it SCRAM-SHA-512. For clusters supporting SCRAM-SHA-216 this could be configured with the property “sasl.mechanism”. Supports AWS MSK.
  4. KAFKA_SASL_PLAIN
    • Kafka cluster supporting SASL_PLAIN as authentication mechanism. Supports Confluent Cloud and Azure Event Hub with shared access signature.
  5. Google Pub/Sub
    • For using Google Pub/Sub topics to receive messages from Calamp CTC.

Kafka Certificates

The certificates used to configure kafka clusters should be issued by globally trusted providers. Self-hosted kafka instances with the above authentication modes are also supported, with globally trusted providers.

Destination setup API

URL: https://<host:port>/connect/services/accounts/{accountId}/messageendpoint

Method: POST

HTTP request headers: calamp-services-app: the application key of the CTC application for which the request is made. Content-Type: application/json Set-Cookie: authToken=<authToken> where the auth token generated by CTC on user login

Request payload: A JSON document that describes the message endpoint information including the owning account and the endpoint configuration.

JSON Schema

AWS KINESIS

{
    "messageEndpoint": {
        "groups": null,
        "configuration": {
        	"type": "AWS_KINESIS",
            "awsAccessKeyId": "<AWS_ACCESS_KEY>",
            "awsSecretAccessKey": "<AWS_SECRET_ACCESS_KEY>",
            "region": "<AWS_REGION>",
            "streamName": "<AWS_KINESIS_STREAM_NAME>"
        },
        "status": "Enabled"
    }
}

AWS SQS

{
    "messageEndpoint": {
        "groups": null,
        "configuration": {
        	"type": "AWS_SQS",
            "awsAccessKeyId": "<AWS_ACCESS_KEY>",
            "awsSecretAccessKey": "<AWS_SECRET_ACCESS_KEY>",
            "region": "<AWS_REGION>",
            "queueName": "<AWS_SQS_NAME>"
        },
        "status": "Enabled"
    }
}

KAFA SASL SCRAM

{
    "messageEndpoint": {
        "configuration": {
        	"type": "KAFKA_SASL_SCRAM",
            "bootstrapServers": "<BOOTSTRAP_SERVERS_STRING>",
            "topicName": "<KAFKA_TOPIC_NAME>",
            "username": "<USERNAME>",
            "password": "<PASSWORD>",
		"kafkaProducerProperties": {
	"acks": "<0, 1, or all>",
	"sasl.mechanism": "<SCRAM-SHA-216 or SCRAM-SHA-512>"	
      "security.protocol": "SASL_SSL",
      "key.serializer": "org.apache.kafka.common.serialization.StringSerializer",
      "value.serializer": "org.springframework.kafka.support.serializer.JsonSerializer",
      "sasl.mechanism": "PLAIN",
      "acks": "<0, 1, or all>",
      "sasl.jaas.config": "org.apache.kafka.common.security.scram.ScramLoginModule required username='<USERNAME>' password='<PASSWORD>';",
      "client.id": "<CLIENT ID>"
},
        },
        "status": "Enabled"
    }
}

KAFKA SASL PLAIN

{
    "messageEndpoint": {
        "configuration": {
        	"type": "KAFKA_SASL_PLAIN",
            "bootstrapServers": "<BOOTSTRAP_SERVERS_STRING>",
            "topicName": "<KAFKA_TOPIC_NAME>",
            "username": "<USERNAME>",
            "password": "<PASSWORD>",
            "kafkaProducerProperties": {
            "security.protocol": "SASL_SSL",
            "key.serializer": "org.apache.kafka.common.serialization.StringSerializer",
            "value.serializer": "org.springframework.kafka.support.serializer.JsonSerializer",
            "sasl.mechanism": "PLAIN",
            "acks": "<0, 1, or all>",
            "sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username='<USERNAME>' password='<PASSWORD>';",
            "client.id": "<CLIENT ID>"
        },
        "status": "Enabled"
    }
}
📘

The kafka configurations vary depending on service providers like Confluent, AWS, Azure and so on. These configurations may have to be modified based on the service providers.

Google Pub/Sub

{
    "messageEndpoint": {
        "configuration": {
        	"type": "GCP_PUBSUB",
"topicName" : "<Pub/Sub Topic Name to push messages into>",
"privateKeyId": "<Private Key Id for Service Account user>",
"certUrl": "<Client x509 Cert URL>",
"projectId": "<Google Cloud Project Id>",
"clientEmail": "<Email Address for Service Account User>",
"privateKey": "<Private Key for Service Account user>,
"clientId": "<Client Id for Service Account user>"
}
	}

These configuration parameters are provided by Google Cloud while creating the service account with access to publish messages into the Pub/Sub topic.

📘

The credentials supplied should allow CTC to write to the configured destination.

❗️

For brevity and generality, the https scheme, the hostname and the port are omitted from further examples. Instead, the endpoints and URLs will show only the context, path and other relevant parameters.

Message Streaming Frequency

How often messages are pushed to the destination depends on the destination type. CTC pushes each message as it arrives and finishes processing. There are some optimizations built into the producer libraries and destinations themselves might have some restrictions.

Currently, for...

Messages will be pushed at least every 100ms

or if the combined size of the batch reaches 256KB

or number of messages in batch reaches 500.

Compression

For Kafka, compression can be controlled using compression.type property. The message size is governed by broker configuration for the respective cluster. There is no schema change for compressed vs uncompressed messages when using Kafka.

Compression is enabled for messages that exceed the SQS or Kinesis default size limits respectively. SQS by default supports a maximum message size of 256kb, and Kinesis supports a maximum message size of 1MB. To overcome this message size limitation, CTC will perform message compression if necessary, which will require clients to decompress the messages to process them. Note messages that don’t exceed the size limits are not compressed. The messages are compressed based on ZLIB compression library algorithm and then Base64 encoded. ‘UTF-8’ character set is used for character encoding.

Steps to decompress and process a compressed message:

  1. Read the message from SQS or Kinesis.
  2. Convert into a JSON Object.
  3. Read the property “compressedMessage”.
  4. If the property “compressedMessage” is not null, then it is a compressed message otherwise it is an uncompressed message.
  5. For compressed message, the length of the message before compression can be read from property “uncompressedMessageSize”.
  6. The compressed message content first needs to be decoded with Base64 decoder and then decompressed using ZLIB compression library algorithm.
  7. Once the message is decompressed and converted into a string using ‘UTF-8’ character set, it gives the actual message.

Compressed Message Schema

{
  "version": "type: string",
 
  // meta information about the device message.
  "header": {
    "deviceIdType": "type: string",
    "deviceId": "type: string",
    "messageType": "type: string; description: an enumeration type like [EVENT_REPORT, USER, APPLICATION, ID_REPORT, EXTENDED_ID_REPORT, DEVICE_COMMAND, AEMP ...]",
    "lmdirectMessageType": "type: int; description: integer value for the message type per LMDirect protocol spec",
    "messageSequenceNumber": "type: int; description: the sequence number of the message",
    "messageTime": "type: long",
    "messageReceivedTime": "type: long",
    "messageUuid": "type:string; description: the message UUID",
    "rawDeviceHexMessage": "type: string",
    "optionExtensions": {
	   "vin": "string",
	   "esn": "string"
    },
	"deviceAirId": "type: string",
	"enriched": "type: boolean",
      "deviceEsn": "type: string"
  },
     
     // compression attributes, only visible for compressed messages
    "uncompressedMessageSize": "type: integer; description: integer value for the message size before compression",

  "compressedMessage": "type:string; description: the compressed message which holds the entire actual message in compressed format"

}

Uncompressed Message Schema

{
  "version": "type: string",
 
  // meta information about the device message.
  "header": {
    "deviceIdType": "type: string",
    "deviceId": "type: string",
         "mobileId": "type: string",
         "mobileIdTypeString": "type: string",
    "messageType": "type: string; description: an enumeration type like [EVENT_REPORT, USER, APPLICATION, ID_REPORT, EXTENDED_ID_REPORT, DEVICE_COMMAND, AEMP ...]",
    "lmdirectMessageType": "type: int; description: integer value for the message type per LMDirect protocol spec",
    "messageSequenceNumber": "type: int; description: the sequence number of the message",
    "messageTime": "type: long",
    "messageReceivedTime": "type: long",
    "messageUuid": "type:string; description: the message UUID",
    "rawDeviceHexMessage": "type: string",
    "optionExtensions": {
	   "vin": "string",
	   "esn": "string"
    },
	"deviceAirId": "type: string",
	"enriched": "type: boolean",
      "deviceEsn": "type: string"
  },

  // entity associations
  "associations": {
    "device": {
      "href": "type:string",
      "rel": "string",
      "status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
      "title": "type:string; generally the name of the resource this link is for"
    },
 
    "account": {
      "href": "type:string",
      "rel": "string",
      "status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
      "title": "type:string; generally the name of the resource this link is for"
    },
 
    "asset": {
      "link": {
        "href": "type:string",
        "rel": "string",
        "status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
        "title": "type:string; generally the name of the resource this link is for"
      },
      "vin": "type: string",
      "category": "type:string",
      "type": "type: string",
      "externalId": "type: string",
      "route": {
        "href": "type:string",
        "rel": "string",
        "status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
        "title": "type:string; generally the name of the resource this link is for"
      },
 
      "operators": [{
        "href": "type:string",
        "rel": "string",
        "status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
        "title": "type:string; generally the name of the resource this link is for",
        "category": "type:string",
        "type": "type:string"
        "externalId": "type:string"
}]
    },
 
    "ioProfile": {
      "href": "type:string",
      "rel": "string",
      "status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
      "title": "type:string; generally the name of the resource this link is for"
    },
 
    "pegBehavior": {
      "href": "type:string",
      "rel": "string",
      "status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
      "title": "type:string; generally the name of the resource this link is for"
    },
	
	"reportingDevice": {
      "href": "type:string",
      "rel": "string",
      "status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
      "title": "type:string; generally the name of the resource this link is for"
    },       
          "groups": [{
        "href": "type:string",
        "rel": "string",
        "status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
        "title": "type:string; generally the name of the resource this link is for"
      }]

  },
 
  "content": {
    "created": "type: date",
    // device state info.
    "gps": {
      "timeOfFix": "type: datetime",
      "latitude":"type: double",
      "longitude": "type: double",
      "altitude": { "units": "string", "value": "string"},
      "hdop": "type: double",
      "heading": "type: int",
      "speed": { "units": "string", "value": "string"},
      "satellites": "type: int",
      "computedFixStatus": "type: boolean",  /* derived value from the gpsFixStatus bitmap field with some internal algorithm */
      "fixStatus": {
        "predicted": "type: boolean",
        "differentiallyCorrected": "type: boolean",
        "lastKnown": "type: boolean",
        "invalidFix": "type: boolean",
        "twoDFix": "type: boolean",
        "historic": "type: boolean",
        "invalidTime": "type: boolean"
      },
      "antennaStatus": "type: boolean",   // taken from the gpsAntennaStatus field from the commGpsSatus field
      "receiverTracking": "type: boolean", // taken from the gpsAntennaStatus field from the commGpsSatus field
      "receiverSeftTest": "type: boolean" // LMU32 only; refer to the 2017 version of LMDirect protocol specification page 146
    },
 
    "wirelessModem": {
      "carrier": "type: int",
      "rssi": { "units": "type: string", "value": "type: string" },
      "available": "type: boolean",
      "networkService": "type: boolean",
      "dataService": "type: boolean",
      "connected": "type: boolean",
      "voiceCallIsActive": "type: boolean",
      "roaming": "type: boolean",
      "networkTechnology": "type: string" // 2G, 3G, LTE, Reserved
    },
 
    "otaUpdateStatus": "type: boolean", // LMU32 only; refer to the 2017 version of LMDirect protocol specification, page 146
 
    "inputs": {
      // key value pairs
      "ignition": "value",
      "input pin#2": "value",
      "input pin#3": "value",
      "input pin#4": "value",
      "input pin#5": "value",
      "input pin#6": "value",
      "input pin#7": "value",
      "value": "type: string",
      "workingIdle": "value"
    },
       
    // common enrichments
    "location": {  
      "address1": "type: string",
      "address2": "type: string",
      "addressLatitude": "type: double",
      "addressLongitude": "type: double",
      "street": "type: string", 
      "city": "type: string",
      "county": "type: string",
      "stateProvinceCd": "type: string",
      "state": "type: string",
      "postalCode": "type: string",
      "country": "type: string",
      "crossStreet": "type: string",
      "crossStreetDistance": "type: double",
      "postedSpeedLimit": "type: int",
      "roadTypeCode": "type: string",
      "speedLimitUnits": "type: string",
      "tollRoadFlag": "type: string",
      "timeZoneOffset": "type: string",
      "timeZoneId": "type: string"
    },
 
    // Server Side Geozone Or LandMark
    "serverGeozones": [{
      "id": "type: int",
      "name": "type: string",
      "description": "type: string"
    }],
 
    "accumulators ": [{
      "label": "type: string",
      "value": "type: string",
      "index": "type: string",
      "units": "type: string",
      "type" : "type: string",
            "multi": [{
"value": "type: string",
"type" : "type: string", 
"units": "type: string"
       }]
    }],
 
    "weather": {
      "skyCondition": "type: string",
      "weatherIcon": "type: integer",
      "precipitation": "type: string",
      "severity": "type: integer",
      "iconCodeExtend": "type: integer"
    },
 
    // message type-specific content and enrichments
    "EVENT_REPORT": {
      "eventCode": "type: string",
      "eventLabel": "type: string",
	  "engineHourOffset": "type: long",
	  "odometerOffset": "type: float",
       
      // The following are additional information derived from the accumulators.
      "inputChanged": { // the list of inputs that change state; the value is the current value
       // key value pairs
        "input#1": "value",
        "input#2": "value",
        ...
      },
      "vbusIndicators": {
        "_comment": "VbusIndicator 0; only this being exposed to AO, AE",
        "ignitionStatus": "type: boolean",
        "milStatus": "type: boolean",
        "airbagDashIndicator": "type: boolean",
        "absDashIndicator": "type: boolean",
        "ptoStatus": "type: boolean",
        "seatBeltFastened": "type: boolean",
        "brakePedalPressed": "type: boolean",
        "absActiveLamp": "type: boolean",
        "cruiseControlStatus": "type: boolean",
        "oilPressureLamp": "type: boolean",
        "parkBrakeLight": "type: boolean",
        "coolantHotLight": "type: boolean",
        "tpmsStatus": "type: boolean",
       
        "_comment": "VbusIndicator 1",
        "misfireMonitor": "type: boolean",
        "fuelSystemMonitor": "type: boolean",
        "comprehensiveComponentMonitor": "type: boolean",
        "catalystMonitor": "type: boolean",
        "heatedCatalystMonitor": "type: boolean",
        "evaporativeSystemMonitor": "type: boolean",
        "secondaryAirSystemMonitor": "type: boolean",
        "acSystemRefrigerantMonitor": "type: boolean",
        "oxygenSensorMonitor": "type: boolean",
        "oxygenSensorHeatedMonitor": "type: boolean",
        "egrSystemMonitor": "type: boolean",
        "o2SensorCircuitNoActivity": "type: boolean",
        "o2SensorHeaterCircuitMalfunction": "type: boolean",
        "ho2SHeaterControlMalfunction": "type: boolean",
        "ho2SHeaterResistanceMalfunction": "type: boolean"
      },
      "acceleration": {
        "label": "type: string",
        "accelerationMagnitude": {
			"units": "type: string",
			"value": "type: string" 
		},
        "duration": {
			"units": "type: string",
			"value": "type: string" 
		},
        "startingSpeed": {
			"units": "type: string",
			"value": "type: string" 
		},
        "calibration": {
			"units": "type: string",
			"value": "type: string" 
		}
      },
      "geoZoneEvents": [{
        "zoneId": "type: int",
        "zoneName": "type: string",
        "pegIndex": "type: int",
        "eventType": "type: string enum ['ENTRY', 'EXIT']",
        "noChange": "type: boolean" //"If TRUE then it indicates the previous and current geozone state bitmaps are the same"
      }],
      "speedEvent": {
        "duration": {
			"units": "type: string",
			"value": "type: string" 
		},
        "maxSpeed": {
			"units": "type: string",
			"value": "type: string" 
		}
      },
"electedValues": {
        "speed": {
			"units": "type: string",
			"value": "type: string" 
		},
        "odometer": {
			"units": "type: string",
			"value": "type: string" 
		},
   "engineHour": {
			"units": "type: string",
			"value": "type: string" 
		}
      }
    },
 
    "USER": {
      "userMessageId": "type: int",
      "userMessageRoute": "type: int",
      "userMessageLength": "type: int",
      "userMessage": "type: string",
      "rawUserHexMessage": "type: string"
    },
 
    "APPLICATION": {
	  "@class":"APPLICATION",
	  "type": "type: string", // the type should be one of the following; based on the type value, only one of the following element should follow.[DTC,VEHICLE_BUS_CAPABILITIES,MOTION_LOG,SELF_DESCRIBING_JPOD,JPOD2DTC_REPORT,JBUS,VIDEO_EVET]
	  "appType: "type: string",
      "rawAppHexMessage": "type: string",
      "appMessageTypeId": "type: int" // LMDirect application message sub-type.
      "appMessageType": "type: string eum", // depend on the type, once of the following specific message content should be present.
      "appMessageLength": "type: string",
      "appMessageMessage": "type: Array[string]",
 
      "DTC": { //type: 132, VBus DTC Report
	    "@class": "DTC",
        "codes": [{
          "code": "type: string",
          "description": "type: string",
          "type": "type: integer",
          "typeDescription": "type: string"
        }],
        "reportTypeCode": "type: int",
        "reportTypeDescription": "type: string"
      },
 
      "VEHICLE_BUS_CAPABILITIES": { // type: 131, Vehicle ID Report
	    "@class": "VEHICLE_BUS_CAPABILITIES",
        "absActiveLampIndicator": "type: boolean",
        "absDashIndicator": "type: boolean",
        "acSystemRefrigerantMonitor": "type: boolean",
        "airBagDashIndicator": "type: boolean",
        "ambientAirTempSupported": "type: boolean",
        "barometricPressureSupported": "type: boolean",
        "batteryVoltageSupported": "type: boolean",
        "brakeIndicatorLightStatus": "type: boolean",
        "brakeSwitchStatusIndicator": "type: boolean",
        "calculatedFuelUsageSupported": "type: boolean",
        "canBusErrorTypeSupported": "type: boolean",
        "canBusModeSupported": "type: boolean",
        "canRecSupported": "type: boolean",
        "canTecSupported": "type: boolean",
        "catalystMonitor": "type: boolean",
        "comprehensiveComponentMonitor": "type: boolean",
        "coolantHotLightStatus": "type: boolean",
        "created": "type: string",
        "cruiseControlStatus": "type: boolean",
        "dtcCountSupported": "type: boolean",
        "egrSystemMonitor": "type: boolean",
        "engine": "type: string",
        "engineCoolantTemperatureSupported": "type: boolean",
        "engineOilTempSupported": "type: boolean",
        "engineRunTimeSupported": "type: boolean",
        "engineSize": "type: string",
        "engineSpeedSupported": "type: boolean",
        "engineStateSupported": "type: boolean",
        "ho2SHeaterControlMalfunction": "type: boolean",
        "ho2SHeaterResistanceMalfunction": "type: boolean",
        "evaporativeSystemMonitor": "type: boolean",
        "fuelEconomySupported": "type: boolean",
        "fuelLevelRemaining3030Supported": "type: boolean",
        "fuelLevelRemainingSupported": "type: boolean",
        "fuelLevelSupported": "type: boolean",
        "fuelRateSupported": "type: boolean",
        "fuelSystemMonitorStatus": "type: boolean",
        "fuelType": "type: string",
        "heatedCatalystMonitor": "type: boolean",
        "ignitionStatus": "type: boolean",
        "maintenanceRequired": "type: boolean",
        "make": "type: string",
        "manufacturer": "type: string",
        "messageUuid": "type: string",
        "milStatus": "type: boolean",
        "misfireMonitorStatus": "type: boolean",
        "model": "type: string",
        "o2SensorCircuitNoActivity": "type: boolean",
        "o2SensorHeaterCircuitMalfunction": "type: boolean",
        "obdProtocol": "type: string",
        "odometerSupported": "type: boolean",
        "oilPressureLampIndicator": "type: boolean",
        "oxygenSensorHeatedMonitor": "type: boolean",
        "oxygenSensorMonitor": "type: boolean",
        "ptoStatus": "type: boolean",
        "seatBeltFastenedIndicator": "type: boolean",
        "secondaryAirSystemMonitor": "type: boolean",
        "serviceIntervalDaysRemainingSupported": "type: boolean",
        "serviceIntervalInspectionDistanceSupported": "type: boolean",
        "serviceIntervalOilDaysSupported": "type: boolean",
        "serviceIntervalOilDistanceSupported": "type: boolean",
        "throttlePositionSupported": "type: boolean",
        "transmissionGearSupported": "type: boolean",
        "trim": "type: string",
        "tripFuelConsumptionSupported": "type: boolean",
        "tripOdometerSupported": "type: boolean",
        "turnSignalStatusSupported": "type: boolean",
        "vehicleSpeedSupported": "type: boolean",
        "vinRegion": "type: string",
        "year": "type: string"
      },
 
      "MOTION_LOG": {
	    "@class": "MOTION_LOG",
        "recordType": "type: int",
        "info": [{ // type: 122, Motion Log Report
          "forwardAcceleration": "type: string",
          "lateralAcceleration": "type: string",
          "verticalAcceleration": "type: string",
          "systemTick": "type: int",
          "accelerationAmplitude": "type: string",
          "vehicleBusRPM": "type: string",
          "vehicleBusSpeed": "type: string"
        }]
      },
 
      "SELF_DESCRIBING_JPOD": { // type: 142, Vbus group data Report; DTC2Report type in RS swagger.
	    "@class": "SELF_DESCRIBING_JPOD",
        "dataOptionsValue": "type: int",
        "sizeFieldIncluded": "type: boolean",
        "parameterDataSourceFieldIncluded": "type: boolean",
        "parameterSourceAddressFieldIncluded": "type: boolean",
        "paramaterIDFieldIncluded": "type: boolean",
        "dataPostionFieldIncluded": "type: boolean",
        "reportID": "type: int",
        "machineState": "type: int",
        "parameterGroup": "type: int",
        "parameterList": [{
          "dataReportParameter":{
            "parameterSize": "type: int",
            "parameterDataSourceValue": "type: int",
            "dataSourceDesc": "type: string",
            "parameterSourceAddressValue": "type: int",
            "sourceAddressDesc": "type: string",
            "responseSourceAddress": "type: string",
            "parameterIDValue": "type: int",
            "pgnLabel": "type: string",
            "dataPosition": "type: int",
            "dataPositionDesc": "type: string",
            "parameterBitCount": "type: string",
            "parameterValueHexValue": "type: string",
            "spnDetail": {
              "label": "type: string",
              "value": "type: string",
              "units": "type: string"
            }
          }
        }]
      },
   
      "JPOD2DTC_REPORT": [{ // type: 138, Vbus Diagnostics Report
	    "@class": "JPOD2DTC_REPORT",
        "typeHexValue": "type: string",
        "hasSourceAddress": "type: boolean",
        "unreportedDTCsOnly": "type: boolean",
        "length": "type: int",
        "lampHexValue": "type: string",
        "flashLampHexValue": "type: string",
        "codes": [{
          "sourceAddress": "type: int",
          "spn": "type: int",
          "fmi": "type: int",
          "conversionMethod": "type: int",
          "occurrenceCount": "type: int",
          "spnDescription": "type: string",
          "fmiDescription": "type: string"
        }]
      }],
 
      "JBUS": { // type: 130, VBUS Data Report
	    "@class":"JBUS",
        "type": "type: string", // the type should be one of the following; based on the type value, only one of the following element should follow. [EVENT, DTC1939_EVENT, DTC1708_EVENT, DAILY_REPORT, CONSTRUCTION_DAILY_REPORT, CONSTRUCTION_DAILY_USAGE_REPORT, CONSTRUCTION_HOURLY_REPORT, HYDRAULIC_REPORT, FAULT_REPORT, DISCOVERY_REPORT, HOURLY_REPORT]
        "EVENT": [{ // the current JbusEvent
          "batteryVoltage": "type: double",
          "engineCoolantTemperature": "type: int",
          "engineOilTemperature": "type: double",
          "engineSpeed": "type: double",
          "highResolutionOdometer": "type: double",
          "jbusProtocol": "type: string",
          "odometer": "type: double",
          "seatBeltUsed": "type: boo",
          "switchedBatteryVoltage": "type: double",
          "totalEngineHours": "type: double",
          "totalFuel": "type: double",
          "totalIdleFuel": "type: double",
          "totalIdleHours": "type: double",
          "vin": "type: string"
         }],
        "DTC1939_EVENT": {
			"@class": "DTC1939_EVENT",
			"sourceAddress": "type: int",
			"jbusDtc1939ProtocolEvents":[{
				"jbusDtc1939Protocol": {
					"spn": "type: int",
					"fmi": "type: int",
					"oc": "type: int",
					"spnDescription": "type: string",
					"fmiDescription": "type: string"
				}
			}]
		},
        "DTC1708_EVENT": {
			"@class": "DTC1708_EVENT",
			"sourceAddress": "type: int",
			"jbusDtc1708ProtocolEvents":[{
				"jbusDtc1708Protocol": {
					"fmi": "type: int",
					"pid": "type: int",
					"oc": "type: int",
					"csf": "type: boolean",
					"dct": "type: boolean",
					"lci": "type: boolean"
				}
			}]
		},
        "DAILY_REPORT": {
			"@class": "DAILY_REPORT",
			"engineTotalHours": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineIdleHours": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineIdleFuel": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineOilLevel": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineCoolantLevel": {
				"value": "type: string",
				"units": "type: string"
			},
			"noxTankLevel": {
				"value": "type: string",
				"units": "type: string"
			}
		},
        "DTC_MESSAGE": {},
        "CONSTRUCTION_DAILY_REPORT": {
			"@class": "CONSTRUCTION_DAILY_REPORT",
			"machineState":{
				"engineStatus": "type: boolean",
				"ptoStatus": "type: boolean",
				"moving": "type: boolean",
				"j1708MsgRecvd": "type: boolean",
				"j1939MsgRecvd": "type: boolean"
			},
			"engineTotalFuelUsed": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgEngineFuelRate": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgActualEngineTorque": {
				"value": "type: string",
				"units": "type: string"
			},
			"minEngineSpeed": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxEngineSpeed": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgEngineSpeed": {
				"value": "type: string",
				"units": "type: string"
			},
			"minDEFConcentration": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgDEFConcentration": {
				"value": "type: string",
				"units": "type: string"
			},
			"minDEFTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxDEFTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgDEFTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"minEngineOilPressure": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxEngineOilPressure": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgEngineOilPressure": {
				"value": "type: string",
				"units": "type: string"
			},
			"minEngineOilTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxEngineOilTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgEngineOilTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"minEngineCoolantTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxEngineCoolantTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgEngineCoolantTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"minEngineFuelTempr1": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxEngineFuelTempr1": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgEngineFuelTempr1": {
				"value": "type: string",
				"units": "type: string"
			},
			"minAmbientAirTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxAmbientAirTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgAmbientAirTempr": {
				"value": "type: string",
				"units": "type: string"
			},
			"minAuxiliaryTempr1": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxAuxiliaryTempr1": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgAuxiliaryTempr1": {
				"value": "type: string",
				"units": "type: string"
			}
		},
        "CONSTRUCTION_DAILY_USAGE_REPORT": {
			"@class": "CONSTRUCTION_DAILY_USAGE_REPORT",
			"machineState":{
				"engineStatus": "type: boolean",
				"ptoStatus": "type: boolean",
				"moving": "type: boolean",
				"j1708MsgRecvd": "type: boolean",
				"j1939MsgRecvd": "type: boolean"
			}
		},
        "CONSTRUCTION_HOURLY_REPORT": {
			"@class": "CONSTRUCTION_HOURLY_REPORT",
			"machineState":{
				"engineStatus": "type: boolean",
				"ptoStatus": "type: boolean",
				"moving": "type: boolean",
				"j1708MsgRecvd": "type: boolean",
				"j1939MsgRecvd": "type: boolean"
			},
			"totalEngineHours": {
				"value": "type: string",
				"units": "type: string"
			},
			"defOrNoxTankLevel": {
				"value": "type: string",
				"units": "type: string"
			},
			"fuelTankLevel1": {
				"value": "type: string",
				"units": "type: string"
			}
		},
        "HYDRAULIC_REPORT": {
			"@class": "HYDRAULIC_REPORT",
			"machineState":{
				"engineStatus": "type: boolean",
				"ptoStatus": "type: boolean",
				"moving": "type: boolean",
				"j1708MsgRecvd": "type: boolean",
				"j1939MsgRecvd": "type: boolean"
			},
			"minHydraulicChargePressure": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxHydraulicChargePressure": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgHydraulicChargePressure": {
				"value": "type: string",
				"units": "type: string"
			},
			"minHydraulicOilTemperature": {
				"value": "type: string",
				"units": "type: string"
			},
			"maxHydraulicOilTemperature": {
				"value": "type: string",
				"units": "type: string"
			},
			"avgHydraulicOilTemperature": {
				"value": "type: string",
				"units": "type: string"
			}
		},
        "FAULT_REPORT": {
			"@class": "FAULT_REPORT",
			"machineState":{
				"engineStatus": "type: boolean",
				"ptoStatus": "type: boolean",
				"moving": "type: boolean",
				"j1708MsgRecvd": "type: boolean",
				"j1939MsgRecvd": "type: boolean"
			},
			"sourceAddress": "type: int",
			"faultDevice": "type: int",
			"function": "type: int",
			"failure": "type: int"
		},
        "DISCOVERY_REPORT": {
			"@class": "DISCOVERY_REPORT",
			"machineState":{
				"engineStatus": "type: boolean",
				"ptoStatus": "type: boolean",
				"moving": "type: boolean",
				"j1708MsgRecvd": "type: boolean",
				"j1939MsgRecvd": "type: boolean"
			},
			"vehicleSpeedFound": "type: boolean",
			"odometerFound": "type: boolean",
			"totalFuelFound": "type: boolean",
			"vinFound": "type: boolean",
			"batteryVoltageSourcesFound": "type: boolean",
			"discoveryReportSourcesFound1": "type: boolean",
			"discoveryReportSourcesFound2": "type: boolean",
			"discoveryReportSourcesFound3": "type: boolean",
			"discoveryReportSourcesFound4": "type: boolean",
			"fuelTankSourcesFound": "type: boolean",
			"averageFuelTankSourcesFound": "type: boolean",
			"ptoSourcesFound": "type: boolean",
			"engineTorqueSourcesFound": "type: boolean",
			"engineThrottleSourcesFound": "type: boolean"
		},
        "HOURLY_REPORT": {
			"@class": "HOURLY_REPORT",
			"engineCoolantTemperature": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineOilTemperature": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineOilPressure": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineCrankcasePressure": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineCoolantPressure": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineBatteryVoltage": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineFuelTankLevel1": {
				"value": "type: string",
				"units": "type: string"
			},
			"engineFuelTankLevel2": {
				"value": "type: string",
				"units": "type: string"
			},
			"transmissionOilTemperature": {
				"value": "type: string",
				"units": "type: string"
			},
			"averageFuelEconomy": {
				"value": "type: string",
				"units": "type: string"
			}
		}
      },
  "VIDEO_EVENT": { // type: 70, Video Event
	  "@class":"VIDEO_EVENT",
        "videoDetail": {
		  "messageType": "type: string", //type should be one of the following: DVR_VIDEO,EDVR_VIDEO,VIDEO"
		  "videoLink": "type: string",
		  "tripId": "type: string",
		  "fleetId": "type: string",
		  "driverId": "type: string",
		  "eventIndex": "type: int",
		  "startTimeUTC": "type: long",
		  "endTimeUTC": "type: long",
		  "videoQuality": "type: int",
		  "videoResolution": "type: string",
		  "unitSystem": "type: string",
		  "enableTimeLapse": "type: boolean",
		  "timelapseCaptureInterval": "type: int",
		  "timelapseDisplayInterval": "type: int",
		  "uploadRequestId": "type: string",
		  "requestedOn": "type: long",
		  "requestType": "type: string",
		  "videoRequestId": "type: string",
		  "hlth": "type: int",
		  "eventCode": "type: int"
		},
		"avlEvent": {
		  "messageUuid": "type: string",
		     "eventCode": "type: string",
		  "eventLabel": "type: string",
		  "eventTime": "type: long"
		}
	  }
    },
    "AEMP": {
      "equipmentHeader": {
        "make": "type: string",
        "model": "type: string",
        "equipmentID": "type: string",
        "serialNumber": "type: string"
      },
      "location": {
        "datetime": "type: date",
        "latitude": "type: double",
        "longitude": "type: double",
        "altitude": {
          "meters": "type: double",
          "feet": "type: double",
          "inches": "type: double"
        },
        "altitudeUnits": "type: string"
      },
      "cumulativeOperatingHours": {
        "dateTime": "type: date",
        "hour": "type: string"
      },
      "distance": {
        "datetime": "type: date",
        "odometerUnits": "type: string",
        "odometer": "type: string"     
      },
      "fuelUsed":{
        "datetime": "type: date",
        "fuelUnits": "type: string",
        "fuelConsumed": "type: double"
      },
      "fuelUsedLast24": {
        "datetime": "type: date",
        "fuelUnits": "type: string",
        "fuelConsumed": "type: double"
      }
    },
 
    "DEVICE_COMMAND": {
      "created": "type: date",
      "UUID": "type: String",
      "status": "type: string enum(CREATED, QUEUED, SENT, COMPLETED, UNDELIVERABLE, EXPIRED_TIME, EXPIRED_ATTEMPTS, CANCELLED, CANCELLED_COMPLETED",
      "sequenceId": "type: integer",
      "response": "type: enum(AckNakResponse, LocateReportResponse, ParameterResponse)",
      "retries": "type: integer",
      "queuedFor": "type: date",
      "sentOn": "type: date",
      "completedOn": "type: Date",
      "identifiers": [{
        "identifier": "type: string",
        "type": "type: string enum(id, esn, iccid, imei, mdn, meid, min, serialNumber)"
      }],
      "command": {
        "commandType": "type: string enum(LocateReport, PegAction, SetAndEnableZone, SetGeoZone, IdReport, ParameterRead, ParameterWrite, Reboot, OtaDownload, UnitRequest, SendApplicationMessage, SendUserMessage, SciDeviceSettings, DownloadFirmware)",
        "name": "type: string",
        "description": "type: string",
        "retryCapable": "type: boolean",
        "maxRetries": "type: integer",
        "ttlSec": "type: integer",
        "parameters": "type: a set of key/value pairs"
      },
      "batchId": "type: string",
      "batchSeq": "type: integer",
      "boolean autoRetry": "type: boolean (default 'true')"
    },
 
    "LOCO_EVENT": {
      "batchId": "type: string",
      "cep": "type: integer",
      "type": "type: integer",
      "status": {
        "externalPower": "type: boolean",
        "charging": "type: boolean",
        "wakeupType": "type: integer",
        "signal": "type: integer",
        "gpsfailcount": "type: integer",
        "tamper": "type: integer",
        "powerDown": "type: boolean",
        "orientation": {
          "x": "type: double",
          "y": "type: double",
          "z": "type: double"
                     }
      },
      "states": {
        "moving": "type: boolean",
        "tamper": "type: boolean",                           
        "ignition": "type: boolean",
        "paired": "type: boolean"
      },
      "tagReports": [
        "batchId": "type: string",
        "cep": "type: integer",
        "type": "type: integer",
        "nextUpdateTime": "type: date",
        "model": "type: string",
        "status": {
           "seqNum": "type: long",
           "externalPower": "type: boolean",
           "charging": "type: boolean",
           "wakeupType": "type: integer",
           "lastUpdate": "type: date"
        },
        "master": "type: String",
        "event": {
          "type": "type:  enum(impact, drop, tip)",
          "G": "type: double",
          "angle": "type: double"
        },
        "rssi": {
          "units": "type: string",
          "value": "type: string"
        },
        "accumulators": [{
          "label": "type: string",
          "value": "type: string",
          "index": "type: string",
          "units": "type: string",
          "type": "type: string"
        }],
        "timeSeriesData": [{
          "label": "type: string",
          "value": "type: string",
          "index": "type: string",
          "units": "type: string",
          "type": "type: string",
	    "time": "type: date"
        }]
      ],
      "slaveList": "type: list of string",
      "nextUpdateTime": "type: date",
      "live": "type: boolean",
      "slaveDetails": "type: list of integer",
      "model": "type: string",
               "sensorEvent": "type: string",
      "sensorEventTime": "type: date",
      "cells": [{
        "mcc": "type: integer",
        "mnc": "type: integer",
        "cellId": "type: integer",
        "lac": "type: integer",
        "rssi": "type: integer"
      }],
      "wifi": [{
        "mac": "type: long",
        "rssi": "type: integer",
        "ssid": "type: string"
      }],
      "settingsChanged": "type: boolean",
      "wifiProbe": {
         "mac": "type: integer",
         "locations": "type: list of double",
         "ssid": "type: integer"
      },
      "gpsTrack": {
        "period": "type: integer",
        "points": "type: list of double"
      },
      "event": {
        "type": "type:  enum(impact, drop, tip)",
        "G": "type: double",
        "angle": "type: double"
      },
      "timeSeriesData": [{
        "label": "type: string",
        "value": "type: string",
        "index": "type: string",
        "units": "type: string",
        "type": "type: string",
	  "time": "type: date"
      }]
    },
	
	"LMU_GATEWAY": {
		"@class": "LMU_GATEWAY",
		"reportSequenceNumber": "type: int",
		"messageNumber": "type: int",
		"totalNumberOfMsgs": "type: int",
		"moving": "type: boolean",
		"reportTime": "type: date",
		"tagList": ["type: String"],
		"tagRecords": [{
			"verbose": "type: boolean",
			"macAddress": "type: string",
			"serialNumber": "type: string",
			"rssi": "type: int",
			"age": "type: int",
			"inAccountHierarchy": "type: boolean",
			"batchId": "type: string",
			"device": {
				"href": "type:string",
				"rel": "type:string",
				"status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
				"title": "type:string; generally the name of the resource this link is for"
			},
			"account": {
				"href": "type:string",
				"rel": "type:string",
				"status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
				"title": "type:string; generally the name of the resource this link is for"
			},
			"asset": {
				"link": {
					"href": "type:string",
					"rel": "type:string",
					"status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
					"title": "type:string; generally the name of the resource this link is for"
				}
			},
			"reportingDevice": {
				"href": "type:string",
				"rel": "type:string",
				"status": "type: string enum, ['Enabled', 'Disabled', 'Suspended', 'Deleted']",
				"title": "type:string; generally the name of the resource this link is for"
			}
		}],
		"deviceId": "type: long",
		"batchId": "type: string"
	},
    "TRACKER": {
        "@class": "TRACKER",                             
		"eventCode": "type:string",
		"eventLabel": "type:string"
	},
     "VIDEO_EVENT": {
        "@class": "VIDEO_EVENT",                             
		"eventCode": "type:string",
		"eventLabel": "type:string"
	}
  }
}
© 2025 CalAmp