Page 53 of 55
King Pigeon Hi-Tech. Co., Ltd.
Ver 1.3
GSM/SMS/GPRS/3G/4G
Cellular IoT Gateway
4.MQTT account: The account of device publishing the topic to the broker (King Pigeon cloud 2.0 default account:
MQTT)
5.MQTT password: The account password of device publishing the topic to the broker ( King Pigeon cloud 2.0
default account password:MQTTPW)
2)Topic Publish Format
Topic
:
MQTT Device ID
Payload content is json data format
{
"sensorDatas":
[
{
"value":"10.0",
//Data type and value
"flag":"AIN1"
//flag
},
{
"lat":39.9,
"lng":116.3,
"flag":""
},
{
"switcher":"1",
"flag":"DI1"
},
{
"str":"1",
"flag":"REG20014"
}
]
}
Note:
Each I/O point must contain three types of information when the device publish message: add Time, data
type and value, flag;
/ / Data type and value: according to the type is divided into the following
1. The numeric character is "value" followed by: "data value"
2. The positioning character is "lat" (longitude) followed by: "longitude value"
"lng" (latitude) is followed by: "latitude value"
3. The switch character is "switcher" followed by: "data value"
4. The string character is "str" followed by: "data value"
/ /Flag: the character is "flag" followed by " flag"
For example KingPigeon Cloud 2.0 , after the user subscribes to the device, each I/O port has a fixed flag when
the device issues a message. After the flag ID is filled in, can read and write the value. The I/O port flag of the
device on the cloud platform is default and no need to be processed.
Each I/O port has a fixed flag when the
device publish a message. The specific flags are as follows:
Device own I/O Port
1) Temperature: The flag is "TEMP" and the data type is 16-bit type. The actual value is 2 decimal places,
platform has been mapped.