Ir para o conteúdo principal
CloudStudio

Location Trackers

Reporting Endpoint Status

The MQTT integration of location trackers uses the following structure:

{
	"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"endpointID": 1,
	"latitude": -13.9957594,
	"longitude": 48.9339384,
	"flags": 0,
	"timestamp": "2021-02-23T14:55:03"
	"mqttMethod": "UpdateLocationTrackerStatus",
	"mqttRID": "tkrs34"
}

Parameters

NameDescriptionData Type
accessTokenAccess token with permissions to update endpoint information. See this page for more information.text
endpointIDUnique endpoint identifier or combination of device address and endpoint address in format [deviceAddress]:endpointAddress (e.g.: [device-1234]:1). These values can be found on the endpoint management page.text
latitudeThe latitude, between -90 and 90. Use a period as the decimal separator.numeric
longitudeThe longitude, between -180 and 180. Use a period as the decimal separator.numeric
flagsExtra information about the position, as an integer that is a bitwise sum. Available flags: 0 = nothing special; 1 = the sensor's position is changing; 2 = the sensor cannot acquire its position; 4 = the sensor is not working properly and the reported position may be wrong; 8 = the reported position has low accuracy. Flags can be combined with OR. For example, a low-accuracy position that is also changing is (8 OR 1) = 9.numeric
timestampOptional value indicating the UTC date and time corresponding to the measurement. The date format must match one of those specified in the date formats section. If the field is omitted, the platform will assume the measurement corresponds to the current date and time.text
mqttMethodService method to call, in this case UpdateLocationTrackerStatus.string
mqttRIDOptional request identifier, used to get a confirmation response.string

Reporting Status in "raw" Format

The endpoint state can be reported as a raw value using the expression converter. This option is convenient when the device is unable to perform conversions and emits values that need to be transformed before being injected into the platform.

Here is an example of a request in raw format:

{
	"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"endpointID": 1,
	"rawData": "-13.9957594,48.933938,0",
	"timestamp": "2021-02-23T14:55:03"
	"mqttMethod": "UpdateLocationTrackerStatusRaw",
	"mqttRID": "RXmp123"
}

Parameters

NameDescriptionData Type
accessTokenAccess token with permissions to update endpoint information. See this page for more information.text
endpointIDUnique endpoint identifier, which can be found on the endpoint management page.numeric
rawDataValue reported by the sensor, as text. Three expressions must be specified in the expression converter. The first must return a numeric value with the latitude, between -90 and 90. The second must return a numeric value with the longitude, between -180 and 180. Use a period as the decimal separator in both. The third must return an integer with the position flags, a bitwise sum: 0 = nothing special; 1 = the sensor's position is changing; 2 = the sensor cannot acquire its position; 4 = the sensor is not working properly and the reported position may be wrong; 8 = the reported position has low accuracy. Flags can be combined with OR, for example (8 OR 1) = 9.text
timestampOptional value indicating the UTC date and time corresponding to the measurement. The date format must match one of those specified in the date formats section. If the field is omitted, the platform will assume the measurement corresponds to the current date and time.text
mqttMethodService method to call, in this case UpdateLocationTrackerStatusRaw.string
mqttRIDOptional request identifier, used to get a confirmation response.string

Última atualização em

Nesta página