Versions Compared

Key

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

...

Property NameValue TypeDescriptionAlways Present
typeStringDefines packet type (e.g.: location)Yes
projectIdNumberThe project identifier this location was generated forYes
idStringThe unique identifier for the device (beacon) being trackedYes
macStringThe mac address of the device being trackedYes
locationIdNumberThe locationId of the Bluzone location this was generated forYes
floorNumberNumberThe floor number this location is determined to be on.Yes
deviceNameStringThe name of the deviceYes
latitudeNumberLatitude value (example: 25.774489)Yes
longitudeNumberLongitude value (example: -80.195160)Yes
altitudeNumberAltitude value in (tbd)Yes
varianceXNumberThe uncertainty in square meters of the X axisYes
varianceYNumberThe uncertainty in square meters of the Y axisYes
varianceZNumberThe uncertainty in square meters of the Z axis.Yes
varianceNumberThe uncertainty distance of the location. Example.. Use this for map display of variance circle.Yes
locationStringCombined latitude, longitude valuesYes
batteryNumberThe battery level of from the latest scan data. If we have not received a battery yet sample the value will be zero.Yes
timestampStringThe ISO 8601 format of the timestamp of when the packet output from the Cloud in UTC

Yes

calculatedTimestampStringThe ISO 8601 format of the first packet received at server used to produce locationYes
maxTimestampStringThe ISO 8601 format of the last packet received at server used to produce locationYes
windowCountNumberThe number of packets included in the location calculationYes
errorString

The error code output from processing new locations

  • OK - there is no error
  • ErrData - there is an error with the quality of data resulting in no new location
No
errorDescriptionStringThe free text error description used to further describe the errorNo

...

Code Block
languagejs
titleLocation Packet
{
  "altitude": 2.3687698831781745,
  "battery": 3630,
  "calculatedTimestamp": "2017-12-15T17:06:13.793Z",
  "maxTimestamp": "2017-12-15T17:06:16.793Z",
  "windowCount": 10,
  "deviceName": "bvTiTag",
  "locationId": 1,
  "floorNumber": 1,
  "id": "6253758190942573046",
  "latitude": 26.205612363949143,
  "location": "26.205612,-80.138235",
  "longitude": -80.13823502660985,
  "mac": "01:fa:b5:26:24:cf:b2",
  "projectId": 8,
  "timestamp": "2017-12-15T17:06:16.555687791Z",
  "type": "location",
  "variance": 0,
  "varianceX": 0,
  "varianceY": 0,
  "varianceZ": 0,
  "error":"OK",
  "errorDescription":""
}

Using The Service

Note:  Support for WebSocket connections to Bluzone has been deprecated.  Please use the RemoteConsumer service and bring your own Kinesis or EventHub stream to consume this data.  See Data Stream Integrations


The following section assumes familiarity with working with WebSockets.  Bluvision has made a sample client available on Github (https://github.com/bluzone/consumer-service).  The sample client will connect to a WebSocket at the provided URL and dump contents to the console.  

Prerequisites

  1. WebSocket Client:  A reference implementation can be found here:  https://github.com/bluzone/consumer-service
  2. A project on the Bluzone Portal:  https://bluzone.io
  3. The Web API Token from the project.
  4. The URL to the Location Stream endpoint:  httpswss://bluzone.io/portal/consumer/location