Azure Iot Hub Transmit¶
An azure iot hub transmit (connects to an Azure IoT Hub instance). This client should be used in non-nested instances, or when direct IoTHub routing is required.
- Example:
- If we want to upload our records from the - bathhouse:waterstream to our IOT cloud, going through an IoT (non-edge) HuB endpoint, the config will look like this:- { "data_transmit": [ { "transmit_name": "iot_hub_transmit", "transmit_type" : "iothub", "filter_stream": [ "bathhouse:water" ], "connection_string": "HostName=...;SharedAccessKeyName=...;SharedAccessKey=..." } ] } 
Configuration:
Required and optional properties that can be configured for the transmit.
- connection_string: A string that provides all the connection info. (Can be found in “Devices” -> “<Actual Device Name>” -> “Primary connection string” in the relevant iot hub page) 
- additional_fields: additional field to add in the message payload for e.g. { “processingPath”: “SM”} 
- use_websockets: Option to connect to MQTT over websockets (Defaults to False) 
- transmit_name: ID for the transmit. It must be unique. 
- transmit_type: Method to use in transmitting records. 
- filter_stream: A list of streams that will use the transmit. Each stream can either be - *(all) or- asset:stream.
- timeout: Number of seconds to wait until timing out. 
- poll_interval: Maximum number of seconds to wait between requests 
- max_request_records: Maximum number of records to send in a single request. 
- max_request_size_bytes: Maximum number of bytes allowed in a single request. Size is capped at 4 MB. 
- opc_payload_metadata: Additional fields to add in the OPC-formatted payload. E.g. { “TiqTwin”: { “NodeId”: “a2ec725a-78e2-431b-a124-ce20b8e3e4c6” }} Ignored if - use_opc_publisher_formatis- False.
- opc_message_metadata: Per-message metadata fields to add in the OPC-formatted payload. 
- use_opc_publisher_format: If - True, the message payload will be formatted to mimic OPC Publisher. https://github.com/Azure/Industrial-IoT/tree/main/docs/opc-publisher#opc-publisher-telemetry-formats