Closed ridomin closed 1 year ago
@ridomin Thanks for the feedback! We are currently investigating and will update you shortly.
Hello @ridomin
Please refer to the document:Choose a device communication protocol
HTTPS: Use for devices that cannot support other protocols. When using HTTPS, each device should poll for cloud-to-device messages no more than once every 25 minutes. In development, each device can poll more frequently, if desired.
Please let us know if you are looking for any specific scenario which is not available in the documentation?
Hi @SatishBoddu-MSFT
I'm looking for the REST api to send telemetry messages, aka D2C messages
All I've found in the docs are related to C2D messages, but no telemetry
Hello @kgremban Could you please help us on this document request for "REST api to send telemetry messages, aka D2C messages"
Hi @rido-min,
Thanks for reaching out. Here are a couple of places to get started:
Here's the REST API to send telemetry (an event) to IoT Hub: https://docs.microsoft.com/en-us/rest/api/iothub/device/send-device-event
Here's the topic in the IoT Hub documentation about constructing D2C messages: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-construct. One thing, if you're going to try to send system properties over HTTP w/o using an SDK, please reach out to me first. (The names are slightly different when using raw HTTP.)
Does that help? If you need more information, please respond back on this thread. And, just FYI, I'm out today, but I'll see any response first thing tomorrow morning.
-Jimaco
Hi @JimacoMS4
This is the article I was looking for, I think I missed it because I was searching for telemetry, or d2c and did not search for "device-event". As additional feedback I miss some details from the article content:
iothub-app-XXX
prefix seems incorrect, as described in https://github.com/Azure/azure-iot-sdk-node/issues/1141 . From the tests I've been running here, the dt-subject can be set without the prefix.Feel free to reuse the sample code in this gist to showcase how to implement HTTP device telemetry without any SDK.
Hi @rido-min,
To your first bullet. You're right, that probably is somewhat misstated. I think it should be that user-defined application properties should follow the iothub-app-xxxx
form. I think that dt-subject
, however, is a system property, and it should just be added as-is: Here's the list of system properties: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-messages-construct.
On the second bullet, again, you're correct the API doesn't mention the auth header. This is lightly covered in the REST overview (at least for the symmetric key case): https://docs.microsoft.com/en-us/rest/api/iothub/#common-parameters-and-headers.
Let me take the rest of this up with you offline. Again, thanks,
Jimaco
This page describes de
Device endpoints
for IoT hub,In the same way there is an article describing the MQTT support here I'm looking for the detailed REST reference docs describing the HTTP support for device-to-cloud messages.
Related to: https://github.com/Azure/azure-iot-sdk-node/issues/1141
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.