Data Stream Integrations
Partners often desire a stable and high performance integration pipeline.
Stream Processing
There are several cloud scale grade stream processing technologies available that eliminate the pain of integrating data streams. Bluzone aims to integrate with several of the leading providers. At this time, Bluzone supports Amazon AWS Kinesis (https://aws.amazon.com/kinesis/) and Azure Event Hubs.
AWS Kinesis
The integration path is extremely straightforward. Amazon provides excellent documentation and examples for setting up a stream and implementing a consumer client.
The following steps describe the process for configuring a Bluzone Project to export data to an Amazon Kinesis Stream.
- Generate IAM credentials for connecting to the Stream. Refer to Setting Up for Amazon Kinesis Streams for step-by-step instructions.
- Select IAM Management Console
- Select a user
- Select "Security Credentials" tab
- Click "Create Access Key"
- Take note of the "Access Key ID" and the "Secret Key" values, as they are needed for a later step
- Create the Kinesis Stream.
- From the AWS Console Kinesis page, select "Kinesis Streams" (NOT "Kinesis Firehose")
- Click "Create Stream"
- Give the stream a name
- Enter the number of shards (Follow AWS instructions for figuring out the number of shards)
- Click Create
- Add the Kinesis Stream to Bluzone
- Login to the Bluzone Portal
- Open the project setting view
- Select "Stream"
- Create a new config by clicking "Create"
- Stream Name (This should match the name that you assigned to your steam in AWS Console Kinesis)
- Select Kinesis Endpoint region
- Either you can give AWS Access Key and AWS Secret key or Enable Assume Role, Refer How to create assume role
- Select the Stream Type:
- Packet Data - This option will capture aggregated scandata of all BluFis that are associated with your project
- Location Data - This option will capture aggregated RTLS data of all beacons that are associated with your project
- Policy Event Data - This option will capture any policy related event data associated with your project
- Beacon Telemetry data - This option will capture temperature and battery data of all beacons that are associated with your project
- Select Save
- Once you have successfully created and saved a stream, it will show up in the stream list with Enabled status
- You may disable the stream as following:
- Select the stream from the stream list
- Uncheck 'Remote Consumer Enabled' box
- Select Save
- Login to the Bluzone Portal
The Bluzone cloud will take up to 10 minutes to setup your stream. Once it starts writing data, you will be able to consume from the stream with any of the provided reference libraries.
Azure Event Hubs
The following steps describe the process for configuring a Bluzone Project to export data to an Azure Event Hubs Stream.
- Creating Shared access policy.
- Create the Azure event hubs by following the link Setting up Azure Event Hubs for step-by-step instructions.
- Select the created Event Hub instance and select the Shared access policies.
- Click “Add”.
- Give the policy name and select any one or more options(“Manage”, “Send” and “Listen”) that available and click create.
- Now the shared access policy for the event hub is created and once you click on the policy, you can view the credentials at the right side.
- Take a note of “Event Hub Namespace name”, “Event Hub Name”, “SAS Policy Name” and “SAS Key” (Primary is preferred).
- Create the Azure event hubs by following the link Setting up Azure Event Hubs for step-by-step instructions.
- Add Event Hub to Bluzone.
- Login to Bluzone Portal.
- Open the project setting view.
- Select "Streams".
- Click "Create" for new configuration.
- Select Azure as Cloud Provider and enter the following values:
- Azure Event Hub Namespace name.
- Azure Event Hub Name.
- SAS Policy Name.
- SAS Key.
- Select the Stream Type.
- Packet Data - This option will capture aggregated scandata of all BluFis that are associated with your project.
- Location Data - This option will capture aggregated RTLS data of all beacons that are associated with your project.
- Policy Event Data - This option will capture any policy related event data associated with your project.
- Beacon Telemetry data - This option will capture temperature and battery data of all beacons that are associated with your project
- Click "Save".
- Once you have successfully created and saved a stream, it will show up in the stream list with Enabled status.
- You may disable the stream as following:
- Select the stream from the stream list
- Uncheck 'Remote Consumer Enabled' box
- Click "Save"
- Login to Bluzone Portal.
The Bluzone cloud will take up to 10 minutes to setup your stream. Once it starts writing data, you will be able to consume from the stream with any of the provided reference libraries.
Available Data Streams
The following streams are currently supported by Bluzone:
Packet Data
The raw packet data that is read from the Blufi devices
Location Data
A stream of location messages for use with RTLS deployments.
{ "type": "location", "projectId": 1336, "id": "3777777777777777777", "mac": "01:ef:07:07:07:07:07", "floorNumber": 1, "deviceName": "door beacon", "latitude": 25.256818055638366, "longitude": 55.37758749303774, "altitude": 0.0006927130743861198, "location": "25.256818055638366, 55.37758749303774", "timestamp": "2016-02-24T16:58:14.014Z", "varianceX": 10.906546468979249, "varianceY": 17.58863642627552, "varianceZ": 0 }
Policy Event Data
Message tracking Policy state change events.
Note: the "uniqueDeviceId" is the beacon deviceId when policy namespace is "BEACON".
See: Policy Event Stream API v1
{ "eventUuid": "7c8d1944-ffe0-4812-9519-18afd0e01a3e", "projectId": "1336", "policyId": "143333122", "blufiId": "732222122", "uniqueDeviceId": "8686868686868686868", "oldState": "OK", "newState": "VIOLATING", "value": "60", "timestamp": 1456850995739, "timestampCleared": null }
SsnsSummary Data (High-Speed Data)
Condition Monitoring summary data that includes temperature and high-speed acceleration values in Protobuf encoding (Same as for RemoteStorage).
Proto File : highSpeed
For Additional on deserialization: Click Here
Telemetry Data
Beacon Telemetry summary data that includes temperature and battery values of 1 min interval of a beacon in Protobuf encoding (Same as for RemoteStorage).
Proto File: Telemetry
For Additional on deserialization: Click Here
Distance Tracking Incident Data
Beacon Telemetry summary data that includes temperature and battery values of 1 min interval of a beacon in Protobuf encoding (Same as for RemoteStorage).
Proto File: ContactIncident
For Additional on deserialization: Click Here