Microsoft Azure IoT Hub
Microsoft Azure IoT Hub is an IoT suite in the Azure cloud, which offers several services for connecting IoT devices with Azure services. Microsoft Azure IoT Hub enables devices to establish a secure, bi-directional data communication to send telemetry data, receive commands or maintain a digital twin of the device.
Configuration in TwinCAT IoT Data Agent
Connections to the Microsoft Azure IoT Hub service can be easily configured within the TwinCAT IoT Data Agent Configurator and are represented by an own Gate type.
The Gate configuration includes all required parameters to establish a connection to the Azure IoT Hub, e.g. DeviceId, PrimaryKey/SecondaryKey, Hostname and a link to a trusted CA certificate for the connection.
Send data
Receive data
Properties
Microsoft Azure IoT Hub offers the functionality to send message telemetry meta data. Such data can be send as so-called "Properties". In TwinCAT IoT Data Agent Configurator, properties can be set as channel parameters in the Parameter Editor.
A cloud-application (e.g. Azure Stream Analytics) can then take these parameters for further processing.
3/19/2021 3:54:51 PM> Device: [CX-12345], Data:[{"Timestamp":"2021-03-19T14:54:51.1650000+01:00","GroupName":"Publisher","MAIN.nCounter":49510}]Properties:
'Company': 'Beckhoff Automation'
'Device': 'CX5130-0020'
'OS': 'Windows 10'
'OS Build': '1909'