2. Add Azure Target
Open the https://localhost:5050/Targets
page again and add a new Target of type Azure
.
Ensure the Enabled
box is checked and enter the Connection String
. This can be:
- Primary or Secondary Connection String:
HostName=[name].azure-devices.net;DeviceId=[device-id];SharedAccessKey=[key]
or the
- SAS Token Connection String:
HostName=[name].azure-devices.net;DeviceId=[device-id];SharedAccessSignature=SharedAccessSignature sr=[name].azure-devices.net%2Fdevices%2F[device-id]&sig=[signature]se=[timestamp]
The Primary or Secondary Connection Strings can be found in the Azure Portal -> IoT Hub -> Devices -> [device-id].
A SAS Token can be generated using the Azure IoT Explorer.
If the connection is established successfully, the card on the hopit Edge home-screen at https://localhost:5050
turns green and says UP
.
info
If this is not the case, please look in the log at https://localhost:5050/Log
. If this didn't help, configure Debug
for the log level and disable and enable the Target again.