Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This guide provides information about how to work with Beacons API. The beacons are necessary for your localization in the twinzo digital twin.

Configuration

To connect beacons with twinzo digital twinDigital Twin, visit the course page and find out, how to set up the beacons:

The main information about how to use twinzo´s twinzo's REST API and how to authorize your access:

Swagger Sector Section

The Swagger Sensors section provides a detailed description of the API for the beacons. For getting data we can use /beacons or /beacons/{id} for specific sectors to get information about sectors.

Image RemovedImage Added

/beacons

  • use for getting a list of beacons in branche

/beacons/{id}

  • get specific beacon’s beacon information according to the id

Example

There are examples for both /beacons and /beacons/{id} calls below. First is the response you get and then the image with the parameters you have to call for the correct answer. The whole request URL: https://api.twinzo.eu/v3.0/beacons / https://api.twinzo.eu/v3.0/beacons/33

/beacons

Code Block
languagejson
[
  {
    "Id": 33,
    "SectorId": 14,
    "BranchId": 7,
    "Mac": "C2:92:1B:23:75:DB",
    "X": 5268.888,
    "Y": 8728.265,
    "Title": "1456",
    "Active": true,
    "TypeId": 23,
    "Position": true,
    "Geofence": false,
    "Cluster": "",
    "LastTimeOnline": 1684749465550,
    "UseGps": false
  },
  {
    "Id": 34,
    "SectorId": 14,
    "BranchId": 7,
    "Mac": "CD:EE:35:05:E5:B8",
    "X": 19267.748,
    "Y": 8405.245,
    "Title": "1507",
    "Active": true,
    "TypeId": 23,
    "Position": true,
    "Geofence": false,
    "Cluster": "",
    "LastTimeOnline": 1684749390564,
    "UseGps": false
  }
]
Image RemovedImage Added

/beacons/{id} (/beacons/33)

Code Block
languagejson
{
  "Id": 33,
  "SectorId": 14,
  "BranchId": 7,
  "Mac": "C2:92:1B:23:75:DB",
  "X": 5268.888,
  "Y": 8728.265,
  "Title": "1456",
  "Active": true,
  "TypeId": 23,
  "Position": true,
  "Geofence": false,
  "Cluster": "",
  "LastTimeOnline": 1684749465550,
  "UseGps": false
}
Image RemovedImage Added

Data Properties

The request answer you get is JSON with the single beacon (one object) or a list of beacons (more objects) in the requested branch. Every object contains 14 parameters.

Id

An integer that represents beacon id.

SectorId

An integer that represents sector id.

BranchId

An integer that represents

Branch

branch id.

Mac

A string that represents the MAC address of the beacon.

X

A float that represents the position on the X-axis in the sector in

millimetres

millimeters (mm).

Y

A float that represents the position on the Y-axis in the sector in

millimetres

millimeters (mm).

Title

A string that represents the name of the beacon.

Active

A boolean that represents if the

beacons

beacon is active or not.

TypeId

An integer that represents

beacon´s

a beacon's type.

Position

A boolean that represents if the beacon´s position is static or not.

Geofence

A boolean that influences the final position calculation.

Cluster

Deprecated - will be deleted in future releases.

LastTimeOnline

A Unix timestamp in milliseconds that represents the time when the beacon was

catched

caught last time.

UseGps

A boolean that influences the final position calculation affected by GPS coordinates.

Info

More information about parameters is available here: Beacons settings explained.

TypeId

BLE

23

BLE-C

85

UWB

24

PRECOG

93