zoidicus
zoidicus

Reputation: 1

In azure iot hub, do I need to explicitly copy reported properties into the device twin?

properties.reported in my device-twins are not updating.

I have a running project that follows this Azure IOT SDK tutorial (complete with same hardware): https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-arduino-huzzah-esp8266-get-started

D2C messages are being sent from device and acknowledged by azure. I can monitor message arrival through Device Explorer and iothub-explorer, and I can see them accumulating in the table store, thanks to another tutorial I did to try to further prove messages were actually arriving. However, the contents of the messages (reported properties) are not reflected in the device twin. properties.reported is empty except for the metadata timestamp from the day the device was registered. Do I need to write an azure function to explicitly copy data from the message into the twin's reported properties?

FYI, C2D messages (properties.desired in the twin) are communicating just fine.

Upvotes: 0

Views: 522

Answers (1)

zoidicus
zoidicus

Reputation: 1

Help arrived in another forum, so I'm adding the relevant details here.
The sample I linked above, and the other samples I tried, all were sending events, instead of properties, even though they were reading and reacting to (desired) properties sent from the cloud. Reported properties must be sent with a call to IoTHubClient_LL_SendReportedState (C) or Client.UpdateReportedPropertiesAsync (C#).

Upvotes: 0

Related Questions