How-To Guides
...
Azure IoT Hub Guides
Send Data to Azure IoT Hub with a Device Certificate
7 min
review the following guide for setting up an outbound data integration between belden horizon data operations and azure iot hub using a device certificate additional resources refer to the following resources for more information https //docs microsoft com/en us/azure/iot hub/iot hub devguide messaging?wt mc id=portal microsoft azure iothub#message format https //docs microsoft com/en us/azure/iot hub/iot hub mqtt support#sending device to cloud messages https //docs microsoft com/en us/azure/iot hub/iot hub mqtt support#using the mqtt protocol directly as a module before you begin you must first docid\ pms3cnfw5k2cbsueer8pu when you add the iot device to the hub, select x 509 self signed as the authentication type when you add the iot device in azure step 1 add a device follow the steps to docid\ t cwpe0 jsfw5 aoj8wpp the device will be used to store tags that will be eventually used to create outbound topics in the connector make sure to select the enable data store check box step 2 add tags after connecting the device in belden horizon data operations, you can docid\ wpe2hmxelarlbnhwbuchy to the device create tags that you want to use to create outbound topics for the connector step 3 add the azure iot hub using device certificates connector follow the steps to docid\ orxib vla2ngvdx94z1ow and select the mqtt azure iot hub using device certificates provider define the following parameters name enter a name for the connector hostname the ip address or server fqdn of the mqtt broker (must be reachable from your edge device) port the mqtt broker's port number the default value is 8883 device id copy the device id of your edge device from the iot devices page in the azure portal and paste it here certificate copy or save the certificate from the mydevicekeycer pem file and paste or upload it here private key copy the key from the myprivatekey pem file and paste it here parallel publish count the maximum number of concurrently published messages the default value is 16 integration topic the default topic to publish or subscribe to devices/\[deviceid]/messages/events/ replace \[deviceid] with the device id copied from azure lwt topic the topic for mqtt's last will and testament feature lwt payload the payload for mqtt's last will and testament feature lwt payload type the payload type for mqtt's last will and testament feature the options are string and base64 lwt qos the quality of service value for mqtt's last will and testament feature lwt retained select this check box to retain the value for mqtt's last will and testament feature throttling limit the maximum number of messages per second to be processed the default value is zero, which means that there is no limit persistent storage when enabled, this will cause messages to undergo a store and forward procedure messages will be stored within belden horizon data operations when cloud providers are online step 4 enable the connector after adding the connector, click the toggle in the connector tile to enable it if you see a failed status, review the docid\ ocbqwycy xmmkwv9aunq and any relevant error messages step 5 create outbound topics for connector you will now need to create topics from the tags you added in step 2 before creating the topics copy the raw topic parameter for all tags you want to use for topics see docid\ nrpe2viswydkgecoswzq0 for more information to create topics click the connector tile the connector dashboard appears click the topics tab add topics to the connector with the details below see the add a topic to a connector section in docid\ ocbqwycy xmmkwv9aunq for more information data direction select local to remote outbound local data topic paste the raw topic for the tag created in step 2 remote data topic enter integration raw\ outboundtest enable click the toggle to enable the topic click yes to add the topic after adding all required topics, navigate to the integration pane and make sure the connector has a connected status step 5 view outbound messages you can create a flow in belden horizon data operations to view the outbound messages of the connector to view outbound messages follow the steps to docid\ crmxroqtwtycjcddtoahd and add the following nodes datahub subscribe debug connect the two nodes double click the datahub subscribe node the edit datahub subscribe node dialog box appears paste the local topic you created in step 4 if needed, configure the datahub subscribe connection see the "step 3 configure connector nodes" section in docid\ crmxroqtwtycjcddtoahd to learn more click done , and then click deploy check the debug messages tab see the additional options section in docid uyecathnnfdy3 ggst1m for more details verify that outbound messages are displaying