Cloud to device message with iot edge device

Newbie 41 Reputation points

Hi, I used to use function triggered by iot hub to send cloud to device message. Now, that i decide to use my device as an iot edge device and want to achieve the same goal. As, I read the documentation, i found that there isn't $upstream option as source in declare route for iot edge hub. Is there anyway to send data from iot hub to iot edge device?
Also, if i have like 5 modules in edge device, will they run 1 by 1 or at the same time?

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
530 questions
0 comments No comments
{count} votes

Accepted answer
  1. Matthijs van der Veer 4,371 Reputation points MVP

    Currently Azure IoT Edge modules do not support C2D messages. It is mentioned in these docs. Instead of C2D messages, you can use a Direct Method to contact a module, the downside is that the device needs to be online for a Direct Method to work.

    To answer your second questions, Azure IoT Edge will attempt to run all the modules at the same time. The exception to that rule is that the edgeAgent module will always run first, and the edgeHub module will only run if there are any other modules running.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Sander van de Velde 28,161 Reputation points MVP

    As @Matthijs van der Veer mentioned, Direct Methods are a good way for C2D communication.

    Another alternative is making use of the Module Twin. You can send values using the desired properties. The device can send the response of the action back to the cloud using the reported properties, also part of the Module Twin.
    This works also nice in disconnected scenarios.

    1 person found this answer helpful.