Azure-IOT Hub Helper
Table of Contents
Azure’s IoT Hub offers highly secure and reliable data transfer between devices and cloud hosted software applications. Digital Matter’s OEM Server can output device data in a JSON format, over HTTP. OEM Server provides the ideal service to convert raw device data into JSON, and when matched with Azure’s IoT Hub, it is the ideal solution to enable cloud solutions. This tool assists with the setup of both OEM Server and Azure, via their APIs, to enable secure communication.
The Azure-IoT Hub Helper application allows customization of device names, which will be used to generate custom fields on OEM that will allow connection to the device on Azure’s IoT Hub, along with the ability to create those devices in the
Azure IoT Hub; if they aren’t already present.
Set up in OEM Server.
Set your device(s) connector to:
Azure-IoT Hub Helper User Interface/Instructions
Open File – Opens up a dialog that lets you select a comma-separated value (.csv) file or a text (.txt) file containing a list of serial numbers of single type of device. The application can only read serial numbers from CSV files and Text files, so ensure the files are in the correct format.
Device Name – Allows customization of the device name by either adding a prefix or suffix to the serial number. An example of how the device name will appear alongside “Example Device Name”.
IoT Hub Connection String – This is a connection that can be found in your Azure IoT Hub
To find the connection string:
- Navigate to shared access policies under settings
- Select the iothubowner under the policy heading
- Copy the connection string with the format:
HostName=<Host Name>;SharedAccessKeyName=<Key Name>;SharedAccessKey=<SAS Key>
OEM Authentication – Enter your credentials you use to log in to OEM and select the device type, this will generate the custom hidden keys which are saved on OEM for each device.
IoT Hub Connect – Create the devices on your Azure IoT Hub, this is an optional feature and isn’t required. If a device with the same name already exists on the Hub, the device will not be created.
List of Devices – A display of all serial numbers that have been found in the file, along with the status of each device as you generate custom fields along with creation of the device on Azure.
- The application only allows customisation of a single device type, so all the serial numbers present in the file will have to be of the same device type.
- Changing the device name after custom fields have been set, will require the custom fields being generated again by pressing the “Set Custom Fields on OEM” button.
- An incorrect serial number will not have its custom field set nor will it be set if the device type is incorrect.
- Incorrect credentials or incorrect IoT Hub connection string will result in custom fields not being set and inability to add devices to Azure IoT Hub.
- The status of a device will be indicated alongside the device in the view on the right.