API
This tutorial is aimed at software integrators who use Gateway as the backend business function.Through this interface, you can obtain the UID, coordinates, power, working status and other information of Gateway, uBeacon and Tag. The data format is JSON. The interfaces include MQTT, UDP, webhook, etc., and support deployment on Ubuntu, Windows, MacOs and other platforms.
1.Data Format:JSON
Location data example::
{
"data": {
"pos": [
-3.2616942,
4.3123593,
1.1999172
], //position:x,y,z
"posNoise": [
0.71,
0.62,
0.03
],//position noise:x,y,z
"time": 575889100, //pos timestamp:x,y,z
"vel": [
-0.08,
0.1,
0
], //velocity:x,y,z
"velNoise": [
0.13,
0.13,
0.01
] //velocity noise:x,y,z
},
"deviceName": "T4", //device name, The only overall situation within the software
"name": "Pos", // message type
"uid": "02084a71676424f9e16d" //device UID
}
2. API Configuration Entry
Open the uBeacon Tool software and follow the steps below to enter the configuration page.
3. MQTT
api.mqtt.address: {ip or domain name}:{port}
api.mqtt.clientId: Client identification, can be empty
api.mqtt.topic: Topic name
4. UDP
api.udp.address: {ip or domain name}:{port}
5. webhook
api.hook.url格式:http://{ip or domain name}:{port}/{custom uri}
http method: POST