Azure - Instance & item setup
How to setup a Azure IoT Hub instance and item in SIA
The Azure IoT Hub Connector creates a tunnel and connection between SIA Connect and Azure IoT Hub. This enables data to flow between Azure and other connect instances such as PLC's, sensors, meters & Building Management systems.
Parameters
To setup the Azure IoT Hub connection an instance using the Connector have to added and its parameters is described in the following table.
Instance
Parameter | Description |
---|---|
Address (instance default) |
The Connection String for the IoT Device on the IoT Hub.
Shared access key format:
x509 format: |
Registration Uri | URL for the provisioning server, only used when Provisioning is not None |
Protocol |
Protocol to communicate with Azure IoT Hub:
If uncertain what to use then keep the default MQTT |
Provisioning |
Which kind of provisioning is used
|
Shadow Api | Whether to use the shadow API for setting up SIA using the provisioning |
Authentication Type | What kind of authentication to use (Token or certificate) |
Id Scope | The Device scope of the provisioning server |
Device Id | The Device ID to connect correctly in the provisioning server |
Device Twin |
Whether or not to use the digital twin functionality to synchronize. Select NO with Basic Tier IoT Hub |
Timeout | Timeout time given in milliseconds. If the connection time to Azure exceeds this it will cancel the operation. |
Certificate | If Authentication type is set to X509 Certificate, this must select the public certificate to use |
Key | If Authentication type is set to X509 Certificate, this must select the key file to use |
Item
In order to add Azure IoT Hub Application properties, the properties can be added to the item using a JSON dictionary.
The default payload can be used to create a template in which to map messages going to the cloud.
The item parameters are only applicable for the Device-to-cloud items, the Cloud-to-device items will ignore these
Parameter | Description |
---|---|
Message Type |
Whether to use telemetry or properties as transport to Azure.
where telemetry is a regular telemetry message and property reflects a property in a Digital Device Twin in Azure. |
Properties | User defined properties for the IoT Hub message. The properties are given in JSON dictionary with key value pairs: {"Facility": "Bottle_plant", "Floor": 1} |
Device to cloud item
An item will automatically be added called Device-to-cloud item.
This item is the tunnel to Azure and can be used in mappings to tunnel other instances data to Azure.
Further items can be added to set e.g. other Properties or Default Payloads
Cloud to device item
An item will automatically be added called Cloud-to-device item.
This item is the tunnel for messages coming from Azure IoT Hub and can be used to map messages to other items using a mapping.
Further items can be added that will all receive the same message, this however is not recommended. Add another mapping instead.