Ir para o conteúdo principal
CloudStudio

Update RSSI Status and Battery Level

Reporting a Device's RSSI Status and Battery Level

This method keeps no history: the platform only stores and shows the latest report. If a first request reports three batteries and a second one reports only one, the device is assumed to have a single battery from then on. The same applies to RSSI. Sending empty arrays means there is no battery or RSSI data, and anything reported before is cleared.

The MQTT integration of RSSI status and battery level uses the following structure:

{
	"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"deviceID": 1,
	"battery": [
		{
			"type": 2,
			"percentage": 30,
			"voltage": 3.5
		},
		{
			"type": 3,
			"percentage": 100,
			"voltage": 5
		}
	],
	"rssi": [
		{
			"type": 2,
			"quality": 100,
			"strength": -40
		}
	],
	"mqttMethod": "UpdateDeviceStatus",
	"mqttRID": "tkrs34"
}

More information about requests and topics in the section on MQTT integration

Parameters

NameDescriptionData Type
accessTokenAccess token with permissions to update endpoint information. See this page for more information.text
deviceIDUnique device identifier or device address in format [deviceAddress] (e.g.: [device-1234]). These values can be found on the device management page.number
batteryList with the status of each of the device's batteries. You can send one or several. The properties of this parameter are described below.array
rssiList with the status of each of the device's wireless connections. You can send one or several. The properties of this parameter are described below.array
mqttMethodService method to call, in this case UpdateDeviceStatus.text
mqttRIDOptional request identifier, used to get a confirmation response.text

“battery” array parameter

Each element of this array must report at least “percentage” or “voltage”. Type is required.

NameDescriptionData Type
typeType of the battery being reported. Allowed types: 0 = unknown (automatically changed to 1); 1 = default; 2 = primary; 3 = secondary; 4 = backup. A type cannot repeat within the same array.number
percentageRemaining battery percentage, as a number.number
voltageCurrent battery voltage, as a number.number

“rssi” array parameter

Each element of this array must report at least “quality” or “strength”. Type is required.

NameDescriptionData Type
typeWireless technology whose RSSI is being reported. Allowed values: 0 = unknown (automatically changed to 1); 1 = default; 2 = WiFi; 3 = LoRaWAN; 4 = cellular (2G/3G/4G/5G/Cat-M/NB-IoT, etc.); 5 = ZigBee; 6 = custom RF. A type cannot repeat within the same array.number
qualitySignal quality as a number from 0 to 100. If it is omitted but “strength” is sent, it is calculated automatically.number
strengthSignal strength in dBm (negative). A positive value has its sign changed. If it is omitted but “quality” is sent, it is calculated automatically.number

Última atualização em

Nesta página