Connecting Azure IoT Hub to the Waylay broker
- Access to IoT Hub
- IoT connected device
- Waylay environment
Main building blocks of this integration are presented below:
Say your organisation has some devices that are connected in Azure IoT Hub and that the devices are configured to push their telemetry data to a Topic or multiple Topics. How does one connect this data on these topic to a Waylay Environment for creating rules and templates? The service connector allows you to bridge the connection between Azure IoT Hub and your Waylay environment fairly easy!
All one needs to do is to download this service connector as a Docker image and run it with a file that contains the environment variables.
The command for running the docker is as followed:
docker run -p 3000:3000 --rm --name connector --env-file=PathToFile/connectorFile awsIoTConnectorDockerImage
Create a file and insert the configurable variables listed below.
Azure Connector Docker configuration
The following environment variables have to be configured:
||IoT Hub Connection string|
||Flattening JSON objects or not (value can be ‘flat’ or not filled in)|
||Filter on device module name|
||TenantId of your organisation|
||Secret of your application|
||Id of your application|
||Waylay accounts url|
||URL of your broker|
Exist of multiple pieces of information:
HostName= ;Endpoint= ;SharedAccessKeyName= ;SharedAccessKey= ;
HostName can be found on:
IoT Hub Console -> Overview -> Hostname
Endpoint - SharedAccessKeyName - SharedAccessKey String can be found on:
IoT Hub Console -> Endpoints -> Events (Built-in Endpoint) -> Properties
This will be the same url as configured in your waylay environment.
This will convert nested JSON objects into flat (key, value) objects so that all metric are stored in the timeseries database.
PARSE_MODE='flat' or not specified
|Azure IOT Hub “Module”||# Devices|
PATH_FILTER has value of
A the engine will only retrieve data of devices that have module A assigned.
PATH_FILTER is not injected it will retrieve all data of all modules (all devices).
Modules can be configured for each device