Skip to main content
Version: 1.7.0

2. Connect the Edge device

Paste the Connection String​

Back in the wizard on the Edge device, continue to the second step with NEXT and paste the connection string into the Connection String field.

Leave Enable Device Monitoring checked to sample the state of every hopit Edge service once a minute. This is what the device status and the status timeline in the portal are built on. The samples use the Target's message batching, so their delivery can be delayed until a batch is full or its ten-minute timeout is reached. Clear the option if you only want to configure the connection and add Routes yourself later.

Click CONNECT. The wizard reports what is wrong with the string if it cannot be read — the most common cause is a partial copy.

What the wizard configures​

The wizard writes the same settings you could enter by hand on the Targets, Router and Settings pages. It is equivalent to applying the following Device Twin:

"Targets": {
"hopit Portal": {
"TransportType": "Amqp",
"DpsSymmetricKey": "…",
"DpsIdScope": "…",
"EnableChunking": true,
"ChunkSize": 12,
"ChunkTimeout": "00:10:00",
"TargetType": "Azure",
"QoS": "AtLeastOnce",
"MessagesPerSecondLimit": 1.0,
"SanitizeReportedSecrets": true,
"Enabled": true
}
}

Message chunking is switched on so monitoring samples are collected with the Target's other messages instead of sending one message per scrape. A chunk is sent when it reaches 12 kB or its oldest message reaches the ten-minute timeout. This keeps the IoT Hub message count — and therefore the cost — low, but means monitoring updates are not necessarily visible immediately. See Azure IoT Hub for details.

The Device Name under Settings -> Insights Collector is set to the device's name in the portal, so both sides show the same device. It is only filled in when it is still empty — the Device Name is also the instance label of every metric this device writes, so a name you chose yourself is kept and the device's history stays in one place.

Verify the connection​

On the Edge device, the hopit Portal Target appears on the Targets page and the card on the home-screen at https://localhost:5050 turns green and says UP. The first connection takes a few seconds while the device registers itself with the Device Provisioning Service.

In the portal, the device turns Online. With Device Monitoring enabled, the services appear after the first monitoring chunk is delivered: earlier if the chunk reaches 12 kB, and otherwise within approximately ten minutes.

info

If the Target does not come up, look at the log at https://localhost:5050/Log. If that is not conclusive, set the log level to Debug and disable and enable the Target again.

After onboarding​

The hopit Portal Target behaves like any other Azure Target. You can add your own Routes to it to stream machine data to the portal, enable Device Twin synchronization to manage the device's settings remotely, or run Tasks on it from the portal.